dolphin/Source/Core/Core/PowerPC/Interpreter
Geotale 2f45391ca5 Improve Integer Rounding Accuracy
Changes integer rounding to more closely meet the documentation
The documentation explains to round before doing any bounds checks
All this really does is make sure some exception bits won't be set wrong
This depends on the rounding mode, fixing cases such as:
- Round to even, (0x7fffffff, 0x7fffffff.8)
- Round to down, (0x7fffffff, 0x80000000)

This change also uses some standard functions for rounding
Previously using them was casting to an s32 directly, now keeps the f64
RoundToIntegerMode introduced due to roundeven not being part of C++17

Finally, it can change a >0x7fffffff to >=0x80000000, done because:
- It looks nicer now with integers (I liked 0s)
- It gives ever so slightly better codegen on Aarch64

Co-Authored-By: JosJuice <josjuice@gmail.com>
2024-09-03 11:17:24 -05:00
..
ExceptionUtils.h Interpreter: Remove remaining System::GetInstance() and global ppcState. 2023-03-24 21:58:41 +01:00
Interpreter_Branch.cpp Interpreter: Install BranchWatch 2024-02-26 19:38:27 -08:00
Interpreter_FloatingPoint.cpp Improve Integer Rounding Accuracy 2024-09-03 11:17:24 -05:00
Interpreter_FPUtils.h Replace Common::BitCast with std::bit_cast 2024-05-03 18:43:51 -07:00
Interpreter_Integer.cpp Interpreter: Fix GT when setting SO of CR 2024-05-24 21:21:46 +02:00
Interpreter_LoadStore.cpp PPCCache: Avoid Global System Accessor 2024-04-08 19:49:57 -07:00
Interpreter_LoadStorePaired.cpp Replace Common::BitCast with std::bit_cast 2024-05-03 18:43:51 -07:00
Interpreter_Paired.cpp Interpreter: Remove remaining System::GetInstance() and global ppcState. 2023-03-24 21:58:41 +01:00
Interpreter_SystemRegisters.cpp PPCCache: Avoid Global System Accessor 2024-04-08 19:49:57 -07:00
Interpreter_Tables.cpp Interpreter: Pass Interpreter to CPU instruction functions. 2023-03-19 03:05:11 +01:00
Interpreter.cpp Debugger: Small other cleanup 2024-07-02 18:29:42 +02:00
Interpreter.h PPCSymbolDB: Move instance to PowerPCManager 2024-03-13 22:58:14 -07:00