Permalink
Browse files

Interpreter_FloatingPoint: Clear FPSCR.FI and FPSCR.FR in invalid ope…

…ration cases

As explained within 179d73a, the table
within the Programming Environments Manual for PowerPC lists the FI and
FR bits as cleared for invalid operation cases. So, we amend the
relevant cases here in order to be accurate to hardware.
  • Loading branch information...
lioncash committed Jun 2, 2018
1 parent b71a9e6 commit 21add26b71c8af145dfe472dbd215df475c6cb57
Showing with 4 additions and 0 deletions.
  1. +4 −0 Source/Core/Core/PowerPC/Interpreter/Interpreter_FloatingPoint.cpp
@@ -432,6 +432,8 @@ void Interpreter::frsqrtex(UGeckoInstruction inst)
if (b < 0.0)
{
SetFPException(FPSCR_VXSQRT);
FPSCR.FI = 0;
FPSCR.FR = 0;
if (FPSCR.VE == 0)
compute_result(b);
@@ -446,6 +448,8 @@ void Interpreter::frsqrtex(UGeckoInstruction inst)
else if (Common::IsSNAN(b))
{
SetFPException(FPSCR_VXSNAN);
FPSCR.FI = 0;
FPSCR.FR = 0;
if (FPSCR.VE == 0)
compute_result(b);

0 comments on commit 21add26

Please sign in to comment.