Skip to content

[ARM Disassembler] Flawed display of ALU instructions with a register shift #2349

@lunasorcery

Description

@lunasorcery

Observed at 0.9.2 (f6d5f51)

For ALU operations (and, bic, etc), the disassembler erroneously omits the lsl when the second operand is left-shifted by r0.

Given the following assembly:

and r3, r3, r2, lsl #0  ; opcode E0033002
and r3, r3, r2, lsl #1  ; opcode E0033082
and r3, r3, r2, lsl r0  ; opcode E0033012
and r3, r3, r2, lsl r1  ; opcode E0033112

mGBA will disassemble as:

and r3, r3, r2          ; zero-shift omitted, as expected
and r3, r3, r2, lsl #1
and r3, r3, r2, r0      ; `lsl` suspiciously missing
and r3, r3, r2, lsl r1

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