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.
ran-j
requested changes
Feb 6, 2026
| sanitized.reserve(name.size() + 1); | ||
|
|
||
| for (char c : name) | ||
| { |
Owner
There was a problem hiding this comment.
we use cpp stander 20 so almost all of thouse changes are wrong.
| std::string targetAction; | ||
| std::string funcName = getFunctionName(target); | ||
| bool isInternalTarget = internalTargets.contains(target); | ||
| bool isInternalTarget = internalTargets.find(target) != internalTargets.end(); |
| "SifSetDChain"}; | ||
|
|
||
| if (systemCallNames.contains(function.name)) | ||
| if (systemCallNames.find(function.name) != systemCallNames.end()) |
| const Instruction &inst = instructions[i]; | ||
|
|
||
| if (internalTargets.contains(inst.address)) | ||
| if (internalTargets.find(inst.address) != internalTargets.end()) |
| const Instruction &delaySlot = instructions[i + 1]; | ||
|
|
||
| if (internalTargets.contains(delaySlot.address)) | ||
| if (internalTargets.find(delaySlot.address) != internalTargets.end()) |
| switch (vu_func) | ||
| uint8_t vu_fhi_flo = (uint8_t)((((inst.raw >> 6) & 0x1F) << 2) | (inst.raw & 0x3)); | ||
|
|
||
| // Special2: fhi_flo field (see RabbitizerInstructionR5900.h) |
| inst.modificationInfo.modifiesVFR = false; | ||
| inst.modificationInfo.modifiesVIR = true; | ||
| } | ||
| if (vu_func == VU0_S2_VMFIR) |
Owner
There was a problem hiding this comment.
this was remove in favor of line 817 ?
Author
|
Restored C++20 compatibility |
Owner
|
Nice I will take some time to review this, I'm weak with vu instructions |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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