mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-08 02:03:56 -06:00
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>
This commit is contained in:
parent
7dbb4c49bf
commit
5bde14078d
5 changed files with 18 additions and 11 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue