This is the mail archive of the mailing list for the binutils project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: ARM as ... possible bug

On 11/12/11 10:19, Dave Pawson wrote:
strexd r0, r1,r2,[r4]

arm.asm:275: Error: even register required -- `strexd r0,r1,r2,[r4]'
failed, quitting

cmd was
$arm-linux-elf-as -mcpu=arm1176jzf-s -mfpu=vfpv2  -o $1.o $1.asm

I can find nothing in
ARM Architecture
Reference Manual
ARM v7-A and ARM v7-R edition
Errata markup

which indicates that any of the registers must be evenly numbered?
1. Which reg is wrong (unclear error message?)

r1 in your example is the register producing the error. In ARM state[1] the first register transferred must be an even numbered register, and the second register transferred must be the register numbered one higher.

So   strexd r0, r2, r3, [r4] is valid
But  strexd r0, r2, r6, [r4] is not.

The ARMARM describes this in the ARM state encoding specific operations (the pseudo-code that goes with the ARM state encoding).

2. Is it an error at all?

Gas is correct - although admittedly unclear.



[1] Thumb state doesn't have these particular restrictions, but strexd is not available in Thumb state until ARMv7.

Matthew Gretton-Dann
Principal Engineer, PD Software - Tools, ARM Ltd

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]