-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
AArch64 armv9.2 update #1907
AArch64 armv9.2 update #1907
Conversation
Hi, plz check ci result. |
To note - the Python CI tests are segfaulting and failing various tests, despite displaying test pass |
please can you clean up the PR, as it includes a lot of old commits?
|
Yes of course. After fixing the CI test issues, I will squash commits into logical blocks to reduce and clean up the PR. |
One of the failing tests is due to the change made in #1655 being reverted. This was done as it was noticed that access types were not always correct, and I was getting segFaults when using Capstone with an external project. Whilst the fix from #1655 does correct the access types for aliased @kabeor @aquynh please advise on whether the change made in #1655 should be reverted in this PR (and the corresponding test in |
Hi, thanks for your contribution. I think reverting it temporary in your code and report this issue is a good way for now, we can focus on that after merge this pr. |
Appologies for the delay on this PR. I aim to fix the latest CIFuzz error and tidy the commit history this week |
Hi @kabeor, please could the fuzzing tests and other workflows be re-run? Thanks |
Hi, fuzzing test not pass, plz check it:) |
Sorry for the delay, I have re-worked the logic which was causing the address sanitizer error, so hopefully the issue has now been resolved! |
Still failed😢, plz check again. |
make arm64 needs to be performed before AArch64GenRegisterV.inc is generated.
…atting changes in LLVM 14.0.5 tablegen files. - asmwriter.py : As well as new functions, recognition of new SME index printing was added. The printAliasInstr function also required a re-write to match its counter-part and changes in logic in LLVM 14.0.5 - disassemblertables-arch.py : Minor type changes for some functions, as well as adding support for new SME decode functions. - mapping_insn-arch.py : Minor change to correct incorrect instruction aliasing in generated AArch64MappingInsn.inc etc. - registerinfo.py : minor change to reflect change in LLVM 14.0.5 - systemoperand.py : corrected minor type changes made in LLVM 14.0.5 and added extraction of SVCR, BTI, DBnXS lists and encoding functions.
Added new decode functions, mainly for SME matrix operands and SVCR sys register, as well as updating existing decode functions which have seen changes in LLVM 14.0.5. The _getInstruction function has also been updated to its LLVM 14.0.5 counterpart; with a new switch case for adding implicit operands to the relevant SME instructions.
…ural changes and .inc file changes.
14.0.5, and introduced new arm64 operand types. New operand type for svcr MSR/MRS/SMSTART/SMSTOP instructions to facilitate easier cstool printing. New operand type for SME instructions with a matrix register that is indexed.
Implemented new functions present in LLVM 14.0.5 for any new instruction type in Armv9.2; mainly SME / Matrix printing functions. New set_sme_index function added (called from AArch64GenAsmWriter.inc) to correctly add operands to new sme_index operand type. Doing_SME_Index bool added to cs_struct to indicate when operands should be added to sme_index type. Functionality added to support SMSTART/SMSTOP aliases.
Issue 1653 test commented out as the change made for this issue was reverted due to it being incomplete for all instructions. New issue capstone-engine#1911 has been opened to document that the original issue needs re-addressing.
e16e5db
to
f5a633d
Compare
Have solved fuzzing errors and cleaned up the commit history. Please see and let me know if it is all satisfactory! |
Very awesome! Thanks for your great contribution. Merged. |
It appears this PR broke something in the python bindings? #1929 |
The work done is this pull request updates the AArch64 disassembler to Armv9.2-a; based upon LLVM 14.0.5.
Detailed below is a summary of changes made :
.inc
files for AArch64 architectureArm64.h
Edit :
arm64_op_sme_index
and added tocs_arm64_op
to more accuratly represent SME instruction operands that have index of the form[wn, #imm]
.set_sme_index
and relevant print functions were added so that the appropriate SME instructions use this new struct rather thanarm64_op_mem
I am sure that this PR will be incomplete, so please let me know of any changes or fixes that should be made!