RISCV: Preserve dots in mnemonics for name2id() lookup#91
Merged
Rot127 merged 2 commits intocapstone-engine:auto-sync-18from Apr 8, 2026
Merged
Conversation
2 tasks
Rot127
approved these changes
Apr 7, 2026
Collaborator
|
@moste00 Please take a look. |
moste00
reviewed
Apr 7, 2026
| if (Target.getName().equals_insensitive("PPC")) | ||
| ReplaceDotInMnemonic = false; | ||
| else if (Target.getName().equals_insensitive("RISCV")) | ||
| ReplaceDotInMnemonic = false; |
Contributor
There was a problem hiding this comment.
Could simply do bool ReplaceDotInMnemonic = Target.getName().equals_insensitive("PPC") || Target.getName().equals_insensitive("RISCV")
Contributor
Author
There was a problem hiding this comment.
Hi @moste00, I thought it might be better if more architectures get added to this if-else. Anyway, I'll change it. Is this how you meant:
bool ReplaceDotInMnemonic =
!(Target.getName().equals_insensitive("PPC") ||
Target.getName().equals_insensitive("RISCV"));
Contributor
There was a problem hiding this comment.
Yeah I meant that, sorry I got confused and forgot the = false part.
Contributor
|
Looks good, please add a depends-on clause on the other PR (the capstone one having the generated |
Rot127
approved these changes
Apr 8, 2026
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.
This is needed for mnemonics that contain a dot when
map_set_alias_id()callsname2id()for matching. Aliases with a dot in their name would not match the mnemonic from RISCVGenCSAliasMnemMap.inc (e.g.,cv.mulhhu != cv_mulhhu).Capstone issue: capstone-engine/capstone#2861