Do not reload reg2 under V.4 or eabi.
authorMichael Meissner <meissner@gcc.gnu.org>
Fri, 3 Feb 1995 22:41:38 +0000 (22:41 +0000)
committerMichael Meissner <meissner@gcc.gnu.org>
Fri, 3 Feb 1995 22:41:38 +0000 (22:41 +0000)
From-SVN: r8858

gcc/config/rs6000/rs6000.md

index e5ee37c260225cf222d88d1a9d339477d8e43cc1..0593a1bbf51008bee5ed2567a144abc0272eee23 100644 (file)
   "bl %z0")
 
 ;; Call to function which may be in another module.  Restore the TOC
-;; pointer (r2) after the call.
+;; pointer (r2) after the call unless this is System V.
 
 (define_insn ""
   [(call (mem:SI (match_operand:SI 0 "call_operand" "l,s"))
         (match_operand 1 "" "fg,fg"))
    (clobber (match_scratch:SI 2 "=l,l"))]
   ""
-  "@
-   {brl|blrl}\;{l|lwz} 2,20(1)
-   bl %z0\;%."
+  "*
+{
+  if (GET_CODE (operands[0]) == REG)
+    {
+#ifndef USING_SVR4_H
+      return \"{brl|blrl}\;{l|lwz} 2,20(1)\";
+#else
+      return \"{brl|blrl}\";
+#endif
+    }
+
+  return \"bl %z0\;%.\";
+}"
   [(set_attr "length" "8")])
 
 (define_insn ""
              (match_operand 2 "" "fg,fg")))
    (clobber (match_scratch:SI 3 "=l,l"))]
   ""
-  "@
-   {brl|blrl}\;{l|lwz} 2,20(1)
-   bl %z1\;%."
+  "*
+{
+  if (GET_CODE (operands[1]) == REG)
+    {
+#ifndef USING_SVR4_H
+      return \"{brl|blrl}\;{l|lwz} 2,20(1)\";
+#else
+      return \"{brl|blrl}\";
+#endif
+    }
+
+  return \"bl %z1\;%.\";
+}"
   [(set_attr "length" "8")])
 
 ;; Call subroutine returning any type.