Skip to content

ARM ldrsh parameter failure #238

@KarisaAdvynia

Description

@KarisaAdvynia

The ARM instruction ldrsh fails to assemble, when an offset is added after loading from a register:

ldrsh r3,[r0],2   ; expected: F2 30 D0 E0
ldrsh r3,[r0],-2  ; expected: F2 30 50 E0
ldrsh r3,[r0],r2  ; expected: F2 30 90 E0
                  ; instead: "ldrsh-test.asm(5) error: ARM parameter failure"

The error occurs on any target ARM architecture (.gba .arm, .nds, or .3ds)

I've tested other closely related instructions, and they are successfully assembled:

ldrh r3,[r0],2    ; output: B2 30 D0 E0
ldrsb r3,[r0],2   ; output: D2 30 D0 E0
ldrsh r3,[r0,2]   ; output: F2 30 D0 E1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions