fixed sparc64 cpu fp save/restore

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2001 c046a42c-6fe2-441c-8c8c-71466251a162
This commit is contained in:
bellard 2006-06-21 18:48:01 +00:00
parent 65ce8c2fb4
commit 1bdb68ea13
2 changed files with 6 additions and 7 deletions

View File

@ -12,7 +12,6 @@
#define TARGET_FPREGS 64 #define TARGET_FPREGS 64
#define TARGET_PAGE_BITS 12 /* XXX */ #define TARGET_PAGE_BITS 12 /* XXX */
#endif #endif
#define TARGET_FPREG_T float32
#include "cpu-defs.h" #include "cpu-defs.h"

12
vl.c
View File

@ -4146,11 +4146,11 @@ void cpu_save(QEMUFile *f, void *opaque)
/* FPU */ /* FPU */
for(i = 0; i < TARGET_FPREGS; i++) { for(i = 0; i < TARGET_FPREGS; i++) {
union { union {
TARGET_FPREG_T f; float32 f;
target_ulong i; uint32_t i;
} u; } u;
u.f = env->fpr[i]; u.f = env->fpr[i];
qemu_put_betl(f, u.i); qemu_put_be32(f, u.i);
} }
qemu_put_betls(f, &env->pc); qemu_put_betls(f, &env->pc);
@ -4182,10 +4182,10 @@ int cpu_load(QEMUFile *f, void *opaque, int version_id)
/* FPU */ /* FPU */
for(i = 0; i < TARGET_FPREGS; i++) { for(i = 0; i < TARGET_FPREGS; i++) {
union { union {
TARGET_FPREG_T f; float32 f;
target_ulong i; uint32_t i;
} u; } u;
u.i = qemu_get_betl(f); u.i = qemu_get_be32(f);
env->fpr[i] = u.f; env->fpr[i] = u.f;
} }