re PR target/5185 ([ARM] Segmentation fault in final.c)
authorPhilip Blundell <pb@nexus.co.uk>
Tue, 19 Feb 2002 22:23:56 +0000 (22:23 +0000)
committerPhil Blundell <pb@gcc.gnu.org>
Tue, 19 Feb 2002 22:23:56 +0000 (22:23 +0000)
2002-02-19  Philip Blundell  <pb@nexus.co.uk>

PR 5185
* config/arm/arm.h (THUMB_LEGITIMATE_CONSTANT_P): Accept anything
if generating PIC.

PR 5054
* config/arm/arm.md (call_insn) [TARGET_THUMB]: Use
arm_is_longcall_p rather than inspecting call-type cookie
directly.
(call_value_insn) [TARGET_THUMB]: Likewise.

From-SVN: r49879

gcc/ChangeLog
gcc/config/arm/arm.h
gcc/config/arm/arm.md

index c5813d2af9a43a4c1a8c1e951f454bc988e3df9d..45819e6d991a92aa5bd02505cde58736973531a7 100644 (file)
@@ -1,3 +1,15 @@
+2002-02-19  Philip Blundell  <pb@nexus.co.uk>
+
+       PR 5185
+       * config/arm/arm.h (THUMB_LEGITIMATE_CONSTANT_P): Accept anything
+       if generating PIC.
+
+       PR 5054
+       * config/arm/arm.md (call_insn) [TARGET_THUMB]: Use
+       arm_is_longcall_p rather than inspecting call-type cookie
+       directly.
+       (call_value_insn) [TARGET_THUMB]: Likewise.
+
 2002-02-19  Graham Stott  <grahams@redhat.com>
 
        * config/i386/i386.c (ix86_expand_builtin): Fix typo.
index bd448dbe4e2be11a3fc2d36e0e1779f73e4f2657..c68c86757d4e850205a8eb4f7d5a49f2adf5b337 100644 (file)
@@ -1843,7 +1843,8 @@ typedef struct
 #define THUMB_LEGITIMATE_CONSTANT_P(X) \
  (   GET_CODE (X) == CONST_INT         \
   || GET_CODE (X) == CONST_DOUBLE      \
-  || CONSTANT_ADDRESS_P (X))
+  || CONSTANT_ADDRESS_P (X)            \
+  || flag_pic)
 
 #define LEGITIMATE_CONSTANT_P(X)       \
   (TARGET_ARM ? ARM_LEGITIMATE_CONSTANT_P (X) : THUMB_LEGITIMATE_CONSTANT_P (X))
index 3646fe5890f6c9e3e66f241d0cf29561c79d0f8a..d1259d472b7727c08920cf73b953a720c6450a9d 100644 (file)
    (use (match_operand 2 "" ""))
    (clobber (reg:SI LR_REGNUM))]
   "TARGET_THUMB
-   && operands[2] == const0_rtx && (GET_CODE (operands[0]) == SYMBOL_REF)"
+   && GET_CODE (operands[0]) == SYMBOL_REF
+   && !arm_is_longcall_p (operands[0], INTVAL (operands[2]), 1)"
   "bl\\t%a0"
   [(set_attr "length" "4")
    (set_attr "type" "call")]
    (use (match_operand 3 "" ""))
    (clobber (reg:SI LR_REGNUM))]
   "TARGET_THUMB
-   && operands[3] == const0_rtx && (GET_CODE (operands[1]) == SYMBOL_REF)"
+   && GET_CODE (operands[1]) == SYMBOL_REF
+   && !arm_is_longcall_p (operands[1], INTVAL (operands[3]), 1)"
   "bl\\t%a1"
   [(set_attr "length" "4")
    (set_attr "type" "call")]