mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-08-06 16:04:42 +02:00
Merge pull request #6966 from lioncash/fmul
Interpreter_FPUtils: Set FPSCR.VXSNAN if either operand to NI_mul() is a signaling NaN
This commit is contained in:
@@ -94,13 +94,17 @@ inline double MakeQuiet(double d)
|
|||||||
|
|
||||||
inline double NI_mul(double a, double b)
|
inline double NI_mul(double a, double b)
|
||||||
{
|
{
|
||||||
double t = a * b;
|
const double t = a * b;
|
||||||
if (std::isnan(t))
|
if (std::isnan(t))
|
||||||
{
|
{
|
||||||
|
if (Common::IsSNAN(a) || Common::IsSNAN(b))
|
||||||
|
SetFPException(FPSCR_VXSNAN);
|
||||||
|
|
||||||
if (std::isnan(a))
|
if (std::isnan(a))
|
||||||
return MakeQuiet(a);
|
return MakeQuiet(a);
|
||||||
if (std::isnan(b))
|
if (std::isnan(b))
|
||||||
return MakeQuiet(b);
|
return MakeQuiet(b);
|
||||||
|
|
||||||
SetFPException(FPSCR_VXIMZ);
|
SetFPException(FPSCR_VXIMZ);
|
||||||
return PPC_NAN;
|
return PPC_NAN;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user