mips.md (call_internal1): Use CONSTANT_ADDRESS_P to check for constant addresses.
authorRichard Sandiford <rsandifo@redhat.com>
Wed, 11 Jul 2001 09:29:42 +0000 (09:29 +0000)
committerRichard Sandiford <rsandifo@gcc.gnu.org>
Wed, 11 Jul 2001 09:29:42 +0000 (09:29 +0000)
* mips.md (call_internal1): Use CONSTANT_ADDRESS_P to check for
constant addresses.
(call_internal2): Likewise.
(call_value_internal1): Likewise.
(call_value_internal2): Likewise.
(call_value_multiple_internal1): Likewise.
(call_value_multiple_internal2): Likewise.

Co-Authored-By: H.J. Lu <hjl@gnu.org>
From-SVN: r43930

gcc/ChangeLog
gcc/config/mips/mips.md

index b13c2564d204cd9577c48a59f9564e20f6f85542..80d975c0788911030dde4dc9b8f8d1db6270dc38 100644 (file)
@@ -1,3 +1,14 @@
+2001-07-11  Richard Sandiford  <rsandifo@redhat.com>
+           H.J. Lu  <hjl@gnu.org>
+
+       * mips.md (call_internal1): Use CONSTANT_ADDRESS_P to check for
+       constant addresses.
+       (call_internal2): Likewise.
+       (call_value_internal1): Likewise.
+       (call_value_internal2): Likewise.
+       (call_value_multiple_internal1): Likewise.
+       (call_value_multiple_internal2): Likewise.
+
 2001-07-10  Kazu Hirata  <kazu@hxi.com>
 
        * calls.c (emit_library_call_value_1): Fix a comment typo.
index e77c295c5067ab83a9df6db4f7ae583e38d563cc..d4649101fa611ef17e8b00b60ab91f0da1f3943c 100644 (file)
@@ -9684,10 +9684,10 @@ ld\\t%2,%1-%S1(%2)\;daddu\\t%2,%2,$31\;j\\t%2"
 {
   register rtx target = operands[0];
 
-  if (GET_CODE (target) == SYMBOL_REF)
-    return \"%*jal\\t%0\";
-  else if (GET_CODE (target) == CONST_INT)
+  if (GET_CODE (target) == CONST_INT)
     return \"%[li\\t%@,%0\\n\\t%*jal\\t%2,%@%]\";
+  else if (CONSTANT_ADDRESS_P (target))
+    return \"%*jal\\t%0\";
   else
     return \"%*jal\\t%2,%0\";
 }"
@@ -9703,15 +9703,15 @@ ld\\t%2,%1-%S1(%2)\;daddu\\t%2,%2,$31\;j\\t%2"
 {
   register rtx target = operands[0];
 
-  if (GET_CODE (target) == SYMBOL_REF)
+  if (GET_CODE (target) == CONST_INT)
+    return \"li\\t%^,%0\\n\\tjal\\t%2,%^\";
+  else if (CONSTANT_ADDRESS_P (target))
     {
       if (GET_MODE (target) == SImode)
        return \"la\\t%^,%0\\n\\tjal\\t%2,%^\";
       else
        return \"dla\\t%^,%0\\n\\tjal\\t%2,%^\";
     }
-  else if (GET_CODE (target) == CONST_INT)
-    return \"li\\t%^,%0\\n\\tjal\\t%2,%^\";
   else if (REGNO (target) != PIC_FUNCTION_ADDR_REGNUM)
     return \"move\\t%^,%0\\n\\tjal\\t%2,%^\";
   else
@@ -9891,10 +9891,10 @@ ld\\t%2,%1-%S1(%2)\;daddu\\t%2,%2,$31\;j\\t%2"
 {
   register rtx target = operands[1];
 
-  if (GET_CODE (target) == SYMBOL_REF)
-    return \"%*jal\\t%1\";
-  else if (GET_CODE (target) == CONST_INT)
+  if (GET_CODE (target) == CONST_INT)
     return \"%[li\\t%@,%1\\n\\t%*jal\\t%3,%@%]\";
+  else if (CONSTANT_ADDRESS_P (target))
+    return \"%*jal\\t%1\";
   else
     return \"%*jal\\t%3,%1\";
 }"
@@ -9911,15 +9911,15 @@ ld\\t%2,%1-%S1(%2)\;daddu\\t%2,%2,$31\;j\\t%2"
 {
   register rtx target = operands[1];
 
-  if (GET_CODE (target) == SYMBOL_REF)
+  if (GET_CODE (target) == CONST_INT)
+    return \"li\\t%^,%1\\n\\tjal\\t%3,%^\";
+  else if (CONSTANT_ADDRESS_P (target))
     {
       if (GET_MODE (target) == SImode)
        return \"la\\t%^,%1\\n\\tjal\\t%3,%^\";
       else
        return \"dla\\t%^,%1\\n\\tjal\\t%3,%^\";
     }
-  else if (GET_CODE (target) == CONST_INT)
-    return \"li\\t%^,%1\\n\\tjal\\t%3,%^\";
   else if (REGNO (target) != PIC_FUNCTION_ADDR_REGNUM)
     return \"move\\t%^,%1\\n\\tjal\\t%3,%^\";
   else
@@ -10023,10 +10023,10 @@ ld\\t%2,%1-%S1(%2)\;daddu\\t%2,%2,$31\;j\\t%2"
 {
   register rtx target = operands[1];
 
-  if (GET_CODE (target) == SYMBOL_REF)
-    return \"%*jal\\t%1\";
-  else if (GET_CODE (target) == CONST_INT)
+  if (GET_CODE (target) == CONST_INT)
     return \"%[li\\t%@,%1\\n\\t%*jal\\t%4,%@%]\";
+  else if (CONSTANT_ADDRESS_P (target))
+    return \"%*jal\\t%1\";
   else
     return \"%*jal\\t%4,%1\";
 }"
@@ -10046,15 +10046,15 @@ ld\\t%2,%1-%S1(%2)\;daddu\\t%2,%2,$31\;j\\t%2"
 {
   register rtx target = operands[1];
 
-  if (GET_CODE (target) == SYMBOL_REF)
+  if (GET_CODE (target) == CONST_INT)
+    return \"li\\t%^,%1\\n\\tjal\\t%4,%^\";
+  else if (CONSTANT_ADDRESS_P (target))
     {
       if (GET_MODE (target) == SImode)
        return \"la\\t%^,%1\\n\\tjal\\t%4,%^\";
       else
        return \"la\\t%^,%1\\n\\tjal\\t%4,%^\";
     }
-  else if (GET_CODE (target) == CONST_INT)
-    return \"li\\t%^,%1\\n\\tjal\\t%4,%^\";
   else if (REGNO (target) != PIC_FUNCTION_ADDR_REGNUM)
     return \"move\\t%^,%1\\n\\tjal\\t%4,%^\";
   else