I have a piece of assembler code which doesn't pass:
3: ldrb r1,[r4],#1 cbnz r1,3b @ skip until 0
This gives
arm-none-eabi-as -g -al -o simple.o simple.s >simple.lstsimple.s: Assembler messages:simple.s:570: Error: branch out of rangemake: *** [simple.o] Error 1
Hi Krischu,
The CBNZ instruction branches forward only.
For example, this will assemble:
ldrb r1,[r4],#1
cbnz r1,3f
nop
3:
Best regards,
Vincent.