Permalink
Browse files

Interpreter_FloatingPoint: Set FPSCR.VXSNAN if input to fres is a sig…

…naling NaN

fres is defined as having the VXSNAN bit set if an input to the
instruction is a signaling NaN
  • Loading branch information...
lioncash committed May 23, 2018
1 parent 5ac0572 commit 8a79f9099cebad4e4517ed7d89418ac23faef32f
Showing with 6 additions and 1 deletion.
  1. +6 −1 Source/Core/Core/PowerPC/Interpreter/Interpreter_FloatingPoint.cpp
@@ -394,14 +394,19 @@ void Interpreter::fdivsx(UGeckoInstruction inst)
// Single precision only.
void Interpreter::fresx(UGeckoInstruction inst)
{
double b = rPS0(inst.FB);
const double b = rPS0(inst.FB);
rPS0(inst.FD) = rPS1(inst.FD) = Common::ApproximateReciprocal(b);
if (b == 0.0)
{
SetFPException(FPSCR_ZX);
}
if (Common::IsSNAN(b))
{
SetFPException(FPSCR_VXSNAN);
}
PowerPC::UpdateFPRF(rPS0(inst.FD));
if (inst.Rc)

0 comments on commit 8a79f90

Please sign in to comment.