This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [PING][Patch, ARM] Fix invalid immediate constant acceptance for carry-setting addw,subw.
- From: Tejas Belagod <tejas dot belagod at arm dot com>
- To: binutils at sourceware dot org
- Date: Mon, 13 Sep 2010 14:28:51 +0100
- Subject: Re: [PING][Patch, ARM] Fix invalid immediate constant acceptance for carry-setting addw,subw.
- References: <1282636051.30429.69.camel@e102484-lin.cambridge.arm.com>
On Tue, 2010-08-24 at 08:47 +0100, Tejas Belagod wrote:
> 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.