Kingcom / armips

An assembler for various ARM and MIPS platforms. Builds available at http://buildbot.orphis.net/armips/
MIT License
363 stars 77 forks source link

missing ARM addressing modes for LDRH #208

Open sehugg opened 3 years ago

sehugg commented 3 years ago

The following ARM addressing modes work for LDR (and LDRB):

    ldr    r3, [r2, #1]
    ldr    r3, [r2, #-1]
    ldr    r3, [r2, r1]
    ldr    r3, [r2, -r1]
    ldr    r3, [r2, #1]!
    ldr    r3, [r2, #-1]!
    ldr    r3, [r2, r1]!
    ldr    r3, [r2, -r1]!
    ldr    r3, [r2], #1
    ldr    r3, [r2], #-1
    ldr    r3, [r2], r1
    ldr    r3, [r2], -r1

I believe LDRH should support all of the above, but currently only the following work:

    ldrh    r3, [r2, #1]
    ldrh    r3, [r2, #-1]
    ldrh    r3, [r2, r1]
    ldrh    r3, [r2], #1
    ldrh    r3, [r2], #-1