diff options
| author | Lioncash <mathew1800@gmail.com> | 2018-06-01 19:05:43 -0400 |
|---|---|---|
| committer | Lioncash <mathew1800@gmail.com> | 2018-06-01 20:21:13 -0400 |
| commit | 179d73ac0d2873ebf2dedd7a4069ea5ded4a66f1 (patch) | |
| tree | bac2e65eff10da641c4942e95a4c30a07c4ec1a0 /Source/Core | |
| parent | a08ad82ace064f961b13369c96a0f3b48ca7ca5c (diff) | |
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.
Diffstat (limited to 'Source/Core')
| -rw-r--r-- | Source/Core/Core/PowerPC/Interpreter/Interpreter_FloatingPoint.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Source/Core/Core/PowerPC/Interpreter/Interpreter_FloatingPoint.cpp b/Source/Core/Core/PowerPC/Interpreter/Interpreter_FloatingPoint.cpp index 5578a4b9bb..91504ede1a 100644 --- a/Source/Core/Core/PowerPC/Interpreter/Interpreter_FloatingPoint.cpp +++ b/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); |
