-
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
AARCH64 - armv8.(3|4|5)a instructions #1287
Conversation
cool, but yes this is just a start, as all the actual supported code is not here yet. |
@aquynh by "all the actual supported code" do you mean the rest of the ARMv8.x instructions or is there more capstone specific code I need to change? I am asking because I am a little unclear as to what all I need to include to get upgraded ARMv8 support? I am however, committed to working with you to take this PR to completion. Thanks for any future help/assistance. |
you can look at the code under https://github.com/aquynh/capstone/tree/master/arch/AArch64, the core is there. |
@aquynh is the other PR with ARMv8.(1|2) okay? Meaning did they change all the appropriate files? |
@aquynh IMO and as observed, people are trying hard to help you getting this project on track but you're not being very helpful. |
@aquynh in trying to understand why supporting/core files need to be changed I thought I would try and see what is involved in something like "branch"
are these I would have assumed you would need a opcode to bits mapping? or maybe that is what Are you running llvm to get the bytes that make up the opcodes? |
@aquynh are there any talks/presentations where you describe how the core works and/or how one adds new instructions/archs ? |
So after reading your docs PDF and links and running: $ llvm-tblgen AArch64.td -dump-json -class=Instruction -I=/Users/blacktop/Projects/github/llvm/include | jq '.RETAB' {
"RETAB": {
"!anonymous": false,
"!fields": [
"Inst",
"Unpredictable",
"SoftFail"
],
"!name": "RETAB",
"!superclasses": [
"Instruction",
"AArch64Inst",
"EncodedI",
"I",
"Sched",
"AuthBase",
"AuthReturn"
],
"AddedComplexity": 0,
"AsmMatchConverter": "",
"AsmString": "retab",
"AsmVariantName": "",
"CodeSize": 0,
"Constraints": "",
"DecoderMethod": "",
"DecoderNamespace": "",
"Defs": [],
"DestructiveInstType": {
"def": "NotDestructive",
"kind": "def",
"printable": "NotDestructive"
},
"DisableEncoding": "",
"ElementSize": {
"def": "ElementSizeB",
"kind": "def",
"printable": "ElementSizeB"
},
"F": {
"def": "NormalFrm",
"kind": "def",
"printable": "NormalFrm"
},
"FastISelShouldIgnore": 0,
"Form": [
1,
0
],
"InOperandList": {
"args": [],
"kind": "dag",
"operator": {
"def": "ins",
"kind": "def",
"printable": "ins"
},
"printable": "(ins)"
},
<SNIP> and $ echo "0x20,0x04,0xc1,0xda" | llvm-mc -disassemble -arch=arm64 -mattr=v8.4a
.section __TEXT,__text,regular,pure_instructions
pacib x0, x1 It seems like we could just use TableGen to get the new instructions etc from llvm in an automated way? |
@aquynh do the instructions have to added to your /// ARM64 instruction
typedef enum arm64_insn { is an enum? |
@XVilka thank you! I'll take a look |
@blacktop I think it is better to use rebase, so history wouldn't be polluted. |
@XVilka yeah, I messed up the history by trying a rebase before the merge from master, but this way the "Files Changed" is easier to see because it only has mine and not the others (from master) since I opened this PR |
very nice, this is inline with our plan at #1319. which llvm version are you based on? could you rebase your work on llvm 7.0.1, so we are on the same page? |
currently Travis fails to build, can you take a look? |
@blacktop so I think this one can be closed, right? |
pulled from - https://github.com/llvm-mirror/llvm/blob/master/lib/Target/AArch64/AArch64InstrInfo.td#L605
This isn't done yet, but it's a start 😉