aboutsummaryrefslogtreecommitdiff
path: root/target-i386/machine.c
diff options
context:
space:
mode:
authorAurelien Jarno <aurelien@aurel32.net>2011-05-15 14:09:18 +0200
committerAurelien Jarno <aurelien@aurel32.net>2011-06-03 16:07:50 +0200
commitc31da136a0bf8caad70c348f5ffc283206e9c7fc (patch)
tree780e9e820d3c77a7bc89220650702bfd78e8d558 /target-i386/machine.c
parent142ab5bb872337054581d8067906a6541704a5e0 (diff)
target-i386: remove old code handling float64
Now that target-i386 uses softfloat, floatx80 is always available and there is no need anymore to have code handling both float64 and floax80. Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Diffstat (limited to 'target-i386/machine.c')
-rw-r--r--target-i386/machine.c101
1 files changed, 0 insertions, 101 deletions
diff --git a/target-i386/machine.c b/target-i386/machine.c
index d78eceb779..bbeae8852c 100644
--- a/target-i386/machine.c
+++ b/target-i386/machine.c
@@ -84,7 +84,6 @@ static void put_fpreg_error(QEMUFile *f, void *opaque, size_t size)
exit(0);
}
-#ifdef USE_X86LDOUBLE
/* XXX: add that in a FPU generic layer */
union x86_longdouble {
uint64_t mant;
@@ -202,102 +201,6 @@ static bool fpregs_is_1_no_mmx(void *opaque, int version_id)
VMSTATE_ARRAY_TEST(_field, _state, _n, fpregs_is_1_mmx, vmstate_fpreg_1_mmx, FPReg), \
VMSTATE_ARRAY_TEST(_field, _state, _n, fpregs_is_1_no_mmx, vmstate_fpreg_1_no_mmx, FPReg)
-#else
-static int get_fpreg(QEMUFile *f, void *opaque, size_t size)
-{
- FPReg *fp_reg = opaque;
-
- qemu_get_be64s(f, &fp_reg->mmx.MMX_Q(0));
- return 0;
-}
-
-static void put_fpreg(QEMUFile *f, void *opaque, size_t size)
-{
- FPReg *fp_reg = opaque;
- /* if we use doubles for float emulation, we save the doubles to
- avoid losing information in case of MMX usage. It can give
- problems if the image is restored on a CPU where long
- doubles are used instead. */
- qemu_put_be64s(f, &fp_reg->mmx.MMX_Q(0));
-}
-
-const VMStateInfo vmstate_fpreg = {
- .name = "fpreg",
- .get = get_fpreg,
- .put = put_fpreg,
-};
-
-static int get_fpreg_0_mmx(QEMUFile *f, void *opaque, size_t size)
-{
- FPReg *fp_reg = opaque;
- uint64_t mant;
- uint16_t exp;
-
- qemu_get_be64s(f, &mant);
- qemu_get_be16s(f, &exp);
- fp_reg->mmx.MMX_Q(0) = mant;
- return 0;
-}
-
-const VMStateInfo vmstate_fpreg_0_mmx = {
- .name = "fpreg_0_mmx",
- .get = get_fpreg_0_mmx,
- .put = put_fpreg_error,
-};
-
-static int get_fpreg_0_no_mmx(QEMUFile *f, void *opaque, size_t size)
-{
- FPReg *fp_reg = opaque;
- uint64_t mant;
- uint16_t exp;
-
- qemu_get_be64s(f, &mant);
- qemu_get_be16s(f, &exp);
-
- fp_reg->d = cpu_set_fp80(mant, exp);
- return 0;
-}
-
-const VMStateInfo vmstate_fpreg_0_no_mmx = {
- .name = "fpreg_0_no_mmx",
- .get = get_fpreg_0_no_mmx,
- .put = put_fpreg_error,
-};
-
-static bool fpregs_is_1(void *opaque, int version_id)
-{
- CPUState *env = opaque;
-
- return env->fpregs_format_vmstate == 1;
-}
-
-static bool fpregs_is_0_mmx(void *opaque, int version_id)
-{
- CPUState *env = opaque;
- int guess_mmx;
-
- guess_mmx = ((env->fptag_vmstate == 0xff) &&
- (env->fpus_vmstate & 0x3800) == 0);
- return guess_mmx && env->fpregs_format_vmstate == 0;
-}
-
-static bool fpregs_is_0_no_mmx(void *opaque, int version_id)
-{
- CPUState *env = opaque;
- int guess_mmx;
-
- guess_mmx = ((env->fptag_vmstate == 0xff) &&
- (env->fpus_vmstate & 0x3800) == 0);
- return !guess_mmx && env->fpregs_format_vmstate == 0;
-}
-
-#define VMSTATE_FP_REGS(_field, _state, _n) \
- VMSTATE_ARRAY_TEST(_field, _state, _n, fpregs_is_1, vmstate_fpreg, FPReg), \
- VMSTATE_ARRAY_TEST(_field, _state, _n, fpregs_is_0_mmx, vmstate_fpreg_0_mmx, FPReg), \
- VMSTATE_ARRAY_TEST(_field, _state, _n, fpregs_is_0_no_mmx, vmstate_fpreg_0_no_mmx, FPReg)
-
-#endif /* USE_X86LDOUBLE */
-
static bool version_is_5(void *opaque, int version_id)
{
return version_id == 5;
@@ -344,11 +247,7 @@ static void cpu_pre_save(void *opaque)
env->fptag_vmstate |= ((!env->fptags[i]) << i);
}
-#ifdef USE_X86LDOUBLE
env->fpregs_format_vmstate = 0;
-#else
- env->fpregs_format_vmstate = 1;
-#endif
}
static int cpu_post_load(void *opaque, int version_id)