Interpreter_FloatingPoint: Set FPSCR.VXSNAN if the input to frsqrte is a signaling NaN

If the input is a signaling NaN, then we need to signal that via setting
the FPSCR.VXSNAN bit. We also shouldn't update the FPRF flags if
FPSCR.VE is set.
This commit is contained in:
Lioncash committed 2018-05-24 14:37:09 -04:00
1 parent 31504f85a7
commit 155bcb1649
1 file changed
+7
@@ -427,6 +427,13 @@ void Interpreter::frsqrtex(UGeckoInstruction inst)
if (FPSCR.ZE == 0)
PowerPC::UpdateFPRF(result);
}
else if (Common::IsSNAN(b))
{
SetFPException(FPSCR_VXSNAN);
if (FPSCR.VE == 0)
PowerPC::UpdateFPRF(result);
}
else
{
PowerPC::UpdateFPRF(result);