FILD with MOD 3 now correctly behaves like FFREEP (undocumented behavior).

This commit is contained in:
OBattler
2016-08-09 03:42:32 +02:00
parent 8a588dcc82
commit e6553975da
2 changed files with 17 additions and 0 deletions

View File

@@ -3,6 +3,10 @@ static int opFILDiw_a16(uint32_t fetchdat)
int16_t temp;
FP_ENTER();
fetch_ea_16(fetchdat);
if (mod == 3)
{
return opFFREEP(fetchdat)
}
if (fplog) pclog("FILDw %08X:%08X\n", easeg, eaaddr);
temp = geteaw(); if (abrt) return 1;
if (fplog) pclog(" %f\n", (double)temp);
@@ -15,6 +19,10 @@ static int opFILDiw_a32(uint32_t fetchdat)
int16_t temp;
FP_ENTER();
fetch_ea_32(fetchdat);
if (mod == 3)
{
return opFFREEP(fetchdat)
}
if (fplog) pclog("FILDw %08X:%08X\n", easeg, eaaddr);
temp = geteaw(); if (abrt) return 1;
if (fplog) pclog(" %f\n", (double)temp);

View File

@@ -50,6 +50,15 @@ static int opFFREE(uint32_t fetchdat)
return 0;
}
static int opFFREEP(uint32_t fetchdat)
{
if (fplog) pclog("FFREEP\n");
tag[(TOP + fetchdat) & 7] = 3; if (abrt) return 1;
x87_pop();
CLOCK_CYCLES(3);
return 0;
}
static int opFST(uint32_t fetchdat)
{
FP_ENTER();