]> gcc.gnu.org Git - gcc.git/commitdiff
(call_operand, call_operand_address): Accept any address not just REG rtx.
authorJim Wilson <wilson@gcc.gnu.org>
Tue, 8 Jun 1993 18:51:25 +0000 (11:51 -0700)
committerJim Wilson <wilson@gcc.gnu.org>
Tue, 8 Jun 1993 18:51:25 +0000 (11:51 -0700)
From-SVN: r4651

gcc/config/sparc/sparc.c

index e8f831c08a9698991fc72a9445f82fb6737b8a0e..5ecaa65ba7ee9637f0017367a583f2e295fe876d 100644 (file)
@@ -113,7 +113,8 @@ restore_operand (op, mode)
          && (REGNO (op) < 8 || (REGNO (op) >= 24 && REGNO (op) < 32)));
 }
 
-/* PC-relative call insn on SPARC is independent of `memory_operand'.  */
+/* Call insn on SPARC can take a PC-relative constant address, or any regular
+   memory address.  */
 
 int
 call_operand (op, mode)
@@ -123,7 +124,7 @@ call_operand (op, mode)
   if (GET_CODE (op) != MEM)
     abort ();
   op = XEXP (op, 0);
-  return (REG_P (op) || CONSTANT_P (op));
+  return (CONSTANT_P (op) || memory_address_p (Pmode, op));
 }
 
 int
@@ -131,7 +132,7 @@ call_operand_address (op, mode)
      rtx op;
      enum machine_mode mode;
 {
-  return (REG_P (op) || CONSTANT_P (op));
+  return (CONSTANT_P (op) || memory_address_p (Pmode, op));
 }
 
 /* Returns 1 if OP is either a symbol reference or a sum of a symbol
This page took 0.062614 seconds and 5 git commands to generate.