Re-added FCOMPP 80387 detection hack accidentally removed in FPU reorganisation.

This commit is contained in:
TomW 2014-11-17 20:23:29 +00:00
commit aecf865c2c

View file

@ -159,8 +159,12 @@ static int opFCOMPP(uint32_t fetchdat)
pc++;
if (fplog) pclog("FCOMPP\n");
npxs &= ~(C0|C2|C3);
if (ST(0) == ST(1)) npxs |= C3;
else if (ST(0) < ST(1)) npxs |= C0;
if (*(uint64_t *)&ST(0) == ((uint64_t)1 << 63) && *(uint64_t *)&ST(1) == 0)
npxs |= C0; /*Nasty hack to fix 80387 detection*/
else if (ST(0) == ST(1))
npxs |= C3;
else if (ST(0) < ST(1))
npxs |= C0;
x87_pop();
x87_pop();
CLOCK_CYCLES(4);