-
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
arm64: cs_arm64_op sys field can be arm64_sys_op OR arm64_reg but is defined as arm64_sys_op #1881
Comments
It looks like for I think the confusion arises from the "SYS" instruction (for which AT / DC / IC / TLBI are aliases) and MSR / MRS refer to "system registers". This is a regression since 4.x, check out old but now sets the type to |
Update pre-generated bindings and changelog. Various system register enums have been merged into `Arm64SysOp`. Comments out part of test case due to upstream capstone bug: capstone-engine/capstone#1881
Update pre-generated bindings and changelog. Various system register enums have been merged into `Arm64SysOp`. Comments out part of test case due to upstream capstone bug: capstone-engine/capstone#1881
@adamjseitz nice analysis. Here are the permalinks: Old way ( capstone/arch/AArch64/AArch64InstPrinter.c Line 1612 in 0efa3cc
New way ( capstone/arch/AArch64/AArch64InstPrinter.c Line 2152 in ba21990
Currently in the |
Update pre-generated bindings and changelog. Various system register enums have been merged into `Arm64SysOp`. Comments out part of test case due to upstream capstone bug: capstone-engine/capstone#1881
@Rot127 take a look at this one too please |
Will be fixed with #2026 System operands are described in way more detail (just as LLVM defines them). typedef enum {
[...]
// Different system operands.
AArch64_OP_SVCR = CS_OP_SPECIAL + 4,
AArch64_OP_AT = CS_OP_SPECIAL + 5,
AArch64_OP_DB = CS_OP_SPECIAL + 6,
AArch64_OP_DC = CS_OP_SPECIAL + 7,
AArch64_OP_ISB = CS_OP_SPECIAL + 8,
AArch64_OP_TSB = CS_OP_SPECIAL + 9,
AArch64_OP_PRFM = CS_OP_SPECIAL + 10,
AArch64_OP_SVEPRFM = CS_OP_SPECIAL + 11,
AArch64_OP_RPRFM = CS_OP_SPECIAL + 12,
AArch64_OP_PSTATEIMM0_15 = CS_OP_SPECIAL + 13,
AArch64_OP_PSTATEIMM0_1 = CS_OP_SPECIAL + 14,
AArch64_OP_PSB = CS_OP_SPECIAL + 15,
AArch64_OP_BTI = CS_OP_SPECIAL + 16,
AArch64_OP_SVEPREDPAT = CS_OP_SPECIAL + 17,
AArch64_OP_SVEVECLENSPECIFIER = CS_OP_SPECIAL + 18,
} aarch64_op_type;
typedef union {
aarch64_sysreg sysreg;
aarch64_tlbi tlbi;
aarch64_ic ic;
} aarch64_sysop_reg;
typedef union {
aarch64_dbnxs dbnxs;
aarch64_exactfpimm exactfpimm;
} aarch64_sysop_imm;
typedef union {
aarch64_svcr svcr;
aarch64_at at;
aarch64_db db;
aarch64_dc dc;
aarch64_isb isb;
aarch64_tsb tsb;
aarch64_prfm prfm;
aarch64_sveprfm sveprfm;
aarch64_rprfm rprfm;
aarch64_pstateimm0_15 pstateimm0_15;
aarch64_pstateimm0_1 pstateimm0_1;
aarch64_psb psb;
aarch64_bti bti;
aarch64_svepredpat svepredpat;
aarch64_sveveclenspecifier sveveclenspecifier;
} aarch64_sysop_alias;
typedef union {
aarch64_sysop_reg reg;
aarch64_sysop_imm imm;
aarch64_sysop_alias alias;
} aarch64_sysop; |
The
cs_arm64_op
fieldsys
can be eitherarm64_sysreg
ORarm64_reg
but the field is defined asarm64_sys_op
.capstone/include/capstone/arm64.h
Line 1356 in fe3e7ab
The current state makes it harder to:
cstool
does not even print out the "SYS" operands correctlyThis may also be related to #1760.
arm64_sys_op
1st operand "s1e1r" is
arm64_sys_op
valueARM64_AT_S1E1R
.arm64_reg
The 2nd operand "midr_el1" is
arm64_sysreg
valueARM64_SYSREG_MIDR_EL1
.The text was updated successfully, but these errors were encountered: