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

What are the equivalents from arm-none-eabi-as #119

Closed jeromebon closed 7 years ago

jeromebon commented 7 years ago

Hi, I've 2 questions regarding some features that arm-none-eabi-as allow me to use that i couldn't find any equivalent for arm-ips. With arm-none-eabi-as it's possible to do something like:

.thumb
ldr r0, my_label
ldr r1, my_label

.align 2
my_label:
        .word 0x89ABCDEF

But armips give me an error: THUMB parameter failure I couldn't find how to do the same with armips, other than doing this:

ldr r0, =0x89ABCDEF
ldr r1, =0x89ABCDEF
.pool

But in some case I would prefer to use label instead, is there any way to do so?

I also can't load half-word using that way: ldrh r0, =0xABCD, and i don't get why.

Kingcom commented 7 years ago

PC relative loads can be done using the following syntax:

ldr r0,[my_label]
.align 4
my_label: .word 0

Note that my_label needs to be word aligned. ldrh cannot access the PC register in Thumb mode.

jeromebon commented 7 years ago

Thanks a lot.