#define __USE_ISOC9X /* We might be able to pick up a NaN */
#define FPU_TEST 0
+#define FPU_LOG 0
#include <math.h>
#include <float.h>
if (fp_exception_pending(true))
return;
-
regs.fp_exception = false;
-#if DEBUG_FPP
- if (!isinrom ())
- write_log (_T("fdbcc_opp at %08x\n"), m68k_getpc ());
+
+#if FPU_LOG
+ write_log(_T("FDBcc %04x %04x %08x\n"), opcode, extra, M68K_GETPC);
#endif
+
if (fault_if_no_6888x (opcode, extra, pc - 4))
return;
if (fp_exception_pending(true))
return;
-
regs.fp_exception = false;
-#if DEBUG_FPP
- if (!isinrom ())
- write_log (_T("fscc_opp at %08x\n"), m68k_getpc ());
+
+#if FPU_LOG
+ write_log(_T("FScc %04x %04x %08x\n"), opcode, extra, M68K_GETPC);
#endif
if (fault_if_no_6888x (opcode, extra, pc))
if (fp_exception_pending(true))
return;
-
regs.fp_exception = false;
-#if DEBUG_FPP
- if (!isinrom ())
- write_log (_T("ftrapcc_opp at %08x\n"), m68k_getpc ());
+
+#if FPU_LOG
+ write_log(_T("FTRAPcc %04x %04x %08x\n"), opcode, extra, M68K_GETPC);
#endif
+
if (fault_if_no_fpu_u (opcode, extra, 0, oldpc))
return;
if (fp_exception_pending(true))
return;
-
regs.fp_exception = false;
-#if DEBUG_FPP
- if (!isinrom ())
- write_log (_T("fbcc_opp at %08x\n"), m68k_getpc ());
+
+#if FPU_LOG
+ write_log(_T("FBcc %04x %04x %08x\n"), opcode, extra, M68K_GETPC);
#endif
+
if (fault_if_no_fpu (opcode, extra, 0, oldpc - 2))
return;
uaecptr pc = m68k_getpc () - 2;
int i;
- regs.fp_exception = false;
-#if DEBUG_FPP
- if (!isinrom ())
- write_log (_T("fsave_opp at %08x\n"), m68k_getpc ());
+
+#if FPU_LOG
+ if (!isinrom())
+ write_log(_T("FSAVE %04x %08x\n"), opcode, M68K_GETPC);
#endif
+ regs.fp_exception = false;
+
if (fault_if_no_6888x (opcode, 0, pc))
return;
regs.fp_exception = false;
-#if DEBUG_FPP
- if (!isinrom ())
- write_log (_T("frestore_opp at %08x\n"), m68k_getpc ());
+#if FPU_LOG
+ if (!isinrom())
+ write_log (_T("FRESTORE %04x %08x\n"), opcode, M68K_GETPC);
#endif
if (fault_if_no_6888x (opcode, 0, pc))
regs.fpu_state = 1;
regs.fp_exception = false;
fpu_mmu_fixup = false;
+#if FPU_LOG
+ write_log(_T("FPUOP %04x %04x PC=%08x\n"), opcode, extra, M68K_GETPC);
+#endif
fpuop_arithmetic2 (opcode, extra);
if (fpu_mmu_fixup) {
mmufixup[0].reg = -1;