-
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
Architecture updater (auto-sync) - Updating AArch64 #2026
Conversation
@kabeor @aquynh @XVilka Any objections against renaming LLVM refers to it as |
@Rot127 Not at all. However, do this mean that users need change their code if they update from v4? (Maybe alias for arm64_xxx like functions needed?) |
Yes. Everything which was hand edited in Capstone uses If we decide to use The decision is basically: Change to Pro: Saves users to trouble to update their code. Use The other way around. Edit: Personally I would still like to go the |
No objections against renaming |
@kabeor If there is not a really strong argument for capitalized target names in identifiers, I would like to revert this commit (capstone-engine/llvm-capstone@cef9d8a). |
@FinnWilkinson While updating typedef struct aarch64_op_sme {
aarch64_sme_op_type type; ///< AArch64_SME_OP_TILE, AArch64_SME_OP_TILE_VEC, AArch64_SME_OP_ACC_MATRIX
aarch64_reg tile; ///< Matrix tile register
aarch64_reg slice_reg; ///< slice index reg
uint8_t slice_offset; ///< slice index offset
} aarch64_op_sme; The
Could you quickly give a thumbs up if this makes sense? |
Please rebase on top of the latest |
Do it after PPC is in a more polished state (in a few days). |
5aeddb1
to
7aa6a49
Compare
ea4721a
to
daf9d88
Compare
@kabeor @aquynh The disassembler tests run through so far and every possible instruction was decoded at least once without segfault. Going to continue with Rizin integration now, which will test the details set (CI still fails because of the yet unfixed |
230a257
to
0f4161d
Compare
32ac360
to
eaf4c01
Compare
@Rot127 Appologies that I haven't seen this sooner... I've been watching this PR for a while and have completely missed this. This looks good yes for SME. I presume that for SME2's new multi-vector operations & vector-groups this is encoded into the instruction enum rather than neededing to be another field of the |
@FinnWilkinson Currently we can not distinguish between But we can add the property easily by checking the LLVM instr. id in Capstone and set a flag somewhere. The vector groups seem more a property of the matrix operand. Hence, I would prefer adding a new field to the |
- Do not generate constants automatically (dscript is way too buggy). - Update printing of details.
@kabeor @aquynh I open this now for review so you have enough time. There are still minor things left. Mostly syntax changes in the Python tests (hence the failing tests) and some naming problems (the failing fuzz test). I will run the complete instruction space once through it in the next days to check for segfaults again. But generally the I'll add the encoding after this is merged. Since this is already huge. |
a45848c
to
f5918ae
Compare
09321bd
to
060e808
Compare
…an memory operand wihtout base.
We fix it here by simply getting the immediate as the printing code does.
|
Will merge it this weekend:) |
@Rot127 LGTM, can you make a warning to ask them to upgrade their code when people who are still calling arm64xxx? Will merge after that. |
@kabeor Where would you add such a warning? |
I think such a warning, if necessary, should be done in a separate PR |
Well I mean a warning comes from code. For example, if a user directly upgrades to v6 without reading the documentation, when he still calls the previous code (containing arm64 API), the code should return a warning and stop running. It's ok to be done in a separate PR, can I assign this to you? @Rot127 And please confirm, if there is nothing still being done in this PR, I will merge now. |
You can merge.
Since we changed all the names, people wouldn't be able to build Capstone. Or are you speaking of prebuilds? In the latter case yes sure. For But this is also why I think we should make some kind of pre-release. So everyone is aware and knows the details. |
Cool, merged! |
Draft PR for the auto-sync refactor of AArch64.
td
filesza
writes are not listed in register write listFix ARM Disassembler to set Decoder argDo during LLVM 17 updateAArch64_GRP_PRIVILEGE
againprintSyspAlias
printSysAlias
ID: 73 (bfmlalb{)
'A0 4D DF 4C'
op 4 missing0x21c8df4d
disp missing.#0
imm for'\x20\x98\xe0\x5e'
3000df4c
Todo after merge
HelperMethods.py
toHelpers.py
.Decoder
pointer arg must be added to ARM, PPC, TriCore.CS_OP_MEM_REG
andCS_OP_MEM_IMM
op types to prevent confusion that theCS_OP_MEM
is a flag within the type.CAPSTONE_DIET
builds into allprintOperand()
functions.bfc
alias.Breaking changes
ARM64
->AArch64
(for filenames, enums variable names). Necessary to be consistent with LLVM.SME
operands changed (contin more detail, terminology is closer to the docs).Closes
closes #1857
closes #1853
closes #1854
closes #1876 (matches LLVM disassembly now, which is considered source of truth).
closes #1881
closes #1887
closes #1890
closes #1895
closes #1953
closes #2055
closes #2072
closes #2130
closes #1842
closes #1760
closes #1670
closes #1669
closes #1652
closes #1629
closes #1621
closes #1620
closes #1591
wait for discussion: #1889