Repository navigation
[v5] Sparc: decode LDSTUB - #3151
Merged
Merged
Conversation
Contributor
Author
|
Sorry I opened this against |
Rot127
approved these changes
Nov 10, 2026
2 of 3 tasks
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.
Your checklist for this pull request
Detailed description
Follow-up to #3142. On v5, Sparc
ldstubfails to decode:These should be
ldstub [%i0+0x28], %g1andldstub [%i0+%i2], %g1andnextdecodes them correctly. As withldd/std, the v5 decoder table has no entry for it nor does it have an instruction id for it.Resolved by:
decodeMemFallback) now also accepts op3 0x0d, with two new internal opcodes appended after the existing ones.SPARC_INS_LDSTUBwas appended afterSPARC_INS_RETLso no existing id moves.The new id is the only API change, which is why this is separate from #3142. If you'd rather not touch the v5 enum, ldstub could map to an existing id instead (although
cs_insn_namewould then return the wrong name).Test plan
Three lines in
suite/MC/Sparc/sparc-atomic-instructions.s.cswhich fail before this change. The cstest Sparc detail output has no instruction id, so the id is checked with cstool only:Closing issues
None.