pa.c (emit_move_sequence): Do not stop on SUBREG_WORD of an operand.
authorJeffrey A Law <law@cygnus.com>
Fri, 27 Aug 1999 21:40:33 +0000 (21:40 +0000)
committerJeff Law <law@gcc.gnu.org>
Fri, 27 Aug 1999 21:40:33 +0000 (15:40 -0600)
        * pa.c (emit_move_sequence): Do not stop on SUBREG_WORD of an
        operand.

From-SVN: r28939

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

index a1a9b65a36c0748b593aed634764acd1774ed7e6..f123ab187d2954e77eebbf5a0c63236e9a0a7590 100644 (file)
@@ -1,3 +1,8 @@
+Fri Aug 27 15:35:24 1999  Jeffrey A Law  (law@cygnus.com)
+
+       * pa.c (emit_move_sequence): Do not stop on SUBREG_WORD of an
+       operand.
+
 Fri Aug 27 14:01:19 1999  Marc Espie <espie@cvs.openbsd.org>
 
        * config/openbsd.h: Define SET_ASM_OP.
index 7568f1fbaa4c5edc11f15e556ada733e3a0251db..640b02b71a7e394f43b2fd76cc32c3ecfc4d019b 100644 (file)
@@ -1136,8 +1136,12 @@ emit_move_sequence (operands, mode, scratch_reg)
           && GET_CODE (SUBREG_REG (operand0)) == REG
           && REGNO (SUBREG_REG (operand0)) >= FIRST_PSEUDO_REGISTER)
     {
-      SUBREG_REG (operand0) = reg_equiv_mem[REGNO (SUBREG_REG (operand0))];
-      operand0 = alter_subreg (operand0);
+     /* We must not alter SUBREG_WORD (operand0) since that would confuse
+       the code which tracks sets/uses for delete_output_reload.  */
+      rtx temp = gen_rtx_SUBREG (GET_MODE (operand0),
+                                reg_equiv_mem [REGNO (SUBREG_REG (operand0))],
+                                SUBREG_WORD (operand0));
+      operand0 = alter_subreg (temp);
     }
 
   if (scratch_reg
@@ -1149,8 +1153,12 @@ emit_move_sequence (operands, mode, scratch_reg)
           && GET_CODE (SUBREG_REG (operand1)) == REG
           && REGNO (SUBREG_REG (operand1)) >= FIRST_PSEUDO_REGISTER)
     {
-      SUBREG_REG (operand1) = reg_equiv_mem[REGNO (SUBREG_REG (operand1))];
-      operand1 = alter_subreg (operand1);
+     /* We must not alter SUBREG_WORD (operand0) since that would confuse
+       the code which tracks sets/uses for delete_output_reload.  */
+      rtx temp = gen_rtx_SUBREG (GET_MODE (operand1),
+                                reg_equiv_mem [REGNO (SUBREG_REG (operand1))],
+                                SUBREG_WORD (operand1));
+      operand1 = alter_subreg (temp);
     }
 
   if (scratch_reg && reload_in_progress && GET_CODE (operand0) == MEM