re PR target/23783 (gcc.c-torture/compile/calls.c triggers an ICE)
authorRichard Earnshaw <rearnsha@arm.com>
Thu, 6 Oct 2005 12:43:17 +0000 (12:43 +0000)
committerRichard Earnshaw <rearnsha@gcc.gnu.org>
Thu, 6 Oct 2005 12:43:17 +0000 (12:43 +0000)
PR target/23783
* arm.md (call): If the address isn't a SYMBOL_REF or a register,
then force it into a register.
(call_value): Likewise.

From-SVN: r105032

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

index 30d4affd0136abded21739ebd887bfd15cdce525..702ad28f7b7e49c3e577f00286f8ffed81e2ff04 100644 (file)
@@ -1,3 +1,10 @@
+2005-10-06  Richard Earnshaw  <richard.earnshaw@arm.com>
+
+       PR target/23783
+       * arm.md (call): If the address isn't a SYMBOL_REF or a register,
+       then force it into a register.
+       (call_value): Likewise.
+
 2005-10-06  Richard Henderson  <rth@redhat.com>
 
        PR 24049
index b60ccb75d8fcb2d608240f5272b113848bbf594c..76eb12b5fad51a037df79a529e4f7b3eff61cc0c 100644 (file)
        invoked it.  */
     callee  = XEXP (operands[0], 0);
     
-    if (GET_CODE (callee) != REG
-       && arm_is_longcall_p (operands[0], INTVAL (operands[2]), 0))
+    if ((GET_CODE (callee) == SYMBOL_REF
+        && arm_is_longcall_p (operands[0], INTVAL (operands[2]), 0))
+       || (GET_CODE (callee) != SYMBOL_REF
+           && GET_CODE (callee) != REG))
       XEXP (operands[0], 0) = force_reg (Pmode, callee);
   }"
 )
       operands[3] = const0_rtx;
       
     /* See the comment in define_expand \"call\".  */
-    if (GET_CODE (callee) != REG
-       && arm_is_longcall_p (operands[1], INTVAL (operands[3]), 0))
+    if ((GET_CODE (callee) == SYMBOL_REF
+        && arm_is_longcall_p (operands[1], INTVAL (operands[3]), 0))
+       || (GET_CODE (callee) != SYMBOL_REF
+           && GET_CODE (callee) != REG))
       XEXP (operands[1], 0) = force_reg (Pmode, callee);
   }"
 )