FILD with MOD 3 now correctly behaves like FFREEP (undocumented behavior).
This commit is contained in:
@@ -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);
|
||||
|
@@ -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();
|
||||
|
Reference in New Issue
Block a user