2
votes

I am writing an ARM assembly code. In it there is a snippet:

cmp r3, r2
ldrbcc r6, [r3], #1

I want to express if r3 is less than r2, then load [r3] to register r6. But when I compile it with linaro toolchain(version 13.04):

arm-linux-gnueabihf-as -march=armv7-a -mcpu=cortex-a9 test.s -o test

The compiler outputs:

Error: bad instruction `ldrbcc r6,[r3],#1'

I can't figure it out. Anyone can help me? Thanks.

3
Look up the opcode in the reference manual, which should be kept handy. Don't doubt it the error messages without good reason; challenge assumptions. - user2246674

3 Answers

7
votes

LDRBCC is the modern "Unified Assembly Language"; your assembler is defaulting to the older pre-UAL syntax and expects LDRCCB. You could change your code to use the pre-UAL syntax, but a much better solution is to tell the assembler that you are using the UAL style by adding a ".syntax unified" directive before your code.

2
votes

use ldrccb instead of ldrbcc...

0
votes

Try to run qmake with these arguments:

~/raspi/qt5/bin/qmake -r WEBENGINE_CONFIG+=use_proprietary_codecs QMAKE_CFLAGS+=-mthumb

Then try make