[Patch, ARM] Fix invalid immediate constant acceptance for carry-setting addw,subw.

Tejas Belagod tejas.belagod@arm.com
Tue Aug 24 15:22:00 GMT 2010


Hi,

Widening carry-setting thumb2 add and sub accepted invalid immediates
which were flat 12-bit encoded. ADDS.W and SUBS.W's immediates have to
be modified immediate constants(unlike addw and subw). Attached is a
patch that adds this check and fixes it in gas. Regression tested on
arm-none-eabi.

OK?

--
Tejas Belagod
ARM.

gas/testsuite/

2010-08-23 Tejas Belagod <tejas.belagod@arm.com>

	* gas/arm/addsw-bad.s: New file.
	* gas/arm/addsw-bad.l: New file.
	* gas/arm/addsw-bad.d: New file.

gas/

2010-08-23 Tejas Belagod <tejas.belagod@arm.com>

	* config/tc-arm.c (md_apply_fix): Check if widened add, sub are
	flag-setting and handle accordingly.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: addsw.patch
Type: text/x-patch
Size: 2368 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20100824/139e6312/attachment.bin>


More information about the Binutils mailing list