From 5bde14078d181439a1170094d7774372242ab739 Mon Sep 17 00:00:00 2001 From: Pavel Dovgalyuk Date: Wed, 17 Sep 2014 12:05:19 +0400 Subject: 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 Signed-off-by: Paolo Bonzini Signed-off-by: Pavel Dovgalyuk --- target-i386/cpu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'target-i386/cpu.c') diff --git a/target-i386/cpu.c b/target-i386/cpu.c index 90d0a05..25e74b0 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; -- cgit v1.1