This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH, ARM] Work around out-of-range branch error for Thumb-2
- From: Daniel Jacobowitz <dan at codesourcery dot com>
- To: Julian Brown <julian at codesourcery dot com>
- Cc: Richard Earnshaw <rearnsha at arm dot com>, gcc-patches at gcc dot gnu dot org, paul at codesourcery dot com
- Date: Fri, 4 Dec 2009 14:45:34 -0500
- Subject: Re: [PATCH, ARM] Work around out-of-range branch error for Thumb-2
- References: <20091127165811.6d09a1f1@rex.config> <1259341531.9961.68.camel@e200601-lin.cambridge.arm.com> <20091204190452.0340f1d5@rex.config>
On Fri, Dec 04, 2009 at 07:04:52PM +0000, Julian Brown wrote:
> * gcc/config/arm/constraints.md (Ps, Pt): New constraint letters.
> (*thumb2_addsi_short): Tighten constraints.
Missing filename (thumb2.md).
> @@ -1197,9 +1197,9 @@
> )
>
> (define_insn "*thumb2_addsi_short"
> - [(set (match_operand:SI 0 "low_register_operand" "=l")
> - (plus:SI (match_operand:SI 1 "low_register_operand" "l")
> - (match_operand:SI 2 "low_reg_or_int_operand" "lIL")))
> + [(set (match_operand:SI 0 "low_register_operand" "=l,l")
> + (plus:SI (match_operand:SI 1 "low_register_operand" "l,0")
> + (match_operand:SI 2 "low_reg_or_int_operand" "lPt,Ps")))
> (clobber (reg:CC CC_REGNUM))]
> "TARGET_THUMB2 && reload_completed"
> "*
Is there some other pattern to pick up the non-flag-setting add?
There's a 16-bit r += r. On Thumb-1 then one of the registers must
be low, but not on Thumb-2. Hmm, I guess this matches the arm_addsi3
pattern and we just don't know that it has a shorter length?
--
Daniel Jacobowitz
CodeSourcery