M68k: Add more conditionals and FGETEXP instruction [R. Belmont]

This commit is contained in:
R. Belmont 2010-09-21 02:25:21 +00:00
parent 79aab2108b
commit 2e11d3dc96

View File

@ -314,6 +314,18 @@ INLINE int TEST_CONDITION(m68ki_cpu_core *m68k, int condition)
case 0x15:
case 0x05: return (z || (n && !nan)); // Less Than or Equal
case 0x16:
case 0x06: return !nan && !z;
case 0x17:
case 0x07: return !nan;
case 0x18:
case 0x08: return nan;
case 0x19:
case 0x09: return nan || z;
case 0x1a:
case 0x0a: return (nan || !(n || z)); // Not Less Than or Equal
@ -1182,6 +1194,17 @@ static void fpgen_rm_reg(m68ki_cpu_core *m68k, UINT16 w2)
m68k->remaining_cycles -= 3;
break;
}
case 0x1e: // FGETEXP
{
floatx80 temp = source;
INT16 temp2;
temp2 = source.high; // get the exponent
temp2 -= 0x3fff; // take off the bias
REG_FP[dst] = double_to_fx80((double)temp2);
SET_CONDITION_CODES(m68k, REG_FP[dst]);
m68k->remaining_cycles -= 6;
}
case 0x20: // FDIV
{
REG_FP[dst] = floatx80_div(REG_FP[dst], source);