Skip to content

Incorrect access types for some AArch64 aliased instructions #1911

@FinnWilkinson

Description

@FinnWilkinson

PR #1655 provided a fix for some alias instructions where the incorrect access type was being fetched due to a change in the number of operands.
For example, cmp x0, x1 is an alias of subs xzr, x0, x1, and the access rights for cmp are WRITE, READ respectively, when they should be READ, READ.

The fix from #1655 changes the printOperand function to use OpNum instead of MI->ac_idx to retrieve the access type from the map; which works for the case above, but for other instructions it retrieves the incorrect types.
For example, ldrsw x2, [x0], #4 should have access types x2=WRITE, [x0]=READ | WRITE, however with the change from #1655 the access types are x2=READ | WRITE, [x0]=READ | WRITE.

PR #1907 reverts the change made from #1655, as another solution will need implementing to ensure the access types are correct for all instructions, including aliases

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