mirror of
https://github.com/ptitSeb/box64.git
synced 2024-12-04 07:13:41 +08:00
Fixed status of C2 x87 flags after sin, cos, sincos and tan function ([DYNAREC] too) (thank @icecream95 for the debugging on box86)
This commit is contained in:
parent
36e5fb50ec
commit
607bb28677
@ -52,6 +52,7 @@ void arm_fyl2x(x64emu_t* emu)
|
|||||||
void arm_ftan(x64emu_t* emu)
|
void arm_ftan(x64emu_t* emu)
|
||||||
{
|
{
|
||||||
ST0.d = tan(ST0.d);
|
ST0.d = tan(ST0.d);
|
||||||
|
emu->sw.f.F87_C2 = 0;
|
||||||
}
|
}
|
||||||
void arm_fpatan(x64emu_t* emu)
|
void arm_fpatan(x64emu_t* emu)
|
||||||
{
|
{
|
||||||
@ -80,6 +81,7 @@ void arm_fyl2xp1(x64emu_t* emu)
|
|||||||
void arm_fsincos(x64emu_t* emu)
|
void arm_fsincos(x64emu_t* emu)
|
||||||
{
|
{
|
||||||
sincos(ST1.d, &ST1.d, &ST0.d);
|
sincos(ST1.d, &ST1.d, &ST0.d);
|
||||||
|
emu->sw.f.F87_C2 = 0;
|
||||||
}
|
}
|
||||||
void arm_frndint(x64emu_t* emu)
|
void arm_frndint(x64emu_t* emu)
|
||||||
{
|
{
|
||||||
@ -93,10 +95,12 @@ void arm_fscale(x64emu_t* emu)
|
|||||||
void arm_fsin(x64emu_t* emu)
|
void arm_fsin(x64emu_t* emu)
|
||||||
{
|
{
|
||||||
ST0.d = sin(ST0.d);
|
ST0.d = sin(ST0.d);
|
||||||
|
emu->sw.f.F87_C2 = 0;
|
||||||
}
|
}
|
||||||
void arm_fcos(x64emu_t* emu)
|
void arm_fcos(x64emu_t* emu)
|
||||||
{
|
{
|
||||||
ST0.d = cos(ST0.d);
|
ST0.d = cos(ST0.d);
|
||||||
|
emu->sw.f.F87_C2 = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void arm_fbld(x64emu_t* emu, uint8_t* ed)
|
void arm_fbld(x64emu_t* emu, uint8_t* ed)
|
||||||
|
@ -185,6 +185,7 @@ int RunD9(x64emu_t *emu, rex_t rex)
|
|||||||
case 0xFB: /* FSINCOS */
|
case 0xFB: /* FSINCOS */
|
||||||
fpu_do_push(emu);
|
fpu_do_push(emu);
|
||||||
sincos(ST1.d, &ST1.d, &ST0.d);
|
sincos(ST1.d, &ST1.d, &ST0.d);
|
||||||
|
emu->sw.f.F87_C2 = 0;
|
||||||
break;
|
break;
|
||||||
case 0xFC: /* FRNDINT */
|
case 0xFC: /* FRNDINT */
|
||||||
ST0.d = fpu_round(emu, ST0.d);
|
ST0.d = fpu_round(emu, ST0.d);
|
||||||
@ -196,9 +197,11 @@ int RunD9(x64emu_t *emu, rex_t rex)
|
|||||||
break;
|
break;
|
||||||
case 0xFE: /* FSIN */
|
case 0xFE: /* FSIN */
|
||||||
ST0.d = sin(ST0.d);
|
ST0.d = sin(ST0.d);
|
||||||
|
emu->sw.f.F87_C2 = 0;
|
||||||
break;
|
break;
|
||||||
case 0xFF: /* FCOS */
|
case 0xFF: /* FCOS */
|
||||||
ST0.d = cos(ST0.d);
|
ST0.d = cos(ST0.d);
|
||||||
|
emu->sw.f.F87_C2 = 0;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user