Use adjust_address_nv directly with appropriate mode.
authorFariborz Jahanian <fjahanian@gcc.gnu.org>
Mon, 26 Jan 2004 17:38:51 +0000 (17:38 +0000)
committerFariborz Jahanian <fjahanian@gcc.gnu.org>
Mon, 26 Jan 2004 17:38:51 +0000 (17:38 +0000)
OKed by David Edelsohn.

From-SVN: r76645

gcc/config/rs6000/rs6000.md

index 832106296691b02d58ec2579927ac1b68c44c530..4353e8acfc1afe94f7e24de4e9dee791a736e817 100644 (file)
   "
 {
   rtx temp = gen_reg_rtx (Pmode);
+  int units_per_word = (TARGET_32BIT) ? 4 : 8;
+  enum machine_mode wmode = (TARGET_32BIT) ? SImode : word_mode;
 
   /* Copy the backchain to the first word, sp to the second.  */
   emit_move_insn (temp, gen_rtx_MEM (Pmode, operands[1]));
-  emit_move_insn (operand_subword (operands[0], 0, 0,
-                                  (TARGET_32BIT ? DImode : TImode)),
-                 temp);
-  emit_move_insn (operand_subword (operands[0], 1, 0, (TARGET_32BIT ? DImode : TImode)),
+  emit_move_insn (adjust_address_nv (operands[0], wmode, 0), temp);
+  emit_move_insn (adjust_address_nv (operands[0], wmode, units_per_word),
                  operands[1]);
   DONE;
 }")
   "
 {
   rtx temp = gen_reg_rtx (Pmode);
+  int units_per_word = (TARGET_32BIT) ? 4 : 8;
+  enum machine_mode wmode = (TARGET_32BIT) ? SImode : word_mode;
 
   /* Restore the backchain from the first word, sp from the second.  */
   emit_move_insn (temp,
-                 operand_subword (operands[1], 0, 0, (TARGET_32BIT ? DImode : TImode)));
+                 adjust_address_nv (operands[1], wmode, 0));
   emit_move_insn (operands[0],
-                 operand_subword (operands[1], 1, 0,
-                                  (TARGET_32BIT ? DImode : TImode)));
+                 adjust_address_nv (operands[1], wmode, units_per_word));
   emit_move_insn (gen_rtx_MEM (Pmode, operands[0]), temp);
   DONE;
 }")