reload1.c (replace_pseudos_in_call_usage): Use reg_equiv_constant and reg_equiv_addre...
authorAlexandre Oliva <aoliva@redhat.com>
Sat, 13 Jan 2001 20:18:20 +0000 (20:18 +0000)
committerAlexandre Oliva <aoliva@gcc.gnu.org>
Sat, 13 Jan 2001 20:18:20 +0000 (20:18 +0000)
* reload1.c (replace_pseudos_in_call_usage): Use
reg_equiv_constant and reg_equiv_address, and don't try
regno_reg_rtx first.

From-SVN: r38991

gcc/ChangeLog
gcc/reload1.c

index dab14f2..8195fad 100644 (file)
@@ -1,3 +1,9 @@
+2001-01-13  Alexandre Oliva  <aoliva@redhat.com>
+
+       * reload1.c (replace_pseudos_in_call_usage): Use
+       reg_equiv_constant and reg_equiv_address, and don't try
+       regno_reg_rtx first.
+
 2001-01-13  Richard Henderson  <rth@redhat.com>
 
        * ggc-page.c (alloc_page): Round up allocation size to one page.
index a9da6dd..47e1eb4 100644 (file)
@@ -601,7 +601,9 @@ replace_pseudos_in_call_usage (loc, mem_mode, usage)
   code = GET_CODE (x);
   if (code == REG)
     {
-      if (REGNO (x) < FIRST_PSEUDO_REGISTER)
+      int regno = REGNO (x);
+
+      if (regno < FIRST_PSEUDO_REGISTER)
        return;
 
       x = eliminate_regs (x, mem_mode, usage);
@@ -612,10 +614,15 @@ replace_pseudos_in_call_usage (loc, mem_mode, usage)
          return;
        }
 
-      if (reg_renumber [REGNO (x)] < 0)
-       *loc = regno_reg_rtx[REGNO (x)];
-      else if (reg_equiv_mem[REGNO (x)])
-       *loc = reg_equiv_mem[REGNO (x)];
+      if (reg_equiv_constant[regno])
+       *loc = reg_equiv_constant[regno];
+      else if (reg_equiv_mem[regno])
+       *loc = reg_equiv_mem[regno];
+      else if (reg_equiv_address[regno])
+       *loc = gen_rtx_MEM (GET_MODE (x), reg_equiv_address[regno]);
+      else if (GET_CODE (regno_reg_rtx[regno]) != REG
+              || REGNO (regno_reg_rtx[regno]) != regno)
+       *loc = regno_reg_rtx[regno];
       else
        abort ();