* pa.c (emit_move_sequence): If in reload, call find_replacement.
authorRichard Kenner <kenner@vlsi1.ultra.nyu.edu>
Tue, 24 Mar 1998 23:53:47 +0000 (23:53 +0000)
committerJeff Law <law@gcc.gnu.org>
Tue, 24 Mar 1998 23:53:47 +0000 (16:53 -0700)
From-SVN: r18812

gcc/ChangeLog
gcc/config/pa/pa.c

index 8b72e52a57c551ae2c6f5a78fbd56321a62fc320..1168dc09e7b6a4631fd2874141ce9b5327beab8d 100644 (file)
@@ -1,3 +1,7 @@
+Wed Mar 25 00:57:26 1998  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
+
+       * pa.c (emit_move_sequence): If in reload, call find_replacement.
+
 Tue Mar 24 10:44:11 1998  Nick Clifton  <nickc@cygnus.com>
 
        * Makefile.in (gcov$(exeext)): Support .exe extension to gcov.
index 7174d8a570e7507442e0b07d560f74e7cd315e34..9c8fcc9da714becc15d124253a972e2be702925e 100644 (file)
@@ -1074,6 +1074,7 @@ emit_move_sequence (operands, mode, scratch_reg)
 {
   register rtx operand0 = operands[0];
   register rtx operand1 = operands[1];
+  register rtx tem;
 
   if (reload_in_progress && GET_CODE (operand0) == REG
       && REGNO (operand0) >= FIRST_PSEUDO_REGISTER)
@@ -1097,6 +1098,15 @@ emit_move_sequence (operands, mode, scratch_reg)
       operand1 = alter_subreg (operand1);
     }
 
+  if (reload_in_progress && GET_CODE (operand0) == MEM
+      && ((tem = find_replacement (&XEXP (operand0, 0)))
+         != XEXP (operand0, 0)))
+    operand0 = gen_rtx (MEM, GET_MODE (operand0), tem);
+  if (reload_in_progress && GET_CODE (operand1) == MEM
+      && ((tem = find_replacement (&XEXP (operand1, 0)))
+         != XEXP (operand1, 0)))
+    operand1 = gen_rtx (MEM, GET_MODE (operand1), tem);
+
   /* Handle secondary reloads for loads/stores of FP registers from
      REG+D addresses where D does not fit in 5 bits, including 
      (subreg (mem (addr))) cases.  */