Skip to content

arm64: cs_arm64_op sys field can be arm64_sys_op OR arm64_reg but is defined as arm64_sys_op #1881

Closed
@tmfink

Description

@tmfink

The cs_arm64_op field sys can be either arm64_sysreg OR arm64_reg but the field is defined as arm64_sys_op.

arm64_sys_op sys; ///< IC/DC/AT/TLBI operation (see arm64_ic_op, arm64_dc_op, arm64_at_op, arm64_tlbi_op)

The current state makes it harder to:

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

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions