diff options
author | Pavel Dovgalyuk <Pavel.Dovgaluk@ispras.ru> | 2014-09-17 12:05:19 +0400 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2014-09-18 17:06:12 +0200 |
commit | 5bde14078d181439a1170094d7774372242ab739 (patch) | |
tree | 99535a4249042c14262d08f32569c424a7fd7621 /target-i386/machine.c | |
parent | 7dbb4c49bfa60b92251a97ddda2c3cdace6b73e4 (diff) | |
download | qemu-5bde14078d181439a1170094d7774372242ab739.zip qemu-5bde14078d181439a1170094d7774372242ab739.tar.gz qemu-5bde14078d181439a1170094d7774372242ab739.tar.bz2 |
target-i386: update fp status fix
This patch introduces cpu_set_fpuc() function, which changes fpuc field
of the CPU state and calls update_fp_status() function.
These calls update status of softfloat library and prevent bugs caused
by non-coherent rounding settings of the FPU and softfloat.
v2 changes:
* Added missed calls and intoduced setter function (as suggested by TeLeMan)
Reviewed-by: TeLeMan <geleman@gmail.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Pavel Dovgalyuk <Pavel.Dovgaluk@ispras.ru>
Diffstat (limited to 'target-i386/machine.c')
-rw-r--r-- | target-i386/machine.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/target-i386/machine.c b/target-i386/machine.c index fb89065..0dd49f0 100644 --- a/target-i386/machine.c +++ b/target-i386/machine.c @@ -315,13 +315,13 @@ static int cpu_post_load(void *opaque, int version_id) env->hflags &= ~HF_CPL_MASK; env->hflags |= (env->segs[R_SS].flags >> DESC_DPL_SHIFT) & HF_CPL_MASK; - /* XXX: restore FPU round state */ env->fpstt = (env->fpus_vmstate >> 11) & 7; env->fpus = env->fpus_vmstate & ~0x3800; env->fptag_vmstate ^= 0xff; for(i = 0; i < 8; i++) { env->fptags[i] = (env->fptag_vmstate >> i) & 1; } + update_fp_status(env); cpu_breakpoint_remove_all(cs, BP_CPU); cpu_watchpoint_remove_all(cs, BP_CPU); |