diff --git a/src/dynarec/dynarec_arm64_functions.c b/src/dynarec/dynarec_arm64_functions.c index 5a0e1796..12947c94 100755 --- a/src/dynarec/dynarec_arm64_functions.c +++ b/src/dynarec/dynarec_arm64_functions.c @@ -52,6 +52,7 @@ void arm_fyl2x(x64emu_t* emu) void arm_ftan(x64emu_t* emu) { ST0.d = tan(ST0.d); + emu->sw.f.F87_C2 = 0; } void arm_fpatan(x64emu_t* emu) { @@ -80,6 +81,7 @@ void arm_fyl2xp1(x64emu_t* emu) void arm_fsincos(x64emu_t* emu) { sincos(ST1.d, &ST1.d, &ST0.d); + emu->sw.f.F87_C2 = 0; } void arm_frndint(x64emu_t* emu) { @@ -93,10 +95,12 @@ void arm_fscale(x64emu_t* emu) void arm_fsin(x64emu_t* emu) { ST0.d = sin(ST0.d); + emu->sw.f.F87_C2 = 0; } void arm_fcos(x64emu_t* emu) { ST0.d = cos(ST0.d); + emu->sw.f.F87_C2 = 0; } void arm_fbld(x64emu_t* emu, uint8_t* ed) diff --git a/src/emu/x64rund9.c b/src/emu/x64rund9.c index 1a892b25..ee255400 100644 --- a/src/emu/x64rund9.c +++ b/src/emu/x64rund9.c @@ -185,6 +185,7 @@ int RunD9(x64emu_t *emu, rex_t rex) case 0xFB: /* FSINCOS */ fpu_do_push(emu); sincos(ST1.d, &ST1.d, &ST0.d); + emu->sw.f.F87_C2 = 0; break; case 0xFC: /* FRNDINT */ ST0.d = fpu_round(emu, ST0.d); @@ -196,9 +197,11 @@ int RunD9(x64emu_t *emu, rex_t rex) break; case 0xFE: /* FSIN */ ST0.d = sin(ST0.d); + emu->sw.f.F87_C2 = 0; break; case 0xFF: /* FCOS */ ST0.d = cos(ST0.d); + emu->sw.f.F87_C2 = 0; break;