diff options
Diffstat (limited to 'src/emu/cpu/m68000/m68kfpu.inc')
-rw-r--r-- | src/emu/cpu/m68000/m68kfpu.inc | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/src/emu/cpu/m68000/m68kfpu.inc b/src/emu/cpu/m68000/m68kfpu.inc index e9f0140264b..47f39d8c4fb 100644 --- a/src/emu/cpu/m68000/m68kfpu.inc +++ b/src/emu/cpu/m68000/m68kfpu.inc @@ -2166,3 +2166,32 @@ void m68040_fpu_op1(m68000_base_device *m68k) default: fatalerror("m68040_fpu_op1: unimplemented op %d at %08X\n", (m68k->ir >> 6) & 0x3, REG_PC(m68k)-2); } } + +void m68881_ftrap(m68000_base_device *m68k) +{ + UINT16 w2 = OPER_I_16(m68k); + + // now check the condition + if (TEST_CONDITION(m68k, w2 & 0x3f)) + { + // trap here + m68ki_exception_trap(m68k, EXCEPTION_TRAPV); + } + else // fall through, requires eating the operand + { + switch (m68k->ir & 0x7) + { + case 2: // word operand + OPER_I_16(m68k); + break; + + case 3: // long word operand + OPER_I_32(m68k); + break; + + case 4: // no operand + break; + } + } +} + |