This is the mail archive of the binutils@sourceware.org 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: [PATCH] ARM: gas not detecting invalid operands for Thumb2 ADD{S} and SUB{S}


> In ARMv6T2 and ARMv7 Thumb2, the ADD, ADDS, SUB, and SUBS instructions
> added several new instruction forms. One of the new forms allowed is:
> 
>     ADD{S}<c>.W <Rd>,SP,<Rm>{,<shift>}
>     SUB{S}<c>.W <Rd>,SP,<Rm>{,<shift>}

The "added new forms" is mainly an artifact of how the new documentation is 
structured.  If you're starting from the ARM instruction set (or from the 
encodings) then it's actually new restrictions on where r13 (aka SP) may be 
used.

The patch looks ok, though I think the testcases could use some 
reorganisation.  I'd prefer two assembly files, one with insns valid in both 
ARM and Thumb mode, the other which is only valid in ARM mode.  Assemble both 
in both modes.  There should already be existing tests
(e.g. sp-pc-usage-t) that cover the former.

> +@ test case of ADD{S} and SUB{S} instructions in ARM mode

Too vague.  You're testing use of SP in these insns.

> +	.file	"s6163c.c"

Looks bogus.

Paul


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