Permalink
Browse files

Interpreter_FloatingPoint: Clear FPSCR.FI and FPSCR.FR if an SNaN is …

…an input to fres

In the PEM manual, within Table 3-12, which lists what should occur for
invalid operation exceptions, the FPSCR.FI and FPSCR.FR bits are listed
as "Cleared" for when FPSCR.VE is unset and set. So we clear these bits
as well to match hardware behavior.
  • Loading branch information...
lioncash committed Jun 1, 2018
1 parent a08ad82 commit 179d73ac0d2873ebf2dedd7a4069ea5ded4a66f1
Showing with 2 additions and 0 deletions.
  1. +2 −0 Source/Core/Core/PowerPC/Interpreter/Interpreter_FloatingPoint.cpp
@@ -404,6 +404,8 @@ void Interpreter::fresx(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 179d73a

Please sign in to comment.