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/gdbstub.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'target-i386/gdbstub.c') diff --git a/target-i386/gdbstub.c b/target-i386/gdbstub.c index 19fe9ad..ff99cfb 100644 --- a/target-i386/gdbstub.c +++ b/target-i386/gdbstub.c @@ -203,7 +203,7 @@ int x86_cpu_gdb_write_register(CPUState *cs, uint8_t *mem_buf, int n) return x86_cpu_gdb_load_seg(cpu, R_GS, mem_buf); case IDX_FP_REGS + 8: - env->fpuc = ldl_p(mem_buf); + cpu_set_fpuc(env, ldl_p(mem_buf)); return 4; case IDX_FP_REGS + 9: tmp = ldl_p(mem_buf); -- cgit v1.1