Browse files

Interpreter_FPUtils: Set FPSCR.VXSNAN if either operand to NI_add() i…

…s a signaling NaN

This corrects VXSNAN flag setting for fadd, fadds, ps_add, ps_sum0, and ps_sum1
  • Loading branch information...
lioncash committed May 26, 2018
1 parent f568e41 commit 054c1b32eb4bbde226de6fd70c70c25bd0cf5535
Showing with 7 additions and 1 deletion.
  1. +7 −1 Source/Core/Core/PowerPC/Interpreter/Interpreter_FPUtils.h
@@ -137,16 +137,22 @@ inline double NI_div(double a, double b)
inline double NI_add(double a, double b)
double t = a + b;
const double t = a + b;
if (std::isnan(t))
if (Common::IsSNAN(a) || Common::IsSNAN(b))
if (std::isnan(a))
return MakeQuiet(a);
if (std::isnan(b))
return MakeQuiet(b);
return PPC_NAN;
return t;

0 comments on commit 054c1b3

Please sign in to comment.