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]

[PATCH, ARM, v2] Fix PR target/59142: internal compiler error while compiling OpenCV 2.4.7


On Tue, Nov 26, 2013 at 10:25:50AM +0000, Richard Earnshaw wrote:
> I've just spotted another problem (that was always there):
> > @@ -42,15 +42,15 @@
> >  
> >  (define_insn "*thumb_ldm4_ia"
> >    [(match_parallel 0 "load_multiple_operation"
> > -    [(set (match_operand:SI 1 "arm_hard_register_operand" "")
> > +    [(set (match_operand:SI 1 "arm_hard_general_register_operand" "")
> >            (mem:SI (match_operand:SI 5 "s_register_operand" "l")))
> > -     (set (match_operand:SI 2 "arm_hard_register_operand" "")
> > +     (set (match_operand:SI 2 "arm_hard_general_register_operand" "")
> >            (mem:SI (plus:SI (match_dup 5)
> >                    (const_int 4))))
> > -     (set (match_operand:SI 3 "arm_hard_register_operand" "")
> > +     (set (match_operand:SI 3 "arm_hard_general_register_operand" "")
> >            (mem:SI (plus:SI (match_dup 5)
> >                    (const_int 8))))
> > -     (set (match_operand:SI 4 "arm_hard_register_operand" "")
> > +     (set (match_operand:SI 4 "arm_hard_general_register_operand" "")
> >            (mem:SI (plus:SI (match_dup 5)
> >                    (const_int 12))))])]
> >    "TARGET_THUMB1 && XVECLEN (operands[0], 0) == 4"
> 
> This, and other thumb1 patterns should be stricter than this, since the
> T1 LDM/STM patterns only support low regs.  I think these need changing
> to low_register_operand.

I've also made this change.

I've split this into 3 patches which must be applied in sequence. All patches
have been build tested for arm-unknown-linux-gnueabihf, and the 3 rolled
together have been bootstrapped on a Chromebook for arm-unknown-linux-gnueabihf.

OK for trunk?


Changelog for: 0001-PR-target-59142-vfp_hard_register_operand.patch

2013-12-19  Charles Baylis  <charles.baylis@linaro.org>

    	PR target/59142
    	gcc/
    	* arm/predicates.md (vfp_hard_register_operand): New predicate.
    	* gcc/config/arm/arm.md: (vfp_pop_multiple_with_writeback) Use
      	vfp_hard_register_operand.





Changelog for: 0002-PR-target-59142-arm_hard_general_register_operand.patch
    
2013-12-19  Charles Baylis  <charles.baylis@linaro.org>

    	PR target/59142
    	gcc/
    	* arm/predicates.md (arm_hard_general_register_operand): New predicate.
    	(arm_hard_register_operand): Remove.
    	* config/arm/arm-ldmstm.ml: Use arm_hard_general_register_operand
    	for all patterns.
    	* config/arm/ldmstm.md: Regenerate.




Changelog for: 0003-PR-target-59142-low_register_operand.patch

2013-12-19  Charles Baylis  <charles.baylis@linaro.org>

    	PR target/59142
    	gcc/
    	* config/arm/arm-ldmstm.ml: Use low_register_operand for Thumb
	patterns.
    	* config/arm/ldmstm.md: Regenerate.

Attachment: 0001-PR-target-59142-vfp_hard_register_operand.patch
Description: Text document

Attachment: 0002-PR-target-59142-arm_hard_general_register_operand.patch
Description: Text document

Attachment: 0003-PR-target-59142-low_register_operand.patch
Description: Text document


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