diff options
| author | Mai M <mathew1800@gmail.com> | 2021-05-22 13:07:36 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-05-22 13:07:36 -0400 |
| commit | 031bef0ad97f6f6650fcdc8ec2137d9a984dc218 (patch) | |
| tree | ec7468eb60c89544a516836f791e8bd748497ce7 /Source/Core | |
| parent | 40a47150746a024ad395689d8f1176bd4703beae (diff) | |
| parent | 68a5fc55d2c6ba3bf7645630eedb6a7f722ed540 (diff) | |
Merge pull request #9738 from JosJuice/interpreter-fctiwx
Interpreter: Fix fctiwx rounding
Diffstat (limited to 'Source/Core')
| -rw-r--r-- | Source/Core/Core/PowerPC/Interpreter/Interpreter_FloatingPoint.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Source/Core/Core/PowerPC/Interpreter/Interpreter_FloatingPoint.cpp b/Source/Core/Core/PowerPC/Interpreter/Interpreter_FloatingPoint.cpp index 4efb9b6166..04afcedfed 100644 --- a/Source/Core/Core/PowerPC/Interpreter/Interpreter_FloatingPoint.cpp +++ b/Source/Core/Core/PowerPC/Interpreter/Interpreter_FloatingPoint.cpp @@ -73,7 +73,8 @@ void ConvertToInteger(UGeckoInstruction inst, RoundingMode rounding_mode) const double t = b + 0.5; i = static_cast<s32>(t); - if (t - i < 0 || (t - i == 0 && b > 0)) + // Ties to even + if (t - i < 0 || (t - i == 0 && (i & 1))) { i--; } |
