Closed
Description
The cs_arm64_op
field sys
can be either arm64_sysreg
OR arm64_reg
but the field is defined as arm64_sys_op
.
capstone/include/capstone/arm64.h
Line 1356 in fe3e7ab
The current state makes it harder to:
- Use the C interface
- In fact,
cstool
does not even print out the "SYS" operands correctly
- In fact,
- Write bindings in other languages (Update capstone lib to 3b2984212fe capstone-rust/capstone-rs#129).
This may also be related to #1760.
arm64_sys_op
$ ./cstool -d arm64 "00 78 08 d5"
0 00 78 08 d5 at s1e1r, x0
ID: 948 (at)
op_count: 2
operands[0].type: SYS = 0x4f
operands[1].type: REG = x0
1st operand "s1e1r" is arm64_sys_op
value ARM64_AT_S1E1R
.
arm64_reg
$ ./cstool -d arm64 "090038d5"
0 09 00 38 d5 mrs x9, midr_el1
ID: 495 (mrs)
op_count: 2
operands[0].type: REG = x9
operands[0].access: READ | WRITE
operands[1].type: SYS = 0xc000
operands[1].access: READ | WRITE
Registers read: x9
Registers modified: x9
Groups: privilege
The 2nd operand "midr_el1" is arm64_sysreg
value ARM64_SYSREG_MIDR_EL1
.
Metadata
Metadata
Assignees
Labels
No labels