mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 06:09:50 -06:00
Interpreter_FloatingPoint: Set FPSCR.VXSNAN if input to fres is a signaling NaN
fres is defined as having the VXSNAN bit set if an input to the instruction is a signaling NaN
This commit is contained in:
@ -394,7 +394,7 @@ void Interpreter::fdivsx(UGeckoInstruction inst)
|
|||||||
// Single precision only.
|
// Single precision only.
|
||||||
void Interpreter::fresx(UGeckoInstruction inst)
|
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);
|
rPS0(inst.FD) = rPS1(inst.FD) = Common::ApproximateReciprocal(b);
|
||||||
|
|
||||||
if (b == 0.0)
|
if (b == 0.0)
|
||||||
@ -402,6 +402,11 @@ void Interpreter::fresx(UGeckoInstruction inst)
|
|||||||
SetFPException(FPSCR_ZX);
|
SetFPException(FPSCR_ZX);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (Common::IsSNAN(b))
|
||||||
|
{
|
||||||
|
SetFPException(FPSCR_VXSNAN);
|
||||||
|
}
|
||||||
|
|
||||||
PowerPC::UpdateFPRF(rPS0(inst.FD));
|
PowerPC::UpdateFPRF(rPS0(inst.FD));
|
||||||
|
|
||||||
if (inst.Rc)
|
if (inst.Rc)
|
||||||
|
Reference in New Issue
Block a user