aboutsummaryrefslogtreecommitdiff
path: root/target-i386/cpu.c
diff options
context:
space:
mode:
authorPavel Dovgalyuk <Pavel.Dovgaluk@ispras.ru>2014-09-17 12:05:19 +0400
committerPaolo Bonzini <pbonzini@redhat.com>2014-09-18 17:06:12 +0200
commit5bde14078d181439a1170094d7774372242ab739 (patch)
tree99535a4249042c14262d08f32569c424a7fd7621 /target-i386/cpu.c
parent7dbb4c49bfa60b92251a97ddda2c3cdace6b73e4 (diff)
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/cpu.c')
-rw-r--r--target-i386/cpu.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/target-i386/cpu.c b/target-i386/cpu.c
index 90d0a05eb1..25e74b08d9 100644
--- a/target-i386/cpu.c
+++ b/target-i386/cpu.c
@@ -2580,7 +2580,7 @@ static void x86_cpu_reset(CPUState *s)
for (i = 0; i < 8; i++) {
env->fptags[i] = 1;
}
- env->fpuc = 0x37f;
+ cpu_set_fpuc(env, 0x37f);
env->mxcsr = 0x1f80;
env->xstate_bv = XSTATE_FP | XSTATE_SSE;