Conversation
Align Special2 decoding with fhi_flo, implement VCLIPw/VABS, and fix field variants (VADDx/VSUBx/VMULx). Keep C++17 compatibility by replacing unordered_set::contains and remove dead ADDIU return. Update Special2 metadata for VWAITQ.
| "SifSetDChain"}; | ||
|
|
||
| if (systemCallNames.contains(function.name)) | ||
| if (systemCallNames.find(function.name) != systemCallNames.end()) |
| inst.modificationInfo.modifiesVFR = false; | ||
| inst.modificationInfo.modifiesVIR = true; | ||
| } | ||
| if (vu_func == VU0_S2_VMFIR) |
There was a problem hiding this comment.
this was remove in favor of line 817 ?
|
Restored C++20 compatibility |
|
Nice I will take some time to review this, I'm weak with vu instructions |
|
@xms0g can you help review? |
Not familiar with VU instructions but I'll check it out |
|
I think you broke the one decoder instruction: |
I'll check that in the following days. Thanks for pointing that out! |
The VDIV test was placing VU0_S2_VDIV (0x38) directly in the func field, but Special2 decoding requires function >= 0x3C. Now it properly encodes fhi/flo bits, so the decoder recognizes it as a Special2 op. Every test (34/34) is now passing. I also added a missing |
Summary
This PR introduces several improvements and fixes to the VU0 instruction handling:
Decoding and Instruction Alignment
fhi_flofield, matching Rabbitizers implementation for better compatibilityNew Features
VCLIPwinstruction with its clip-flag FIFO bufferVABSinstructionBug Fixes
VADDx,VSUBx,VMULx) to properly broadcast the specified componentft[n]across the vector operationunordered_set::containscalls incode_generator.cppwith C++17-compatible alternatives -> might consider migrating to C++20 but requires a thorough revisionADDIUreturn statementVWAITQinstructionImportant Notes
VWAITQcurrently operates as a no-op in the runtime model and may require additional validation in future updatesVCLIPwclip flags follow a specific ordering: x-, x+, y-, y+, z-, z+, stored in a 24-bit FIFO bufferTesting Status: Tests have not been run yet