This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC 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] Work around out-of-range branch error for Thumb-2


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


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