mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-01-28 16:55:31 +01:00
Interpreter_FloatingPoint: Handle QNaNs properly in frsp
Essentially the same behavior as the SNaN path, minus the conditional result and setting of the VXSNAN FPSCR bit.
This commit is contained in:
parent
965b963a6f
commit
a36bf438cd
@ -275,11 +275,14 @@ void Interpreter::frspx(UGeckoInstruction inst) // round to single
|
||||
const double b = rPS0(inst.FB);
|
||||
const double rounded = ForceSingle(b);
|
||||
|
||||
if (MathUtil::IsSNAN(b))
|
||||
if (std::isnan(b))
|
||||
{
|
||||
SetFPException(FPSCR_VXSNAN);
|
||||
const bool is_snan = MathUtil::IsSNAN(b);
|
||||
|
||||
if (FPSCR.VE == 0)
|
||||
if (is_snan)
|
||||
SetFPException(FPSCR_VXSNAN);
|
||||
|
||||
if (!is_snan || FPSCR.VE == 0)
|
||||
{
|
||||
rPS0(inst.FD) = rounded;
|
||||
rPS1(inst.FD) = rounded;
|
||||
|
Loading…
x
Reference in New Issue
Block a user