diff options
author | Juan Quintela | 2009-09-29 22:48:54 +0200 |
---|---|---|
committer | Anthony Liguori | 2009-10-05 16:32:41 +0200 |
commit | 60a902f1c329757705dea416abd741c1f11d3186 (patch) | |
tree | 94365c90f2bf7dee12f6b528e662a1d091348d45 /target-i386/machine.c | |
parent | x86: add pending_irq_vmstate to the state (diff) | |
download | qemu-60a902f1c329757705dea416abd741c1f11d3186.tar.gz qemu-60a902f1c329757705dea416abd741c1f11d3186.tar.xz qemu-60a902f1c329757705dea416abd741c1f11d3186.zip |
x86: add fpregs_format_vmstate
Don't even ask, being able to load/save between 64<->80bit floats should be forbidden
Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'target-i386/machine.c')
-rw-r--r-- | target-i386/machine.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/target-i386/machine.c b/target-i386/machine.c index c6fd5baf1d..18347e4f26 100644 --- a/target-i386/machine.c +++ b/target-i386/machine.c @@ -26,7 +26,6 @@ static void cpu_get_seg(QEMUFile *f, SegmentCache *dt) void cpu_save(QEMUFile *f, void *opaque) { CPUState *env = opaque; - uint16_t fpregs_format; int i, bit; cpu_synchronize_state(env); @@ -49,11 +48,11 @@ void cpu_save(QEMUFile *f, void *opaque) qemu_put_be16s(f, &env->fptag_vmstate); #ifdef USE_X86LDOUBLE - fpregs_format = 0; + env->fpregs_format_vmstate = 0; #else - fpregs_format = 1; + env->fpregs_format_vmstate = 1; #endif - qemu_put_be16s(f, &fpregs_format); + qemu_put_be16s(f, &env->fpregs_format_vmstate); for(i = 0; i < 8; i++) { #ifdef USE_X86LDOUBLE @@ -196,7 +195,6 @@ int cpu_load(QEMUFile *f, void *opaque, int version_id) { CPUState *env = opaque; int i, guess_mmx; - uint16_t fpregs_format; cpu_synchronize_state(env); if (version_id < 3 || version_id > CPU_SAVE_VERSION) @@ -210,7 +208,7 @@ int cpu_load(QEMUFile *f, void *opaque, int version_id) qemu_get_be16s(f, &env->fpuc); qemu_get_be16s(f, &env->fpus_vmstate); qemu_get_be16s(f, &env->fptag_vmstate); - qemu_get_be16s(f, &fpregs_format); + qemu_get_be16s(f, &env->fpregs_format_vmstate); /* NOTE: we cannot always restore the FPU state if the image come from a host with a different 'USE_X86LDOUBLE' define. We guess @@ -220,7 +218,7 @@ int cpu_load(QEMUFile *f, void *opaque, int version_id) uint64_t mant; uint16_t exp; - switch(fpregs_format) { + switch(env->fpregs_format_vmstate) { case 0: mant = qemu_get_be64(f); exp = qemu_get_be16(f); |