ARM as ... possible bug

Matthew Gretton-Dann matthew.gretton-dann@arm.com
Mon Dec 12 09:27:00 GMT 2011


On 11/12/11 10:19, Dave Pawson wrote:
> strexd r0, r1,r2,[r4]
>
> produces
> 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.

Thanks,

Matt

[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



More information about the Binutils mailing list