-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PPC LLVM 18 #2540
PPC LLVM 18 #2540
Conversation
**New** (According to LLVM changelog) - Added DFP instruction. - Added the SCV instruction. **Changes** - Memory decoder were simplified by decoding disponent and base reg separately. - `DFORM` -> `DFORM_BASE` - Use inverted `MCInstDesc` table. - Replace the many declared printer in PPCInstPrinter with `static inlines`. - Renamed groups to upper case. - Switched to `ARCH_add_cs_detail_X()` function names. - Remove `PPCInstPrinter.h` because it is no longer used.
Due to llvm/llvm-project@4b43ef3 the names of the operands were matched. Because FRT dosn't exist in the XForm_1 class, the generated tables didn't decoded them.
Only enables PowerX feature checks of a Power architecture is enabled and the feature is in the list of it.
This helps with copy and search of the byte string in the test files.
@kabeor take a look at this one please |
Huge thanks for doing this. It looks like LLVM is choosing to only implement either an X-form or a D-form of some instructions[1]. It would be nice to have both forms, but that would require manual tracking. Is there a mechanism in the auto-sync importer to do this? I'd be happy to submit a PR for that. [1] See dyninst/dyninst@64cec85 for a few examples based on v3.1C of the standard. |
@hainest Do you have two example byte strings for testing. One in X one in D form? Then I can check how they decode. |
Let me run them through an assembler. I just realized that it might actually be a difference in regular versus extended mnemonics. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Amazing!
@hainest I currently fix some regressions of this one and checked one example from the link you provided. LLVM seemed to implement only the
It would be nice if you open an issue about it, if you find some. |
@hainest Off-topic. But I see your tool also seems to use Capstone quite extensively. If you have any work arounds for buggy instruction details, I would be really happy if you can open issues about it. One issue to collect all of them is fine. |
So sorry, I've been inundated with fixing bugs. I will try to take a look at these over the weekend and get you some more details. I'll open an issue once I have something concrete. |
Yes. I have some x86 instruction semantics that I'd like to add. I have three more instructions to analyze before I'm read to submit them. That said, I am very much in favor of integrating Zydis into Capstone. It's just too much work to keep track of the x86 instructions. I have confirmed that the missing semantics I found are present in Zydis. |
Your checklist for this pull request
Detailed description
New
(According to LLVM changelog)
Changes
MCUpdater
generates shorter and better readable file names.DFORM
->DFORM_BASE
MCInstDesc
table.static inlines
.ARCH_add_cs_detail_X()
function names.PPCInstPrinter.h
because it is no longer used.+aix
Enables AIX OS assembly (only: PowerPC)+booke
Enables BOOKE extension (only: PowerPC)+maix
Enables Modern AIX assembly (only: PowerPC)+msync
Has only the msync instruction instead of sync. Implies BookE. (only: PowerPC)+qpx
Enables QPX extension (only: PowerPC)+ps
Enables PS extension (only: PowerPC)+spe
Enables SPE extension (only: PowerPC)Test plan
Newly added and all green.
Closing issues
...