diff --git a/Source/Core/Core/PowerPC/Interpreter/Interpreter_FPUtils.h b/Source/Core/Core/PowerPC/Interpreter/Interpreter_FPUtils.h index 70e0a01643..01847fbddc 100644 --- a/Source/Core/Core/PowerPC/Interpreter/Interpreter_FPUtils.h +++ b/Source/Core/Core/PowerPC/Interpreter/Interpreter_FPUtils.h @@ -94,13 +94,17 @@ inline double MakeQuiet(double d) inline double NI_mul(double a, double b) { - double t = a * b; + const double t = a * b; if (std::isnan(t)) { + if (Common::IsSNAN(a) || Common::IsSNAN(b)) + SetFPException(FPSCR_VXSNAN); + if (std::isnan(a)) return MakeQuiet(a); if (std::isnan(b)) return MakeQuiet(b); + SetFPException(FPSCR_VXIMZ); return PPC_NAN; }