diff --git a/3rdparty/softfloat3/bochs_ext/fpatan.c b/3rdparty/softfloat3/bochs_ext/fpatan.c index 88bced6bbd3..27ee41feddf 100644 --- a/3rdparty/softfloat3/bochs_ext/fpatan.c +++ b/3rdparty/softfloat3/bochs_ext/fpatan.c @@ -324,3 +324,8 @@ extFloat80_t extFloat80_68katan(extFloat80_t a) { return extFloat80_atan(a, floatx80_one); } + +int extFloat80_is_nan(extFloat80_t a) +{ + return ((a.signExp & 0x7FFF) == 0x7FFF) && (int64_t)(a.signif << 1); +} diff --git a/3rdparty/softfloat3/bochs_ext/softfloat3_ext.h b/3rdparty/softfloat3/bochs_ext/softfloat3_ext.h index b6f560bb45a..a12675901bc 100644 --- a/3rdparty/softfloat3/bochs_ext/softfloat3_ext.h +++ b/3rdparty/softfloat3/bochs_ext/softfloat3_ext.h @@ -4,6 +4,7 @@ int extFloat80_sincos(extFloat80_t a, extFloat80_t *sin_a, extFloat80_t *cos_a); int extFloat80_sin(extFloat80_t &a); int extFloat80_cos(extFloat80_t &a); int extFloat80_tan(extFloat80_t &a); +int extFloat80_is_nan(extFloat80_t a); extFloat80_t extFloat80_atan(extFloat80_t a, extFloat80_t b); extFloat80_t extFloat80_68katan(extFloat80_t a); extFloat80_t extFloat80_getman(extFloat80_t a); diff --git a/src/devices/cpu/m68000/m68kfpu.cpp b/src/devices/cpu/m68000/m68kfpu.cpp index 76c5c2dd8ad..93cc6012e46 100644 --- a/src/devices/cpu/m68000/m68kfpu.cpp +++ b/src/devices/cpu/m68000/m68kfpu.cpp @@ -293,7 +293,7 @@ void m68000_musashi_device::set_condition_codes(extFloat80_t reg) } // NaN flag - if (extF80_isSignalingNaN(reg)) + if (extFloat80_is_nan(reg)) { m_fpsr |= FPCC_NAN; } @@ -1418,15 +1418,15 @@ void m68000_musashi_device::fpgen_rm_reg(u16 w2) default: fatalerror("fmove_rm_reg: invalid source specifier %x at %08X\n", src, m_pc-4); } - LOGMASKED(LOG_LOADSTORE, "Load source type %d = %f\n", src, fx80_to_double(source)); + LOGMASKED(LOG_LOADSTORE, "Load source type %d = %f (PC=%08x)\n", src, fx80_to_double(source), m_ppc); } else { source = m_fpr[src]; - LOGMASKED(LOG_LOADSTORE, "Load source from FPR %d = %f\n", src, fx80_to_double(source)); + LOGMASKED(LOG_LOADSTORE, "Load source from FPR %d = %f (PC=%08x)\n", src, fx80_to_double(source), m_ppc); } - LOGMASKED(LOG_INSTRUCTIONS, "FPU: opmode %02x (PC=%08x)\n", opmode, m_pc); + LOGMASKED(LOG_INSTRUCTIONS, "FPU: opmode %02x (PC=%08x)\n", opmode, m_ppc); const extFloat80_t dstCopy = m_fpr[dst]; if (opmode != 0) {