+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.
#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))
(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")]