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: target/5712: [ARM] bad ADR generated


It turns out that this is due to an adr insn which was suddenly being used 
when it had no right to be (because we can't determine how far away the 
target will be).

Fortunately, that pattern is now dead; it was originally added for an 
earlier constant pool handling rewrite, but subsequent changes have made 
it redundant.

I've deleted the expand and its matcher.

R.

2002-03-15  Richard Earnshaw  <rearnsha@arm.com>

        PR target/5712
        * arm.md (movaddr, movaddr_insn): Delete.


Index: config/arm/arm.md
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/arm/arm.md,v
retrieving revision 1.90
diff -p -r1.90 arm.md
*** arm.md	2002/03/14 22:34:00	1.90
--- arm.md	2002/03/15 16:29:10
***************
*** 4132,4158 ****
    }"
  )
  
- (define_expand "movaddr"
-   [(set (match_operand:SI 0 "s_register_operand" "")
- 	(match_operand:DI 1 "address_operand" ""))]
-   "TARGET_ARM"
-   ""
- )
- 
- (define_insn "*movaddr_insn"
-   [(set (match_operand:SI 0 "s_register_operand" "=r")
- 	(match_operand:DI 1 "address_operand" "p"))]
-   "TARGET_ARM
-    && reload_completed
-    && (GET_CODE (operands[1]) == LABEL_REF
-        || (GET_CODE (operands[1]) == CONST
- 	   && GET_CODE (XEXP (operands[1], 0)) == PLUS
- 	   && GET_CODE (XEXP (XEXP (operands[1], 0), 0)) == LABEL_REF
- 	   && GET_CODE (XEXP (XEXP (operands[1], 0), 1)) == CONST_INT))"
-   "adr%?\\t%0, %a1"
-   [(set_attr "predicable" "yes")]
- )
- 
  ;; When generating pic, we need to load the symbol offset into a register.
  ;; So that the optimizer does not confuse this with a normal symbol load
  ;; we use an unspec.  The offset will be loaded from a constant pool entry,
--- 4132,4137 ----

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