XenonRecomp
XenonRecomp copied to clipboard
Addressing multiple TODO's since no one else did
-
test_recompiler.cpp:216 - Implement CR register checking
- Added proper CR register validation that checks all 4 fields (lt, gt, eq, so)
- Each field is extracted from the 4-bit CR value using bit shifts
-
recompiler.h:55 - Create RecompileArgs struct
- Introduced RecompileArgs struct to encapsulate the 7 function parameters
- Improves code maintainability and reduces function signature complexity
- Updated function signature and call site accordingly
-
recompiler.cpp:366 - Add bounds checking for mmioStore
- Added validation to ensure the next instruction (data + 1) is within function bounds
- Prevents potential out-of-bounds memory access
-
recompiler.cpp:1258 - Fix MFOCRF hardcoded CR field
- Implemented proper FXM field mask decoding to determine which CR field to read
- Removed hardcoded cr6 and now dynamically selects the correct CR field (cr0-cr7)
- FXM is decoded as an 8-bit mask where bit 0 (0x80) = cr0, bit 1 (0x40) = cr1, etc.