This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

First patch in series to add more attribute to MEMs


This patch is a first in a series of patches to add more tracking to
MEMs.  The idea is to have a structure that records more information
about a MEM, including its alias set, alignment, decl it comes from, size,
and offset.

This patch starts the process by adding a new function adjust_address which
is given a mode and an offset and makes a new MEM.  The intent is that it
can better track what's happening to the MEM than change_address.  Subsequent
changes will add similar new functions and change the remainder of calls
to those new functions.  The last series will actually use them.

Mon Jul  2 15:33:31 2001  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>

	* emit-rtl.c (adjust_address): New function.
	* expr.h (adjust_address): Add declaration.
	* builtins.c: Replace some calls to change_address with calls to it
	or to validize_mem.
	* caller-save.c, dwarf2out.c, except.c, expmed.c, expr.c: Likewise.
	* function.c, config/a29k/a29k.md, config/alpha/alpha.c: Likewise.
	* config/arm/arm.c, config/convex/convex.c: Likewise.
	* config/dsp16xx/dsp16xx.md, config/fr30/fr30.c: Likewise.
	* config/i386/i386.c, config/i386/i386.md: Likewise.
	* config/ia64/ia64.c, config/ia64/ia64.md: Likewise.
	* config/m32r/m32r.c, config/m68k/m68k.md: Likewise.
	* config/m88k/m88k.c, config/mips/mips.md: Likewise.
	* config/ns32k/ns32k.c, config/rs6000/rs6000.c: Likewise.
	* config/sh/sh.c, config/sparc/sparc.md: Likewise.

*** builtins.c	2001/06/24 16:09:29	1.102
--- builtins.c	2001/07/02 15:33:54
*************** result_vector (savep, result)
*** 948,953 ****
  	  size = CEIL (size, align) * align;
  	reg = gen_rtx_REG (mode, savep ? regno : INCOMING_REGNO (regno));
! 	mem = change_address (result, mode,
! 			      plus_constant (XEXP (result, 0), size));
  	savevec[nelts++] = (savep
  			    ? gen_rtx_SET (VOIDmode, mem, reg)
--- 948,952 ----
  	  size = CEIL (size, align) * align;
  	reg = gen_rtx_REG (mode, savep ? regno : INCOMING_REGNO (regno));
! 	mem = adjust_address (result, mode, size);
  	savevec[nelts++] = (savep
  			    ? gen_rtx_SET (VOIDmode, mem, reg)
*************** expand_builtin_apply_args_1 ()
*** 990,1002 ****
  	tem = gen_rtx_REG (mode, INCOMING_REGNO (regno));
  
! 	emit_move_insn (change_address (registers, mode,
! 					plus_constant (XEXP (registers, 0),
! 						       size)),
! 			tem);
  	size += GET_MODE_SIZE (mode);
        }
  
    /* Save the arg pointer to the block.  */
!   emit_move_insn (change_address (registers, Pmode, XEXP (registers, 0)),
  		  copy_to_reg (virtual_incoming_args_rtx));
    size = GET_MODE_SIZE (Pmode);
--- 989,998 ----
  	tem = gen_rtx_REG (mode, INCOMING_REGNO (regno));
  
! 	emit_move_insn (adjust_address (registers, mode, size), tem);
  	size += GET_MODE_SIZE (mode);
        }
  
    /* Save the arg pointer to the block.  */
!   emit_move_insn (adjust_address (registers, Pmode, 0),
  		  copy_to_reg (virtual_incoming_args_rtx));
    size = GET_MODE_SIZE (Pmode);
*************** expand_builtin_apply_args_1 ()
*** 1006,1012 ****
    if (struct_value_incoming_rtx)
      {
!       emit_move_insn (change_address (registers, Pmode,
! 				      plus_constant (XEXP (registers, 0),
! 						     size)),
  		      copy_to_reg (struct_value_incoming_rtx));
        size += GET_MODE_SIZE (Pmode);
--- 1002,1006 ----
    if (struct_value_incoming_rtx)
      {
!       emit_move_insn (adjust_address (registers, Pmode, size),
  		      copy_to_reg (struct_value_incoming_rtx));
        size += GET_MODE_SIZE (Pmode);
*************** expand_builtin_apply (function, argument
*** 1125,1133 ****
  	  size = CEIL (size, align) * align;
  	reg = gen_rtx_REG (mode, regno);
! 	emit_move_insn (reg,
! 			change_address (arguments, mode,
! 					plus_constant (XEXP (arguments, 0),
! 						       size)));
! 
  	use_reg (&call_fusage, reg);
  	size += GET_MODE_SIZE (mode);
--- 1119,1123 ----
  	  size = CEIL (size, align) * align;
  	reg = gen_rtx_REG (mode, regno);
! 	emit_move_insn (reg, adjust_address (arguments, mode, size));
  	use_reg (&call_fusage, reg);
  	size += GET_MODE_SIZE (mode);
*************** expand_builtin_apply (function, argument
*** 1140,1147 ****
      {
        rtx value = gen_reg_rtx (Pmode);
!       emit_move_insn (value,
! 		      change_address (arguments, Pmode,
! 				      plus_constant (XEXP (arguments, 0),
! 						     size)));
        emit_move_insn (struct_value_rtx, value);
        if (GET_CODE (struct_value_rtx) == REG)
--- 1130,1134 ----
      {
        rtx value = gen_reg_rtx (Pmode);
!       emit_move_insn (value, adjust_address (arguments, Pmode, size));
        emit_move_insn (struct_value_rtx, value);
        if (GET_CODE (struct_value_rtx) == REG)
*************** expand_builtin_apply (function, argument
*** 1187,1193 ****
  				      const0_rtx, NULL_RTX, const0_rtx));
  
!       emit_move_insn (change_address (result, GET_MODE (valreg),
! 				      XEXP (result, 0)),
! 		      valreg);
      }
    else
--- 1174,1178 ----
  				      const0_rtx, NULL_RTX, const0_rtx));
  
!       emit_move_insn (adjust_address (result, GET_MODE (valreg), 0), valreg);
      }
    else
*************** expand_builtin_return (result)
*** 1265,1272 ****
  	  size = CEIL (size, align) * align;
  	reg = gen_rtx_REG (mode, INCOMING_REGNO (regno));
! 	emit_move_insn (reg,
! 			change_address (result, mode,
! 					plus_constant (XEXP (result, 0),
! 						       size)));
  
  	push_to_sequence (call_fusage);
--- 1250,1254 ----
  	  size = CEIL (size, align) * align;
  	reg = gen_rtx_REG (mode, INCOMING_REGNO (regno));
! 	emit_move_insn (reg, adjust_address (result, mode, size));
  
  	push_to_sequence (call_fusage);
*** caller-save.c	2001/04/03 15:05:17	1.36
--- caller-save.c	2001/07/02 15:33:54
*************** insert_restore (chain, before_p, regno, 
*** 678,682 ****
        && save_mode [regno] != GET_MODE (mem)
        && numregs == HARD_REGNO_NREGS (regno, save_mode [regno]))
!     mem = change_address (mem, save_mode[regno], XEXP (mem, 0));
    pat = gen_rtx_SET (VOIDmode,
  		     gen_rtx_REG (GET_MODE (mem), 
--- 678,682 ----
        && save_mode [regno] != GET_MODE (mem)
        && numregs == HARD_REGNO_NREGS (regno, save_mode [regno]))
!     mem = adjust_address (mem, save_mode[regno], 0);
    pat = gen_rtx_SET (VOIDmode,
  		     gen_rtx_REG (GET_MODE (mem), 
*************** insert_save (chain, before_p, regno, to_
*** 755,759 ****
        && save_mode [regno] != GET_MODE (mem)
        && numregs == HARD_REGNO_NREGS (regno, save_mode [regno]))
!     mem = change_address (mem, save_mode[regno], XEXP (mem, 0));
    pat = gen_rtx_SET (VOIDmode, mem,
  		     gen_rtx_REG (GET_MODE (mem),
--- 755,759 ----
        && save_mode [regno] != GET_MODE (mem)
        && numregs == HARD_REGNO_NREGS (regno, save_mode [regno]))
!     mem = adjust_address (mem, save_mode[regno], 0);
    pat = gen_rtx_SET (VOIDmode, mem,
  		     gen_rtx_REG (GET_MODE (mem),
*** dwarf2out.c	2001/06/10 13:47:55	1.277
--- dwarf2out.c	2001/07/02 15:34:03
*************** expand_builtin_init_dwarf_reg_sizes (add
*** 400,406 ****
  	continue;
  
!       emit_move_insn (change_address (mem, mode,
! 				      plus_constant (addr, offset)),
! 		      GEN_INT (size));
      }
  }
--- 400,404 ----
  	continue;
  
!       emit_move_insn (adjust_address (mem, mode, offset), GEN_INT (size));
      }
  }
*** emit-rtl.c	2001/06/28 03:52:28	1.183
--- emit-rtl.c	2001/07/02 15:34:07
*************** gen_lowpart (mode, x)
*** 1109,1113 ****
  		   - MIN (UNITS_PER_WORD, GET_MODE_SIZE (GET_MODE (x))));
  
!       return change_address (x, mode, plus_constant (XEXP (x, 0), offset));
      }
    else if (GET_CODE (x) == ADDRESSOF)
--- 1109,1113 ----
  		   - MIN (UNITS_PER_WORD, GET_MODE_SIZE (GET_MODE (x))));
  
!       return adjust_address (x, mode, offset);
      }
    else if (GET_CODE (x) == ADDRESSOF)
*************** change_address (memref, mode, addr)
*** 1601,1604 ****
--- 1601,1618 ----
    MEM_COPY_ATTRIBUTES (new, memref);
    return new;
+ }
+ /* Return a memory reference like MEMREF, but with its mode changed
+    to MODE and its address offset by OFFSET bytes.  */
+ 
+ rtx
+ adjust_address (memref, mode, offset)
+      rtx memref;
+      enum machine_mode mode;
+      HOST_WIDE_INT offset;
+ {
+   /* For now, this is just a wrapper for change_address, but eventually
+      will do memref tracking.  */
+   return
+     change_address (memref, mode, plus_constant (XEXP (memref, 0), offset));
  }
  
*** except.c	2001/06/18 06:43:51	1.169
--- except.c	2001/07/02 15:34:10
*************** sjlj_mark_call_sites (lp_info)
*** 2039,2045 ****
    rtx insn, mem;
  
!   mem = change_address (cfun->eh->sjlj_fc, TYPE_MODE (integer_type_node),
! 			plus_constant (XEXP (cfun->eh->sjlj_fc, 0),
! 				       sjlj_fc_call_site_ofs));
  
    for (insn = get_insns (); insn ; insn = NEXT_INSN (insn))
--- 2039,2044 ----
    rtx insn, mem;
  
!   mem = adjust_address (cfun->eh->sjlj_fc, TYPE_MODE (integer_type_node),
! 			sjlj_fc_call_site_ofs);
  
    for (insn = get_insns (); insn ; insn = NEXT_INSN (insn))
*************** sjlj_emit_function_enter (dispatch_label
*** 2157,2166 ****
       here, as we can not depend on emit_library_call to do it for us.  */
    assemble_external_libcall (eh_personality_libfunc);
!   mem = change_address (fc, Pmode,
! 			plus_constant (XEXP (fc, 0), sjlj_fc_personality_ofs));
    emit_move_insn (mem, eh_personality_libfunc);
  
!   mem = change_address (fc, Pmode,
! 			plus_constant (XEXP (fc, 0), sjlj_fc_lsda_ofs));
    if (cfun->uses_eh_lsda)
      {
--- 2156,2163 ----
       here, as we can not depend on emit_library_call to do it for us.  */
    assemble_external_libcall (eh_personality_libfunc);
!   mem = adjust_address (fc, Pmode, sjlj_fc_personality_ofs);
    emit_move_insn (mem, eh_personality_libfunc);
  
!   mem = adjust_address (fc, Pmode, sjlj_fc_lsda_ofs);
    if (cfun->uses_eh_lsda)
      {
*************** sjlj_emit_dispatch_table (dispatch_label
*** 2259,2268 ****
    /* Load up dispatch index, exc_ptr and filter values from the
       function context.  */
!   mem = change_address (fc, TYPE_MODE (integer_type_node),
! 			plus_constant (XEXP (fc, 0), sjlj_fc_call_site_ofs));
    dispatch = copy_to_reg (mem);
  
!   mem = change_address (fc, word_mode,
! 			plus_constant (XEXP (fc, 0), sjlj_fc_data_ofs));
    if (word_mode != Pmode)
      {
--- 2256,2264 ----
    /* Load up dispatch index, exc_ptr and filter values from the
       function context.  */
!   mem = adjust_address (fc, TYPE_MODE (integer_type_node),
! 			sjlj_fc_call_site_ofs);
    dispatch = copy_to_reg (mem);
  
!   mem = adjust_address (fc, word_mode, sjlj_fc_data_ofs);
    if (word_mode != Pmode)
      {
*************** sjlj_emit_dispatch_table (dispatch_label
*** 2275,2281 ****
    emit_move_insn (cfun->eh->exc_ptr, mem);
  
!   mem = change_address (fc, word_mode,
! 			plus_constant (XEXP (fc, 0),
! 				       sjlj_fc_data_ofs + UNITS_PER_WORD));
    emit_move_insn (cfun->eh->filter, mem);
  
--- 2271,2275 ----
    emit_move_insn (cfun->eh->exc_ptr, mem);
  
!   mem = adjust_address (fc, word_mode, sjlj_fc_data_ofs + UNITS_PER_WORD);
    emit_move_insn (cfun->eh->filter, mem);
  
*** expmed.c	2001/05/22 07:40:25	1.80
--- expmed.c	2001/07/02 15:34:14
*************** store_bit_field (str_rtx, bitsize, bitnu
*** 316,321 ****
  				  + (offset * UNITS_PER_WORD));
  	  else
! 	    op0 = change_address (op0, fieldmode,
! 				  plus_constant (XEXP (op0, 0), offset));
  	}
        emit_move_insn (op0, value);
--- 316,320 ----
  				  + (offset * UNITS_PER_WORD));
  	  else
! 	    op0 = adjust_address (op0, fieldmode, offset);
  	}
        emit_move_insn (op0, value);
*************** store_bit_field (str_rtx, bitsize, bitnu
*** 332,336 ****
        {
  	if (GET_CODE (op0) == MEM)
! 	  op0 = change_address (op0, imode, NULL_RTX);
  	else if (imode != BLKmode)
  	  op0 = gen_lowpart (imode, op0);
--- 331,335 ----
        {
  	if (GET_CODE (op0) == MEM)
! 	  op0 = adjust_address (op0, imode, 0);
  	else if (imode != BLKmode)
  	  op0 = gen_lowpart (imode, op0);
*************** store_bit_field (str_rtx, bitsize, bitnu
*** 533,538 ****
  	  offset = (bitnum / unit) * GET_MODE_SIZE (bestmode);
  	  bitpos = bitnum % unit;
! 	  op0 = change_address (op0, bestmode, 
! 				plus_constant (XEXP (op0, 0), offset));
  
  	  /* Fetch that unit, store the bitfield in it, then store
--- 532,536 ----
  	  offset = (bitnum / unit) * GET_MODE_SIZE (bestmode);
  	  bitpos = bitnum % unit;
! 	  op0 = adjust_address (op0, bestmode,  offset);
  
  	  /* Fetch that unit, store the bitfield in it, then store
*************** store_bit_field (str_rtx, bitsize, bitnu
*** 548,553 ****
        /* Add OFFSET into OP0's address.  */
        if (GET_CODE (xop0) == MEM)
! 	xop0 = change_address (xop0, byte_mode,
! 			       plus_constant (XEXP (xop0, 0), offset));
  
        /* If xop0 is a register, we need it in MAXMODE
--- 546,550 ----
        /* Add OFFSET into OP0's address.  */
        if (GET_CODE (xop0) == MEM)
! 	xop0 = adjust_address (xop0, byte_mode, offset);
  
        /* If xop0 is a register, we need it in MAXMODE
*************** store_fixed_bit_field (op0, offset, bits
*** 711,716 ****
        bitpos += (offset % (total_bits / BITS_PER_UNIT)) * BITS_PER_UNIT;
        offset -= (offset % (total_bits / BITS_PER_UNIT));
!       op0 = change_address (op0, mode,
! 			    plus_constant (XEXP (op0, 0), offset));
      }
  
--- 708,712 ----
        bitpos += (offset % (total_bits / BITS_PER_UNIT)) * BITS_PER_UNIT;
        offset -= (offset % (total_bits / BITS_PER_UNIT));
!       op0 = adjust_address (op0, mode, offset);
      }
  
*************** extract_bit_field (str_rtx, bitsize, bit
*** 1049,1053 ****
        {
  	if (GET_CODE (op0) == MEM)
! 	  op0 = change_address (op0, imode, NULL_RTX);
  	else if (imode != BLKmode)
  	  op0 = gen_lowpart (imode, op0);
--- 1045,1049 ----
        {
  	if (GET_CODE (op0) == MEM)
! 	  op0 = adjust_address (op0, imode, 0);
  	else if (imode != BLKmode)
  	  op0 = gen_lowpart (imode, op0);
*************** extract_bit_field (str_rtx, bitsize, bit
*** 1116,1121 ****
  				  + (offset * UNITS_PER_WORD));
  	  else
! 	    op0 = change_address (op0, mode1,
! 				  plus_constant (XEXP (op0, 0), offset));
  	}
        if (mode1 != mode)
--- 1112,1116 ----
  				  + (offset * UNITS_PER_WORD));
  	  else
! 	    op0 = adjust_address (op0, mode1, offset);
  	}
        if (mode1 != mode)
*************** extract_bit_field (str_rtx, bitsize, bit
*** 1292,1298 ****
  		  xoffset = (bitnum / unit) * GET_MODE_SIZE (bestmode);
  		  xbitpos = bitnum % unit;
! 		  xop0 = change_address (xop0, bestmode,
! 					 plus_constant (XEXP (xop0, 0),
! 							xoffset));
  		  /* Fetch it to a register in that size.  */
  		  xop0 = force_reg (bestmode, xop0);
--- 1287,1292 ----
  		  xoffset = (bitnum / unit) * GET_MODE_SIZE (bestmode);
  		  xbitpos = bitnum % unit;
! 		  xop0 = adjust_address (xop0, bestmode, xoffset);
! 
  		  /* Fetch it to a register in that size.  */
  		  xop0 = force_reg (bestmode, xop0);
*************** extract_bit_field (str_rtx, bitsize, bit
*** 1302,1307 ****
  	      else
  		/* Get ref to first byte containing part of the field.  */
! 		xop0 = change_address (xop0, byte_mode,
! 				       plus_constant (XEXP (xop0, 0), xoffset));
  
  	      volatile_ok = save_volatile_ok;
--- 1296,1300 ----
  	      else
  		/* Get ref to first byte containing part of the field.  */
! 		xop0 = adjust_address (xop0, byte_mode, xoffset);
  
  	      volatile_ok = save_volatile_ok;
*************** extract_bit_field (str_rtx, bitsize, bit
*** 1429,1435 ****
  		  xoffset = (bitnum / unit) * GET_MODE_SIZE (bestmode);
  		  xbitpos = bitnum % unit;
! 		  xop0 = change_address (xop0, bestmode,
! 					 plus_constant (XEXP (xop0, 0),
! 							xoffset));
  		  /* Fetch it to a register in that size.  */
  		  xop0 = force_reg (bestmode, xop0);
--- 1422,1427 ----
  		  xoffset = (bitnum / unit) * GET_MODE_SIZE (bestmode);
  		  xbitpos = bitnum % unit;
! 		  xop0 = adjust_address (xop0, bestmode, xoffset);
! 
  		  /* Fetch it to a register in that size.  */
  		  xop0 = force_reg (bestmode, xop0);
*************** extract_bit_field (str_rtx, bitsize, bit
*** 1439,1444 ****
  	      else
  		/* Get ref to first byte containing part of the field.  */
! 		xop0 = change_address (xop0, byte_mode,
! 				       plus_constant (XEXP (xop0, 0), xoffset));
  	    }
  
--- 1431,1435 ----
  	      else
  		/* Get ref to first byte containing part of the field.  */
! 		xop0 = adjust_address (xop0, byte_mode, xoffset);
  	    }
  
*************** extract_fixed_bit_field (tmode, op0, off
*** 1607,1612 ****
        bitpos += (offset % (total_bits / BITS_PER_UNIT)) * BITS_PER_UNIT;
        offset -= (offset % (total_bits / BITS_PER_UNIT));
!       op0 = change_address (op0, mode,
! 			    plus_constant (XEXP (op0, 0), offset));
      }
  
--- 1598,1602 ----
        bitpos += (offset % (total_bits / BITS_PER_UNIT)) * BITS_PER_UNIT;
        offset -= (offset % (total_bits / BITS_PER_UNIT));
!       op0 = adjust_address (op0, mode, offset);
      }
  
*** expr.c	2001/07/01 20:49:58	1.331
--- expr.c	2001/07/02 15:34:23
*************** move_by_pieces_1 (genfun, mode, data)
*** 1582,1587 ****
  	    }
  	  else
! 	    to1 = change_address (data->to, mode,
! 				  plus_constant (data->to_addr, data->offset));
  	}
  
--- 1582,1586 ----
  	    }
  	  else
! 	    to1 = adjust_address (data->to, mode, data->offset);
  	}
  
*************** move_by_pieces_1 (genfun, mode, data)
*** 1592,1597 ****
  	}
        else
! 	from1 = change_address (data->from, mode,
! 				plus_constant (data->from_addr, data->offset));
  
        if (HAVE_PRE_DECREMENT && data->explicit_inc_to < 0)
--- 1591,1595 ----
  	}
        else
! 	from1 = adjust_address (data->from, mode, data->offset);
  
        if (HAVE_PRE_DECREMENT && data->explicit_inc_to < 0)
*************** emit_group_load (dst, orig_src, ssize, a
*** 2006,2013 ****
  	{
  	  tmps[i] = gen_reg_rtx (mode);
! 	  emit_move_insn (tmps[i],
! 			  change_address (src, mode,
! 					  plus_constant (XEXP (src, 0),
! 							 bytepos)));
  	}
        else if (GET_CODE (src) == CONCAT)
--- 2004,2008 ----
  	{
  	  tmps[i] = gen_reg_rtx (mode);
! 	  emit_move_insn (tmps[i], adjust_address (src, mode, bytepos));
  	}
        else if (GET_CODE (src) == CONCAT)
*************** emit_group_store (orig_dst, src, ssize, 
*** 2129,2139 ****
  	  && bytepos * BITS_PER_UNIT % GET_MODE_ALIGNMENT (mode) == 0
  	  && bytelen == GET_MODE_SIZE (mode))
! 	emit_move_insn (change_address (dst, mode,
! 					plus_constant (XEXP (dst, 0),
! 						       bytepos)),
! 			tmps[i]);
        else
  	store_bit_field (dst, bytelen * BITS_PER_UNIT, bytepos * BITS_PER_UNIT,
! 			   mode, tmps[i], align, ssize);
      }
  
--- 2124,2131 ----
  	  && bytepos * BITS_PER_UNIT % GET_MODE_ALIGNMENT (mode) == 0
  	  && bytelen == GET_MODE_SIZE (mode))
! 	emit_move_insn (adjust_address (dst, mode, bytepos), tmps[i]);
        else
  	store_bit_field (dst, bytelen * BITS_PER_UNIT, bytepos * BITS_PER_UNIT,
! 			 mode, tmps[i], align, ssize);
      }
  
*************** store_by_pieces_2 (genfun, mode, data)
*** 2522,2527 ****
  	}
        else
! 	to1 = change_address (data->to, mode,
! 			      plus_constant (data->to_addr, data->offset));
  
        if (HAVE_PRE_DECREMENT && data->explicit_inc_to < 0)
--- 2514,2518 ----
  	}
        else
! 	to1 = adjust_address (data->to, mode, data->offset);
  
        if (HAVE_PRE_DECREMENT && data->explicit_inc_to < 0)
*************** emit_move_insn_1 (x, y)
*** 2912,2916 ****
  		      rtx mem = assign_stack_temp (reg_mode,
  						   GET_MODE_SIZE (mode), 0);
! 		      rtx cmem = change_address (mem, mode, NULL_RTX);
  
  		      cfun->cannot_inline
--- 2903,2907 ----
  		      rtx mem = assign_stack_temp (reg_mode,
  						   GET_MODE_SIZE (mode), 0);
! 		      rtx cmem = adjust_address (mem, mode, 0);
  
  		      cfun->cannot_inline
*************** emit_push_insn (x, mode, type, size, ali
*** 3266,3271 ****
  
        if (partial != 0)
! 	xinner = change_address (xinner, BLKmode,
! 				 plus_constant (XEXP (xinner, 0), used));
  
        /* If the partial register-part of the arg counts in its stack size,
--- 3257,3261 ----
  
        if (partial != 0)
! 	xinner = adjust_address (xinner, BLKmode, used);
  
        /* If the partial register-part of the arg counts in its stack size,
*************** expand_assignment (to, from, want_value,
*** 3726,3733 ****
  	      && alignment == GET_MODE_ALIGNMENT (mode1))
  	    {
! 	      rtx temp = change_address (to_rtx, mode1,
! 				         plus_constant (XEXP (to_rtx, 0),
! 						        (bitpos /
! 						         BITS_PER_UNIT)));
  	      if (GET_CODE (XEXP (temp, 0)) == REG)
  	        to_rtx = temp;
--- 3716,3722 ----
  	      && alignment == GET_MODE_ALIGNMENT (mode1))
  	    {
! 	      rtx temp
! 		= adjust_address (to_rtx, mode1, bitpos / BITS_PER_UNIT);
! 
  	      if (GET_CODE (XEXP (temp, 0)) == REG)
  	        to_rtx = temp;
*************** expand_assignment (to, from, want_value,
*** 3811,3817 ****
  	  rtx from_rtx = expand_expr_unaligned (from, &from_align);
  	  rtx inner_to_rtx
! 	    = change_address (to_rtx, BLKmode,
! 			      plus_constant (XEXP (to_rtx, 0),
! 					     bitpos / BITS_PER_UNIT));
  
  	  emit_block_move (inner_to_rtx, from_rtx, expr_size (from),
--- 3800,3804 ----
  	  rtx from_rtx = expand_expr_unaligned (from, &from_align);
  	  rtx inner_to_rtx
! 	    = adjust_address (to_rtx, BLKmode, bitpos / BITS_PER_UNIT);
  
  	  emit_block_move (inner_to_rtx, from_rtx, expr_size (from),
*************** store_constructor_field (target, bitsize
*** 4460,4470 ****
        if (bitpos != 0)
  	target
! 	  = change_address (target,
  			    GET_MODE (target) == BLKmode
  			    || 0 != (bitpos
  				     % GET_MODE_ALIGNMENT (GET_MODE (target)))
! 			    ? BLKmode : VOIDmode,
! 			    plus_constant (XEXP (target, 0),
! 					   bitpos / BITS_PER_UNIT));
  
  
--- 4447,4455 ----
        if (bitpos != 0)
  	target
! 	  = adjust_address (target,
  			    GET_MODE (target) == BLKmode
  			    || 0 != (bitpos
  				     % GET_MODE_ALIGNMENT (GET_MODE (target)))
! 			    ? BLKmode : VOIDmode, bitpos / BITS_PER_UNIT);
  
  
*************** store_constructor (exp, target, align, c
*** 4992,4999 ****
  			 it's single-word.  */
  		      if (GET_CODE (target) == MEM)
! 			{
! 			  to_rtx = plus_constant (XEXP (target, 0), offset);
! 			  to_rtx = change_address (target, mode, to_rtx);
! 			}
  		      else if (offset == 0)
  			to_rtx = target;
--- 4977,4981 ----
  			 it's single-word.  */
  		      if (GET_CODE (target) == MEM)
! 			to_rtx = adjust_address (target, mode, offset);
  		      else if (offset == 0)
  			to_rtx = target;
*************** store_field (target, bitsize, bitpos, mo
*** 5253,5259 ****
  	    abort ();
  
! 	  target = change_address (target, VOIDmode,
! 				   plus_constant (XEXP (target, 0),
! 						bitpos / BITS_PER_UNIT));
  
  	  /* Make sure that ALIGN is no stricter than the alignment of EXP.  */
--- 5235,5239 ----
  	    abort ();
  
! 	  target = adjust_address (target, VOIDmode, bitpos / BITS_PER_UNIT);
  
  	  /* Make sure that ALIGN is no stricter than the alignment of EXP.  */
*************** expand_expr (exp, target, tmode, modifie
*** 7080,7087 ****
  		&& alignment == GET_MODE_ALIGNMENT (mode1))
  	      {
! 		rtx temp = change_address (op0, mode1,
! 					   plus_constant (XEXP (op0, 0),
! 							  (bitpos /
! 							   BITS_PER_UNIT)));
  		if (GET_CODE (XEXP (temp, 0)) == REG)
  		  op0 = temp;
--- 7060,7065 ----
  		&& alignment == GET_MODE_ALIGNMENT (mode1))
  	      {
! 		rtx temp = adjust_address (op0, mode1, bitpos / BITS_PER_UNIT);
! 
  		if (GET_CODE (XEXP (temp, 0)) == REG)
  		  op0 = temp;
*************** expand_expr (exp, target, tmode, modifie
*** 7182,7188 ****
  		  abort ();
  
! 		op0 = change_address (op0, VOIDmode,
! 				      plus_constant (XEXP (op0, 0),
! 						     bitpos / BITS_PER_UNIT));
  		if (target == 0)
  		  target = assign_temp (type, 0, 1, 1);
--- 7160,7164 ----
  		  abort ();
  
! 		op0 = adjust_address (op0, VOIDmode, bitpos / BITS_PER_UNIT);
  		if (target == 0)
  		  target = assign_temp (type, 0, 1, 1);
*************** expand_expr (exp, target, tmode, modifie
*** 7249,7255 ****
  	  }
  	else
! 	  op0 = change_address (op0, mode1,
! 				plus_constant (XEXP (op0, 0),
! 					       (bitpos / BITS_PER_UNIT)));
  
  	set_mem_attributes (op0, exp, 0);
--- 7225,7229 ----
  	  }
  	else
! 	  op0 = adjust_address (op0, mode1, bitpos / BITS_PER_UNIT);
  
  	set_mem_attributes (op0, exp, 0);
*************** expand_expr (exp, target, tmode, modifie
*** 7451,7455 ****
  	    /* Store data into beginning of memory target.  */
  	    store_expr (TREE_OPERAND (exp, 0),
! 			change_address (target, TYPE_MODE (valtype), 0), 0);
  
  	  else if (GET_CODE (target) == REG)
--- 7425,7429 ----
  	    /* Store data into beginning of memory target.  */
  	    store_expr (TREE_OPERAND (exp, 0),
! 			adjust_address (target, TYPE_MODE (valtype), 0), 0);
  
  	  else if (GET_CODE (target) == REG)
*************** expand_expr_unaligned (exp, palign)
*** 9123,9129 ****
  		  abort ();
  
! 		op0 = change_address (op0, VOIDmode,
! 				      plus_constant (XEXP (op0, 0),
! 						     bitpos / BITS_PER_UNIT));
  	      }
  	    else
--- 9097,9101 ----
  		  abort ();
  
! 		op0 = adjust_address (op0, VOIDmode, bitpos / BITS_PER_UNIT);
  	      }
  	    else
*************** expand_expr_unaligned (exp, palign)
*** 9157,9163 ****
  	else
  	  /* Get a reference to just this component.  */
! 	  op0 = change_address (op0, mode1,
! 				plus_constant (XEXP (op0, 0),
! 					       (bitpos / BITS_PER_UNIT)));
  
  	MEM_ALIAS_SET (op0) = get_alias_set (exp);
--- 9129,9133 ----
  	else
  	  /* Get a reference to just this component.  */
! 	  op0 = adjust_address (op0, mode1, bitpos / BITS_PER_UNIT);
  
  	MEM_ALIAS_SET (op0) = get_alias_set (exp);
*** expr.h	2001/04/14 03:39:22	1.80
--- expr.h	2001/07/02 15:34:25
*************** extern rtx memory_address_noforce PARAMS
*** 1151,1154 ****
--- 1151,1158 ----
  extern rtx change_address PARAMS ((rtx, enum machine_mode, rtx));
  
+ /* Return a memory reference like MEMREF, but with its mode changed
+    to MODE and its address offset by OFFSET bytes.  */
+ extern rtx adjust_address PARAMS ((rtx, enum machine_mode, HOST_WIDE_INT));
+ 
  /* Return a memory reference like MEMREF, but which is known to have a
     valid address.  */
*** function.c	2001/07/01 13:34:02	1.278
--- function.c	2001/07/02 15:34:35
*************** fixup_memory_subreg (x, insn, uncritical
*** 2519,2528 ****
      abort ();
  
!   addr = plus_constant (addr, offset);
!   if (!flag_force_addr && memory_address_p (mode, addr))
      /* Shortcut if no insns need be emitted.  */
!     return change_address (SUBREG_REG (x), mode, addr);
    start_sequence ();
!   result = change_address (SUBREG_REG (x), mode, addr);
    emit_insn_before (gen_sequence (), insn);
    end_sequence ();
--- 2519,2529 ----
      abort ();
  
!   if (!flag_force_addr
!       && memory_address_p (mode, plus_constant (addr, offset)))
      /* Shortcut if no insns need be emitted.  */
!     return adjust_address (SUBREG_REG (x), mode, offset);
! 
    start_sequence ();
!   result = adjust_address (SUBREG_REG (x), mode, offset);
    emit_insn_before (gen_sequence (), insn);
    end_sequence ();
*************** optimize_bit_field (body, insn, equiv_me
*** 2722,2727 ****
  
  	  start_sequence ();
! 	  memref = change_address (memref, mode,
! 				   plus_constant (XEXP (memref, 0), offset));
  	  insns = get_insns ();
  	  end_sequence ();
--- 2723,2727 ----
  
  	  start_sequence ();
! 	  memref = adjust_address (memref, mode, offset);
  	  insns = get_insns ();
  	  end_sequence ();
*************** assign_parms (fndecl)
*** 4988,4996 ****
  					    TREE_UNSIGNED (TREE_TYPE (parm)));
  	      if (stack_parm)
! 		{
! 		  /* ??? This may need a big-endian conversion on sparc64.  */
! 		  stack_parm = change_address (stack_parm, nominal_mode,
! 					       NULL_RTX);
! 		}
  	      conversion_insns = get_insns ();
  	      did_conversion = 1;
--- 4988,4994 ----
  					    TREE_UNSIGNED (TREE_TYPE (parm)));
  	      if (stack_parm)
! 		/* ??? This may need a big-endian conversion on sparc64.  */
! 		stack_parm = adjust_address (stack_parm, nominal_mode, 0);
! 
  	      conversion_insns = get_insns ();
  	      did_conversion = 1;
*** config/a29k/a29k.md	1999/10/15 06:38:01	1.4
--- config/a29k/a29k.md	2001/07/02 15:34:42
***************
*** 2376,2381 ****
        if (! memory_address_p (TImode, XEXP (operands[1], 0))
  	  && ! reload_in_progress)
!         operands[1] = change_address (operands[1], TImode,
! 				      XEXP (operands[1], 0));
      }
  }")
--- 2377,2381 ----
        if (! memory_address_p (TImode, XEXP (operands[1], 0))
  	  && ! reload_in_progress)
!         operands[1] = adjust_address (operands[1], TImode, 0);
      }
  }")
*** config/alpha/alpha.c	2001/06/26 18:08:29	1.165
--- config/alpha/alpha.c	2001/07/02 15:34:52
*************** alpha_split_tfmode_pair (operands)
*** 2398,2404 ****
    else if (GET_CODE (operands[1]) == MEM)
      {
!       operands[3] = change_address (operands[1], DImode,
! 				    plus_constant (XEXP (operands[1], 0), 8));
!       operands[2] = change_address (operands[1], DImode, NULL_RTX);
      }
    else if (operands[1] == CONST0_RTX (TFmode))
--- 2398,2403 ----
    else if (GET_CODE (operands[1]) == MEM)
      {
!       operands[3] = adjust_address (operands[1], DImode, 8);
!       operands[2] = adjust_address (operands[1], DImode, 0);
      }
    else if (operands[1] == CONST0_RTX (TFmode))
*************** alpha_split_tfmode_pair (operands)
*** 2414,2420 ****
    else if (GET_CODE (operands[0]) == MEM)
      {
!       operands[1] = change_address (operands[0], DImode,
! 				    plus_constant (XEXP (operands[0], 0), 8));
!       operands[0] = change_address (operands[0], DImode, NULL_RTX);
      }
    else
--- 2413,2418 ----
    else if (GET_CODE (operands[0]) == MEM)
      {
!       operands[1] = adjust_address (operands[0], DImode, 8);
!       operands[0] = adjust_address (operands[0], DImode, 0);
      }
    else
*************** alpha_expand_unaligned_load_words (out_r
*** 2695,2700 ****
  
    if (ofs != 0)
!     smem = change_address (smem, GET_MODE (smem),
! 			   plus_constant (XEXP (smem, 0), ofs));
    
    /* Load up all of the source data.  */
--- 2693,2697 ----
  
    if (ofs != 0)
!     smem = adjust_address (smem, GET_MODE (smem), ofs);
    
    /* Load up all of the source data.  */
*************** alpha_expand_unaligned_store_words (data
*** 2772,2778 ****
    
    if (ofs != 0)
!     dmem = change_address (dmem, GET_MODE (dmem),
! 			   plus_constant (XEXP (dmem, 0), ofs));
!   
  
    st_addr_2 = change_address (dmem, DImode,
--- 2769,2773 ----
    
    if (ofs != 0)
!     dmem = adjust_address (dmem, GET_MODE (dmem), ofs);
  
    st_addr_2 = change_address (dmem, DImode,
*************** alpha_expand_block_move (operands)
*** 2951,2957 ****
        for (i = 0; i < words; ++i)
  	emit_move_insn (data_regs[nregs + i],
! 			change_address (orig_src, DImode,
! 					plus_constant (XEXP (orig_src, 0), 
! 						       ofs + i * 8)));
  
        nregs += words;
--- 2946,2950 ----
        for (i = 0; i < words; ++i)
  	emit_move_insn (data_regs[nregs + i],
! 			adjust_address (orig_src, DImode, ofs + i * 8));
  
        nregs += words;
*************** alpha_expand_block_move (operands)
*** 3007,3014 ****
  	  do {
  	    data_regs[nregs++] = tmp = gen_reg_rtx (HImode);
! 	    emit_move_insn (tmp,
! 			    change_address (orig_src, HImode,
! 					    plus_constant (XEXP (orig_src, 0),
! 							   ofs)));
  	    bytes -= 2;
  	    ofs += 2;
--- 3000,3004 ----
  	  do {
  	    data_regs[nregs++] = tmp = gen_reg_rtx (HImode);
! 	    emit_move_insn (tmp, adjust_address (orig_src, HImode, ofs));
  	    bytes -= 2;
  	    ofs += 2;
*************** alpha_expand_block_move (operands)
*** 3027,3034 ****
      {
        data_regs[nregs++] = tmp = gen_reg_rtx (QImode);
!       emit_move_insn (tmp,
! 		      change_address (orig_src, QImode,
! 				      plus_constant (XEXP (orig_src, 0),
! 						     ofs)));
        bytes -= 1;
        ofs += 1;
--- 3017,3021 ----
      {
        data_regs[nregs++] = tmp = gen_reg_rtx (QImode);
!       emit_move_insn (tmp, adjust_address (orig_src, QImode, ofs));
        bytes -= 1;
        ofs += 1;
*************** alpha_expand_block_move (operands)
*** 3100,3106 ****
        while (i < nregs && GET_MODE (data_regs[i]) == DImode)
  	{
! 	  emit_move_insn (change_address (orig_dst, DImode,
! 					  plus_constant (XEXP (orig_dst, 0),
! 							 ofs)),
  			  data_regs[i]);
  	  ofs += 8;
--- 3087,3091 ----
        while (i < nregs && GET_MODE (data_regs[i]) == DImode)
  	{
! 	  emit_move_insn (adjust_address (orig_dst, DImode, ofs),
  			  data_regs[i]);
  	  ofs += 8;
*************** alpha_expand_block_move (operands)
*** 3118,3128 ****
  			      NULL_RTX, 1, OPTAB_WIDEN);
  
! 	  emit_move_insn (change_address (orig_dst, SImode,
! 					  plus_constant (XEXP (orig_dst, 0),
! 							 ofs)),
  			  gen_lowpart (SImode, data_regs[i]));
! 	  emit_move_insn (change_address (orig_dst, SImode,
! 					  plus_constant (XEXP (orig_dst, 0),
! 							 ofs + 4)),
  			  gen_lowpart (SImode, tmp));
  	  ofs += 8;
--- 3103,3109 ----
  			      NULL_RTX, 1, OPTAB_WIDEN);
  
! 	  emit_move_insn (adjust_address (orig_dst, SImode, ofs),
  			  gen_lowpart (SImode, data_regs[i]));
! 	  emit_move_insn (adjust_address (orig_dst, SImode, ofs + 4),
  			  gen_lowpart (SImode, tmp));
  	  ofs += 8;
*************** alpha_expand_block_move (operands)
*** 3132,3138 ****
        while (i < nregs && GET_MODE (data_regs[i]) == SImode)
  	{
! 	  emit_move_insn (change_address(orig_dst, SImode,
! 					 plus_constant (XEXP (orig_dst, 0),
! 							ofs)),
  			  data_regs[i]);
  	  ofs += 4;
--- 3113,3117 ----
        while (i < nregs && GET_MODE (data_regs[i]) == SImode)
  	{
! 	  emit_move_insn (adjust_address (orig_dst, SImode, ofs),
  			  data_regs[i]);
  	  ofs += 4;
*************** alpha_expand_block_move (operands)
*** 3172,3179 ****
      while (i < nregs && GET_MODE (data_regs[i]) == HImode)
        {
! 	emit_move_insn (change_address (orig_dst, HImode,
! 					plus_constant (XEXP (orig_dst, 0),
! 						       ofs)),
! 			data_regs[i]);
  	i++;
  	ofs += 2;
--- 3151,3155 ----
      while (i < nregs && GET_MODE (data_regs[i]) == HImode)
        {
! 	emit_move_insn (adjust_address (orig_dst, HImode, ofs), data_regs[i]);
  	i++;
  	ofs += 2;
*************** alpha_expand_block_move (operands)
*** 3189,3196 ****
    while (i < nregs && GET_MODE (data_regs[i]) == QImode)
      {
!       emit_move_insn (change_address (orig_dst, QImode,
! 				      plus_constant (XEXP (orig_dst, 0),
! 						     ofs)),
! 		      data_regs[i]);
        i++;
        ofs += 1;
--- 3165,3169 ----
    while (i < nregs && GET_MODE (data_regs[i]) == QImode)
      {
!       emit_move_insn (adjust_address (orig_dst, QImode, ofs), data_regs[i]);
        i++;
        ofs += 1;
*************** alpha_expand_block_clear (operands)
*** 3279,3285 ****
  	  HOST_WIDE_INT mask;
  
! 	  mem = change_address (orig_dst, mode,
! 				plus_constant (XEXP (orig_dst, 0),
! 					       ofs - inv_alignofs));
  	  MEM_ALIAS_SET (mem) = 0;
  
--- 3252,3256 ----
  	  HOST_WIDE_INT mask;
  
! 	  mem = adjust_address (orig_dst, mode, ofs - inv_alignofs);
  	  MEM_ALIAS_SET (mem) = 0;
  
*************** alpha_expand_block_clear (operands)
*** 3307,3314 ****
        if (TARGET_BWX && (alignofs & 1) && bytes >= 1)
  	{
! 	  emit_move_insn (change_address (orig_dst, QImode,
! 					  plus_constant (XEXP (orig_dst, 0),
! 						         ofs)),
! 			  const0_rtx);
  	  bytes -= 1;
  	  ofs += 1;
--- 3278,3282 ----
        if (TARGET_BWX && (alignofs & 1) && bytes >= 1)
  	{
! 	  emit_move_insn (adjust_address (orig_dst, QImode, ofs), const0_rtx);
  	  bytes -= 1;
  	  ofs += 1;
*************** alpha_expand_block_clear (operands)
*** 3317,3324 ****
        if (TARGET_BWX && align >= 16 && (alignofs & 3) == 2 && bytes >= 2)
  	{
! 	  emit_move_insn (change_address (orig_dst, HImode,
! 					  plus_constant (XEXP (orig_dst, 0),
! 						         ofs)),
! 			  const0_rtx);
  	  bytes -= 2;
  	  ofs += 2;
--- 3285,3289 ----
        if (TARGET_BWX && align >= 16 && (alignofs & 3) == 2 && bytes >= 2)
  	{
! 	  emit_move_insn (adjust_address (orig_dst, HImode, ofs), const0_rtx);
  	  bytes -= 2;
  	  ofs += 2;
*************** alpha_expand_block_clear (operands)
*** 3327,3334 ****
        if (alignofs == 4 && bytes >= 4)
  	{
! 	  emit_move_insn (change_address (orig_dst, SImode,
! 					  plus_constant (XEXP (orig_dst, 0),
! 						         ofs)),
! 			  const0_rtx);
  	  bytes -= 4;
  	  ofs += 4;
--- 3292,3296 ----
        if (alignofs == 4 && bytes >= 4)
  	{
! 	  emit_move_insn (adjust_address (orig_dst, SImode, ofs), const0_rtx);
  	  bytes -= 4;
  	  ofs += 4;
*************** alpha_expand_block_clear (operands)
*** 3352,3359 ****
  
        for (i = 0; i < words; ++i)
! 	emit_move_insn (change_address(orig_dst, DImode,
! 				       plus_constant (XEXP (orig_dst, 0),
! 						      ofs + i * 8)),
! 			  const0_rtx);
  
        bytes -= words * 8;
--- 3314,3319 ----
  
        for (i = 0; i < words; ++i)
! 	emit_move_insn (adjust_address(orig_dst, DImode, ofs + i * 8),
! 			const0_rtx);
  
        bytes -= words * 8;
*************** alpha_expand_block_clear (operands)
*** 3366,3372 ****
    if (align >= 32 && bytes > 16)
      {
!       emit_move_insn (change_address (orig_dst, SImode,
! 				      plus_constant (XEXP (orig_dst, 0), ofs)),
! 		      const0_rtx);
        bytes -= 4;
        ofs += 4;
--- 3326,3330 ----
    if (align >= 32 && bytes > 16)
      {
!       emit_move_insn (adjust_address (orig_dst, SImode, ofs), const0_rtx);
        bytes -= 4;
        ofs += 4;
*************** alpha_expand_block_clear (operands)
*** 3401,3407 ****
  
        for (i = 0; i < words; ++i)
! 	emit_move_insn (change_address (orig_dst, SImode,
! 					plus_constant (XEXP (orig_dst, 0),
! 						       ofs + i * 4)),
  			const0_rtx);
  
--- 3359,3363 ----
  
        for (i = 0; i < words; ++i)
! 	emit_move_insn (adjust_address (orig_dst, SImode, ofs + i * 4),
  			const0_rtx);
  
*************** alpha_expand_block_clear (operands)
*** 3441,3446 ****
  	  HOST_WIDE_INT mask;
  
! 	  mem = change_address (orig_dst, DImode,
! 				plus_constant (XEXP (orig_dst, 0), ofs));
  	  MEM_ALIAS_SET (mem) = 0;
  
--- 3397,3401 ----
  	  HOST_WIDE_INT mask;
  
! 	  mem = adjust_address (orig_dst, DImode, ofs);
  	  MEM_ALIAS_SET (mem) = 0;
  
*************** alpha_expand_block_clear (operands)
*** 3458,3463 ****
  	  HOST_WIDE_INT mask;
  
! 	  mem = change_address (orig_dst, SImode,
! 				plus_constant (XEXP (orig_dst, 0), ofs));
  	  MEM_ALIAS_SET (mem) = 0;
  
--- 3413,3417 ----
  	  HOST_WIDE_INT mask;
  
! 	  mem = adjust_address (orig_dst, SImode, ofs);
  	  MEM_ALIAS_SET (mem) = 0;
  
*************** alpha_expand_block_clear (operands)
*** 3485,3491 ****
  	{
  	  do {
! 	    emit_move_insn (change_address (orig_dst, HImode,
! 					    plus_constant (XEXP (orig_dst, 0),
! 							   ofs)),
  			    const0_rtx);
  	    bytes -= 2;
--- 3439,3443 ----
  	{
  	  do {
! 	    emit_move_insn (adjust_address (orig_dst, HImode, ofs),
  			    const0_rtx);
  	    bytes -= 2;
*************** alpha_expand_block_clear (operands)
*** 3503,3510 ****
    while (bytes > 0)
      {
!       emit_move_insn (change_address (orig_dst, QImode,
! 				      plus_constant (XEXP (orig_dst, 0),
! 						     ofs)),
! 		      const0_rtx);
        bytes -= 1;
        ofs += 1;
--- 3455,3459 ----
    while (bytes > 0)
      {
!       emit_move_insn (adjust_address (orig_dst, QImode, ofs), const0_rtx);
        bytes -= 1;
        ofs += 1;
*** config/arm/arm.md	2001/05/18 12:45:03	1.81
--- config/arm/arm.md	2001/07/02 15:35:06
***************
*** 4292,4296 ****
      operands[4] = change_address (operands[1], QImode,
  				  plus_constant (addr, 1));
!     operands[1] = change_address (operands[1], QImode, NULL_RTX);
      operands[3] = gen_lowpart (QImode, operands[0]);
      operands[0] = gen_lowpart (SImode, operands[0]);
--- 4292,4296 ----
      operands[4] = change_address (operands[1], QImode,
  				  plus_constant (addr, 1));
!     operands[1] = adjust_address (operands[1], QImode, 0);
      operands[3] = gen_lowpart (QImode, operands[0]);
      operands[0] = gen_lowpart (SImode, operands[0]);
***************
*** 4316,4320 ****
      operands[4] = change_address (operands[1], QImode,
  				  plus_constant (addr, 1));
!     operands[1] = change_address (operands[1], QImode, NULL_RTX);
      operands[3] = gen_lowpart (QImode, operands[0]);
      operands[0] = gen_lowpart (SImode, operands[0]);
--- 4316,4320 ----
      operands[4] = change_address (operands[1], QImode,
  				  plus_constant (addr, 1));
!     operands[1] = adjust_address (operands[1], QImode, 0);
      operands[3] = gen_lowpart (QImode, operands[0]);
      operands[0] = gen_lowpart (SImode, operands[0]);
***************
*** 4365,4369 ****
      operands[3] = change_address (operands[0], QImode,
  				  plus_constant (addr, 1));
!     operands[0] = change_address (operands[0], QImode, NULL_RTX);
    }"
  )
--- 4365,4369 ----
      operands[3] = change_address (operands[0], QImode,
  				  plus_constant (addr, 1));
!     operands[0] = adjust_address (operands[0], QImode, 0);
    }"
  )
*** config/convex/convex.c	2001/06/26 18:08:38	1.10
--- config/convex/convex.c	2001/07/02 15:35:07
*************** expand_movstr (operands)
*** 370,375 ****
        /* Get src and dest in the right mode */
        if (GET_MODE (src) != mode)
! 	src = change_address (src, mode, 0),
! 	dest = change_address (dest, mode, 0);
  
        /* Make load and store patterns for this piece */
--- 370,377 ----
        /* Get src and dest in the right mode */
        if (GET_MODE (src) != mode)
! 	{
! 	  src = adjust_address (src, mode, 0);
! 	  dest = adjust_address (dest, mode, 0);
! 	}
  
        /* Make load and store patterns for this piece */
*** config/dsp16xx/dsp16xx.md	2001/04/03 15:05:42	1.9
--- config/dsp16xx/dsp16xx.md	2001/07/02 15:35:09
***************
*** 1468,1472 ****
  	    
  	    stack_slot = assign_stack_temp (QImode, GET_MODE_SIZE(QImode), 0);
! 	    stack_slot = change_address (stack_slot, VOIDmode, XEXP (stack_slot, 0));
  	    emit_move_insn (stack_slot, operands[2]);
  	    operands[2] = stack_slot;
--- 1468,1472 ----
  	    
  	    stack_slot = assign_stack_temp (QImode, GET_MODE_SIZE(QImode), 0);
! 	    stack_slot = validize_mem (stack_slot);
  	    emit_move_insn (stack_slot, operands[2]);
  	    operands[2] = stack_slot;
***************
*** 1593,1597 ****
  	    
  	      stack_slot = assign_stack_temp (QImode, GET_MODE_SIZE(QImode), 0);
! 	      stack_slot = change_address (stack_slot, VOIDmode, XEXP (stack_slot, 0));
  	      emit_move_insn (stack_slot, operands[2]);
  	      operands[2] = stack_slot;
--- 1593,1597 ----
  	    
  	      stack_slot = assign_stack_temp (QImode, GET_MODE_SIZE(QImode), 0);
! 	      stack_slot = validize_mem (stack_slot);
  	      emit_move_insn (stack_slot, operands[2]);
  	      operands[2] = stack_slot;
***************
*** 1730,1743 ****
  	emit_label (label1);
  
! 	if (GET_CODE(operands[2]) != MEM)
  	  {
  	    rtx stack_slot;
  	    
  	    stack_slot = assign_stack_temp (QImode, GET_MODE_SIZE(QImode), 0);
! 	    stack_slot = change_address (stack_slot, VOIDmode, XEXP (stack_slot, 0));
  	    emit_move_insn (stack_slot, operands[2]);
  	    operands[2] = stack_slot;
  	  }
! 	emit_insn (gen_match_ashlhi3_nobmu (operands[0], operands[1], operands[2]));
  	emit_label (label2);
  	DONE;
--- 1730,1745 ----
  	emit_label (label1);
  
! 	if (GET_CODE (operands[2]) != MEM)
  	  {
  	    rtx stack_slot;
  	    
  	    stack_slot = assign_stack_temp (QImode, GET_MODE_SIZE(QImode), 0);
! 	    stack_slot = validize_mem (stack_slot);
  	    emit_move_insn (stack_slot, operands[2]);
  	    operands[2] = stack_slot;
  	  }
! 
! 	emit_insn (gen_match_ashlhi3_nobmu (operands[0], operands[1],
! 					    operands[2]));
  	emit_label (label2);
  	DONE;
*** config/fr30/fr30.c	2001/06/26 18:08:42	1.10
--- config/fr30/fr30.c	2001/07/02 15:35:11
*************** fr30_move_double (operands)
*** 1009,1015 ****
  	  if (reverse)
  	    {
! 	      emit_insn (gen_rtx_SET (VOIDmode, dest1, change_address (src, SImode, addr)));
! 	      emit_insn (gen_rtx_SET (SImode, dest0, gen_rtx_REG (SImode, REGNO (addr))));
! 	      emit_insn (gen_rtx_SET (SImode, dest0, plus_constant (dest0, UNITS_PER_WORD)));
  
  	      new_mem = gen_rtx_MEM (SImode, dest0);
--- 1007,1016 ----
  	  if (reverse)
  	    {
! 	      emit_insn (gen_rtx_SET (VOIDmode, dest1,
! 				      change_address (src, SImode, addr)));
! 	      emit_insn (gen_rtx_SET (SImode, dest0,
! 				      gen_rtx_REG (SImode, REGNO (addr))));
! 	      emit_insn (gen_rtx_SET (SImode, dest0,
! 				      plus_constant (dest0, UNITS_PER_WORD)));
  
  	      new_mem = gen_rtx_MEM (SImode, dest0);
*************** fr30_move_double (operands)
*** 1020,1026 ****
  	  else
  	    {
! 	      emit_insn (gen_rtx_SET (VOIDmode, dest0, change_address (src, SImode, addr)));
! 	      emit_insn (gen_rtx_SET (SImode, dest1, gen_rtx_REG (SImode, REGNO (addr))));
! 	      emit_insn (gen_rtx_SET (SImode, dest1, plus_constant (dest1, UNITS_PER_WORD)));
  
  	      new_mem = gen_rtx_MEM (SImode, dest1);
--- 1021,1030 ----
  	  else
  	    {
! 	      emit_insn (gen_rtx_SET (VOIDmode, dest0,
! 				      change_address (src, SImode, addr)));
! 	      emit_insn (gen_rtx_SET (SImode, dest1,
! 				      gen_rtx_REG (SImode, REGNO (addr))));
! 	      emit_insn (gen_rtx_SET (SImode, dest1,
! 				      plus_constant (dest1, UNITS_PER_WORD)));
  
  	      new_mem = gen_rtx_MEM (SImode, dest1);
*************** fr30_move_double (operands)
*** 1055,1064 ****
        src1 = operand_subword (src, 1, TRUE, mode);
        
!       emit_insn (gen_rtx_SET (VOIDmode, change_address (dest, SImode, addr), src0));
! 
!       if (REGNO (addr) == STACK_POINTER_REGNUM)
! 	emit_insn (gen_rtx_SET (VOIDmode, change_address (dest, SImode, plus_constant (stack_pointer_rtx, UNITS_PER_WORD)), src1));
!       else if (REGNO (addr) == FRAME_POINTER_REGNUM)
! 	emit_insn (gen_rtx_SET (VOIDmode, change_address (dest, SImode, plus_constant (frame_pointer_rtx, UNITS_PER_WORD)), src1));
        else
  	{
--- 1059,1071 ----
        src1 = operand_subword (src, 1, TRUE, mode);
        
!       emit_insn (gen_rtx_SET (VOIDmode,
! 			      change_address (dest, SImode, addr),
! 			      src0));
! 
!       if (REGNO (addr) == STACK_POINTER_REGNUM
! 	  || REGNO (addr) == FRAME_POINTER_REGNUM)
! 	emit_insn (gen_rtx_SET (VOIDmode,
! 				adjust_address (dest, SImode, UNITS_PER_WORD),
! 				src1));
        else
  	{
*** config/i386/i386.c	2001/06/29 17:21:13	1.273
--- config/i386/i386.c	2001/07/02 15:35:27
*************** split_di (operands, num, lo_half, hi_hal
*** 4409,4415 ****
        else if (offsettable_memref_p (op))
  	{
- 	  rtx lo_addr = XEXP (op, 0);
  	  rtx hi_addr = XEXP (adj_offsettable_operand (op, 4), 0);
! 	  lo_half[num] = change_address (op, SImode, lo_addr);
  	  hi_half[num] = change_address (op, SImode, hi_addr);
  	}
--- 4409,4415 ----
        else if (offsettable_memref_p (op))
  	{
  	  rtx hi_addr = XEXP (adj_offsettable_operand (op, 4), 0);
! 
! 	  lo_half[num] = adjust_address (op, SImode, 0);
  	  hi_half[num] = change_address (op, SImode, hi_addr);
  	}
*************** ix86_split_to_parts (operand, parts, mod
*** 6866,6870 ****
  	  else if (offsettable_memref_p (operand))
  	    {
! 	      operand = change_address (operand, SImode, XEXP (operand, 0));
  	      parts[0] = operand;
  	      parts[1] = adj_offsettable_operand (operand, 4);
--- 6866,6870 ----
  	  else if (offsettable_memref_p (operand))
  	    {
! 	      operand = adjust_address (operand, SImode, 0);
  	      parts[0] = operand;
  	      parts[1] = adj_offsettable_operand (operand, 4);
*************** ix86_split_long_move (operands)
*** 7062,7066 ****
  	    {
  	      if (GET_CODE (part[1][1]) == MEM)
! 		part[1][1] = change_address (part[1][1], DImode, XEXP (part[1][1], 0));
  	      else if (REG_P (part[1][1]))
  		part[1][1] = gen_rtx_REG (DImode, REGNO (part[1][1]));
--- 7062,7066 ----
  	    {
  	      if (GET_CODE (part[1][1]) == MEM)
! 		part[1][1] = adjust_address (part[1][1], DImode, 0);
  	      else if (REG_P (part[1][1]))
  		part[1][1] = gen_rtx_REG (DImode, REGNO (part[1][1]));
*************** ix86_expand_builtin (exp, target, subtar
*** 10186,10194 ****
        target = assign_386_stack_local (SFmode, 0);
        arg0 = TREE_VALUE (arglist);
!       emit_move_insn (change_address (target, SFmode, XEXP (target, 0)),
  		      expand_expr (arg0, NULL_RTX, VOIDmode, 0));
        op0 = gen_reg_rtx (V4SFmode);
!       emit_insn (gen_sse_loadss (op0, change_address (target, V4SFmode,
! 						      XEXP (target, 0))));
        emit_insn (gen_sse_shufps (op0, op0, op0, GEN_INT (0)));
        return op0;
--- 10186,10193 ----
        target = assign_386_stack_local (SFmode, 0);
        arg0 = TREE_VALUE (arglist);
!       emit_move_insn (adjust_address (target, SFmode, 0),
  		      expand_expr (arg0, NULL_RTX, VOIDmode, 0));
        op0 = gen_reg_rtx (V4SFmode);
!       emit_insn (gen_sse_loadss (op0, adjust_address (target, V4SFmode, 0)));
        emit_insn (gen_sse_shufps (op0, op0, op0, GEN_INT (0)));
        return op0;
*************** ix86_expand_builtin (exp, target, subtar
*** 10196,10200 ****
      case IX86_BUILTIN_SETPS:
        target = assign_386_stack_local (V4SFmode, 0);
!       op0 = change_address (target, SFmode, XEXP (target, 0));
        arg0 = TREE_VALUE (arglist);
        arg1 = TREE_VALUE (TREE_CHAIN (arglist));
--- 10195,10199 ----
      case IX86_BUILTIN_SETPS:
        target = assign_386_stack_local (V4SFmode, 0);
!       op0 = adjust_address (target, SFmode, 0);
        arg0 = TREE_VALUE (arglist);
        arg1 = TREE_VALUE (TREE_CHAIN (arglist));
*** config/i386/i386.md	2001/06/28 21:50:05	1.282
--- config/i386/i386.md	2001/07/02 15:35:52
***************
*** 8060,8064 ****
  	{
  	  mode = smallest_mode_for_size (pos + len, MODE_INT);
! 	  operands[0] = change_address (operands[0], mode, NULL_RTX);
  	}
      }
--- 8060,8064 ----
  	{
  	  mode = smallest_mode_for_size (pos + len, MODE_INT);
! 	  operands[0] = adjust_address (operands[0], mode, 0);
  	}
      }
*** config/ia64/ia64.c	2001/06/26 18:08:52	1.97
--- config/ia64/ia64.c	2001/07/02 15:36:00
*************** ia64_split_timode (out, in, scratch)
*** 929,937 ****
  	  {
  	  case REG:
! 	    out[0] = change_address (in, DImode, NULL_RTX);
  	    break;
  	  case POST_MODIFY:
  	    base = XEXP (base, 0);
! 	    out[0] = change_address (in, DImode, NULL_RTX);
  	    break;
  
--- 929,937 ----
  	  {
  	  case REG:
! 	    out[0] = adjust_address (in, DImode, 0);
  	    break;
  	  case POST_MODIFY:
  	    base = XEXP (base, 0);
! 	    out[0] = adjust_address (in, DImode, 0);
  	    break;
  
*************** ia64_split_timode (out, in, scratch)
*** 942,952 ****
  	  case POST_INC:
  	    base = XEXP (base, 0);
! 	    out[0] = change_address (in, DImode,
! 	      gen_rtx_POST_MODIFY (Pmode, base,plus_constant (base, 16)));
  	    break;
  	  case POST_DEC:
  	    base = XEXP (base, 0);
! 	    out[0] = change_address (in, DImode,
! 	      gen_rtx_POST_MODIFY (Pmode, base,plus_constant (base, -16)));
  	    break;
  	  default:
--- 942,956 ----
  	  case POST_INC:
  	    base = XEXP (base, 0);
! 	    out[0]
! 	      = change_address (in, DImode,
! 				gen_rtx_POST_MODIFY
! 				(Pmode, base, plus_constant (base, 16)));
  	    break;
  	  case POST_DEC:
  	    base = XEXP (base, 0);
! 	    out[0]
! 	      = change_address (in, DImode,
! 				gen_rtx_POST_MODIFY
! 				(Pmode, base, plus_constant (base, -16)));
  	    break;
  	  default:
*************** spill_tfmode_operand (in, force)
*** 999,1005 ****
    else if (GET_CODE (in) == MEM
  	   && GET_CODE (XEXP (in, 0)) == ADDRESSOF)
!     {
!       return change_address (in, TFmode, copy_to_reg (XEXP (in, 0)));
!     }
    else
      return in;
--- 1003,1007 ----
    else if (GET_CODE (in) == MEM
  	   && GET_CODE (XEXP (in, 0)) == ADDRESSOF)
!     return change_address (in, TFmode, copy_to_reg (XEXP (in, 0)));
    else
      return in;
*** config/ia64/ia64.md	2001/06/26 03:50:48	1.66
--- config/ia64/ia64.md	2001/07/02 15:36:04
***************
*** 726,734 ****
  	  out[!WORDS_BIG_ENDIAN] = gen_rtx_REG (DImode, REGNO (operands[0])+1);
  
! 	  emit_move_insn (out[0], change_address (operands[1], DImode, NULL));
! 	  emit_move_insn (out[1],
! 			  change_address (operands[1], DImode,
! 					  plus_constant (XEXP (operands[1], 0),
! 							 8)));
  	  DONE;
  	}
--- 726,731 ----
  	  out[!WORDS_BIG_ENDIAN] = gen_rtx_REG (DImode, REGNO (operands[0])+1);
  
! 	  emit_move_insn (out[0], adjust_address (operands[1], DImode, 0));
! 	  emit_move_insn (out[1], adjust_address (operands[1], DImode, 8));
  	  DONE;
  	}
*** config/m32r/m32r.c	2001/06/29 17:21:14	1.28
--- config/m32r/m32r.c	2001/07/02 15:36:08
*************** gen_split_move_double (operands)
*** 1264,1269 ****
  	  /* If the high-address word is used in the address, we must load it
  	     last.  Otherwise, load it first.  */
! 	  rtx addr = XEXP (src, 0);
! 	  int reverse = (refers_to_regno_p (dregno, dregno+1, addr, 0) != 0);
  
  	  /* We used to optimize loads from single registers as
--- 1265,1270 ----
  	  /* If the high-address word is used in the address, we must load it
  	     last.  Otherwise, load it first.  */
! 	  int reverse
! 	    = (refers_to_regno_p (dregno, dregno + 1, XEXP (src, 0), 0) != 0);
  
  	  /* We used to optimize loads from single registers as
*************** gen_split_move_double (operands)
*** 1280,1292 ****
  	  emit_insn (gen_rtx_SET (VOIDmode,
  				  operand_subword (dest, reverse, TRUE, mode),
! 				  change_address (src, SImode,
! 						  plus_constant (addr,
! 								 reverse * UNITS_PER_WORD))));
  
  	  emit_insn (gen_rtx_SET (VOIDmode,
  				  operand_subword (dest, !reverse, TRUE, mode),
! 				  change_address (src, SImode,
! 						  plus_constant (addr,
! 								 (!reverse) * UNITS_PER_WORD))));
  	}
  
--- 1281,1291 ----
  	  emit_insn (gen_rtx_SET (VOIDmode,
  				  operand_subword (dest, reverse, TRUE, mode),
! 				  adjust_address (src, SImode,
! 						  reverse * UNITS_PER_WORD)));
  
  	  emit_insn (gen_rtx_SET (VOIDmode,
  				  operand_subword (dest, !reverse, TRUE, mode),
! 				  adjust_address (src, SImode,
! 						  !reverse * UNITS_PER_WORD)));
  	}
  
*************** gen_split_move_double (operands)
*** 1309,1321 ****
    else if (GET_CODE (dest) == MEM && GET_CODE (src) == REG)
      {
-       rtx addr = XEXP (dest, 0);
- 
        emit_insn (gen_rtx_SET (VOIDmode,
! 			      change_address (dest, SImode, addr),
  			      operand_subword (src, 0, TRUE, mode)));
  
        emit_insn (gen_rtx_SET (VOIDmode,
! 			      change_address (dest, SImode,
! 					      plus_constant (addr, UNITS_PER_WORD)),
  			      operand_subword (src, 1, TRUE, mode)));
      }
--- 1308,1317 ----
    else if (GET_CODE (dest) == MEM && GET_CODE (src) == REG)
      {
        emit_insn (gen_rtx_SET (VOIDmode,
! 			      adjust_address (dest, SImode, 0),
  			      operand_subword (src, 0, TRUE, mode)));
  
        emit_insn (gen_rtx_SET (VOIDmode,
! 			      adjust_address (dest, SImode, UNITS_PER_WORD),
  			      operand_subword (src, 1, TRUE, mode)));
      }
*** config/m68k/m68k.md	2001/06/09 19:11:22	1.39
--- config/m68k/m68k.md	2001/07/02 15:36:14
***************
*** 1256,1261 ****
        if (! memory_address_p (XFmode, XEXP (operands[1], 0))
  	  && ! reload_in_progress)
! 	operands[1] = change_address (operands[1], XFmode,
! 				      XEXP (operands[1], 0));
      }
    if (flag_pic && TARGET_PCREL && ! reload_in_progress)
--- 1256,1260 ----
        if (! memory_address_p (XFmode, XEXP (operands[1], 0))
  	  && ! reload_in_progress)
! 	operands[1] = adjust_address (operands[1], XFmode, 0);
      }
    if (flag_pic && TARGET_PCREL && ! reload_in_progress)
*** config/m88k/m88k.c	2001/06/26 18:09:00	1.31
--- config/m88k/m88k.c	2001/07/02 15:36:16
*************** m88k_builtin_saveregs ()
*** 2614,2620 ****
    if (fixed < 8)
      {
!       dest = change_address (addr, Pmode,
! 			     plus_constant (XEXP (addr, 0),
! 					    fixed * UNITS_PER_WORD));
        move_block_from_reg (2 + fixed, dest, 8 - fixed,
  			   UNITS_PER_WORD * (8 - fixed));
--- 2614,2618 ----
    if (fixed < 8)
      {
!       dest = adjust_address (addr, Pmode, fixed * UNITS_PER_WORD);
        move_block_from_reg (2 + fixed, dest, 8 - fixed,
  			   UNITS_PER_WORD * (8 - fixed));
*** config/mips/mips.md	2001/06/14 20:15:19	1.95
--- config/mips/mips.md	2001/07/02 15:36:25
*************** move\\t%0,%z4\\n\\
*** 4543,4547 ****
  
    /* Change the mode to BLKmode for aliasing purposes.  */
!   operands[1] = change_address (operands[1], BLKmode, XEXP (operands[1], 0));
  
    /* Otherwise, emit a l[wd]l/l[wd]r pair to load the value.  */
--- 4543,4547 ----
  
    /* Change the mode to BLKmode for aliasing purposes.  */
!   operands[1] = adjust_address (operands[1], BLKmode, 0);
  
    /* Otherwise, emit a l[wd]l/l[wd]r pair to load the value.  */
*************** move\\t%0,%z4\\n\\
*** 4591,4595 ****
  
    /* Change the mode to BLKmode for aliasing purposes.  */
!   operands[1] = change_address (operands[1], BLKmode, XEXP (operands[1], 0));
  
    /* Otherwise, emit a lwl/lwr pair to load the value.  */
--- 4591,4595 ----
  
    /* Change the mode to BLKmode for aliasing purposes.  */
!   operands[1] = adjust_address (operands[1], BLKmode, 0);
  
    /* Otherwise, emit a lwl/lwr pair to load the value.  */
*************** move\\t%0,%z4\\n\\
*** 4639,4643 ****
  
    /* Change the mode to BLKmode for aliasing purposes.  */
!   operands[0] = change_address (operands[0], BLKmode, XEXP (operands[0], 0));
  
    /* Otherwise, emit a s[wd]l/s[wd]r pair to load the value.  */
--- 4639,4643 ----
  
    /* Change the mode to BLKmode for aliasing purposes.  */
!   operands[0] = adjust_address (operands[0], BLKmode, 0);
  
    /* Otherwise, emit a s[wd]l/s[wd]r pair to load the value.  */
*************** move\\t%0,%z4\\n\\
*** 5070,5074 ****
  
  	  scratch = gen_rtx_REG (SImode, REGNO (scratch));
! 	  memword = change_address (op1, SImode, NULL_RTX);
  	  offword = change_address (adj_offsettable_operand (op1, 4),
  				    SImode, NULL_RTX);
--- 5070,5074 ----
  
  	  scratch = gen_rtx_REG (SImode, REGNO (scratch));
! 	  memword = adjust_address (op1, SImode, 0);
  	  offword = change_address (adj_offsettable_operand (op1, 4),
  				    SImode, NULL_RTX);
*************** move\\t%0,%z4\\n\\
*** 5150,5154 ****
  
  	  scratch = gen_rtx_REG (SImode, REGNO (operands[2]));
! 	  memword = change_address (op0, SImode, NULL_RTX);
  	  offword = change_address (adj_offsettable_operand (op0, 4),
  				    SImode, NULL_RTX);
--- 5150,5154 ----
  
  	  scratch = gen_rtx_REG (SImode, REGNO (operands[2]));
! 	  memword = adjust_address (op0, SImode, 0);
  	  offword = change_address (adj_offsettable_operand (op0, 4),
  				    SImode, NULL_RTX);
*************** move\\t%0,%z4\\n\\
*** 5680,5684 ****
       recognized.  */
    if (GET_CODE (operands[1]) == MEM)
!     source = change_address (operands[1], SFmode, NULL_RTX);
    else if (GET_CODE (operands[1]) == REG || GET_CODE (operands[1]) == SUBREG)
      source = gen_rtx_REG (SFmode, true_regnum (operands[1]));
--- 5680,5684 ----
       recognized.  */
    if (GET_CODE (operands[1]) == MEM)
!     source = adjust_address (operands[1], SFmode, 0);
    else if (GET_CODE (operands[1]) == REG || GET_CODE (operands[1]) == SUBREG)
      source = gen_rtx_REG (SFmode, true_regnum (operands[1]));
*** ns32k.c	2001/06/29 17:21:14	1.14
--- ns32k.c	2001/07/02 15:36:26
*************** move_tail (operands, bytes, offset)
*** 424,444 ****
    if (bytes & 2)
      {
!       rtx src, dest;
!       dest = change_address (operands[0], HImode,
! 			    plus_constant (XEXP (operands[0], 0), offset));
!       src = change_address (operands[1], HImode,
! 			   plus_constant (XEXP (operands[1], 0), offset));
!       emit_move_insn (dest, src);
        offset += 2;
      }
    if (bytes & 1)
!     {
!       rtx src, dest;
!       dest = change_address (operands[0], QImode,
! 			    plus_constant (XEXP (operands[0], 0), offset));
!       src = change_address (operands[1], QImode,
! 			   plus_constant (XEXP (operands[1], 0), offset));
!       emit_move_insn (dest, src);
!     }
  }
  
--- 424,434 ----
    if (bytes & 2)
      {
!       emit_move_insn (adjust_address (operands[0], HImode, offset),
! 		      adjust_address (operands[1], HImode, offset));
        offset += 2;
      }
    if (bytes & 1)
!     emit_move_insn (adjust_address (operands[0], QImode, offset),
! 		    adjust_address (operands[1], QImode, offset));
  }
  
*************** expand_block_move (operands)
*** 462,465 ****
--- 452,456 ----
      {
        int words = bytes >> 2;
+ 
        if (words)
  	{
*************** expand_block_move (operands)
*** 467,479 ****
  	    {
  	      int offset = 0;
  	      for (; words; words--, offset += 4)
! 		{
! 		  rtx src, dest;
! 		  dest = change_address (operands[0], SImode,
! 					plus_constant (XEXP (operands[0], 0), offset));
! 		  src = change_address (operands[1], SImode,
! 				       plus_constant (XEXP (operands[1], 0), offset));
! 		  emit_move_insn (dest, src);
! 		}
  	    }
  	  else
--- 458,465 ----
  	    {
  	      int offset = 0;
+ 
  	      for (; words; words--, offset += 4)
! 		emit_move_insn (adjust_address (operands[0], SImode, offset),
! 				adjust_address (operands[1], SImode, offset));
  	    }
  	  else
*** config/rs6000/rs6000.c	2001/06/29 17:21:14	1.186
--- config/rs6000/rs6000.c	2001/07/02 15:36:32
*************** rs6000_emit_move (dest, source, mode)
*** 1887,1892 ****
        && ! memory_address_p (mode, XEXP (operands[1], 0))
        && ! reload_in_progress)
!     operands[1] = change_address (operands[1], mode,
! 				  XEXP (operands[1], 0));
  
    emit_insn (gen_rtx_SET (VOIDmode, operands[0], operands[1]));
--- 1887,1891 ----
        && ! memory_address_p (mode, XEXP (operands[1], 0))
        && ! reload_in_progress)
!     operands[1] = adjust_address (operands[1], mode, 0);
  
    emit_insn (gen_rtx_SET (VOIDmode, operands[0], operands[1]));
*** config/sh/sh.c	2001/06/26 18:09:17	1.102
--- config/sh/sh.c	2001/07/02 15:36:36
*************** sh_builtin_saveregs ()
*** 4233,4240 ****
    if (n_intregs > 0)
      move_block_from_reg (BASE_ARG_REG (SImode) + first_intreg,
! 			 change_address (regbuf, BLKmode,
! 					 plus_constant (XEXP (regbuf, 0),
! 							(n_floatregs
! 							 * UNITS_PER_WORD))), 
  			 n_intregs, n_intregs * UNITS_PER_WORD);
  
--- 4233,4238 ----
    if (n_intregs > 0)
      move_block_from_reg (BASE_ARG_REG (SImode) + first_intreg,
! 			 adjust_address (regbuf, BLKmode,
! 					 n_floatregs * UNITS_PER_WORD),
  			 n_intregs, n_intregs * UNITS_PER_WORD);
  
*** config/sparc/sparc.md	2001/04/26 20:56:08	1.124
--- config/sparc/sparc.md	2001/07/02 15:36:44
***************
*** 2958,2962 ****
    "
  {
!   rtx word0 = change_address (operands[1], SImode, NULL_RTX);
    rtx word1 = change_address (operands[1], SImode,
  			      plus_constant_for_output (XEXP (word0, 0), 4));
--- 2958,2962 ----
    "
  {
!   rtx word0 = adjust_address (operands[1], SImode, 0);
    rtx word1 = change_address (operands[1], SImode,
  			      plus_constant_for_output (XEXP (word0, 0), 4));
***************
*** 2986,2990 ****
    "
  {
!   rtx word0 = change_address (operands[0], SImode, NULL_RTX);
    rtx word1 = change_address (operands[0], SImode,
  			      plus_constant_for_output (XEXP (word0, 0), 4));
--- 2986,2990 ----
    "
  {
!   rtx word0 = adjust_address (operands[0], SImode, 0);
    rtx word1 = change_address (operands[0], SImode,
  			      plus_constant_for_output (XEXP (word0, 0), 4));
***************
*** 3595,3599 ****
    "
  {
!   rtx word0 = change_address (operands[1], SFmode, NULL_RTX);
    rtx word1 = change_address (operands[1], SFmode,
  			      plus_constant_for_output (XEXP (word0, 0), 4));
--- 3595,3599 ----
    "
  {
!   rtx word0 = adjust_address (operands[1], SFmode, 0);
    rtx word1 = change_address (operands[1], SFmode,
  			      plus_constant_for_output (XEXP (word0, 0), 4));
***************
*** 3630,3634 ****
    "
  {
!   rtx word0 = change_address (operands[0], SFmode, NULL_RTX);
    rtx word1 = change_address (operands[0], SFmode,
  			      plus_constant_for_output (XEXP (word0, 0), 4));
--- 3630,3634 ----
    "
  {
!   rtx word0 = adjust_address (operands[0], SFmode, 0);
    rtx word1 = change_address (operands[0], SFmode,
  			      plus_constant_for_output (XEXP (word0, 0), 4));
***************
*** 3656,3660 ****
    rtx dest1, dest2;
  
!   dest1 = change_address (operands[0], SFmode, NULL_RTX);
    dest2 = change_address (operands[0], SFmode,
  			  plus_constant_for_output (XEXP (dest1, 0), 4));
--- 3656,3660 ----
    rtx dest1, dest2;
  
!   dest1 = adjust_address (operands[0], SFmode, 0);
    dest2 = change_address (operands[0], SFmode,
  			  plus_constant_for_output (XEXP (dest1, 0), 4));
***************
*** 3930,3934 ****
        break;
      case MEM:
!       dest1 = change_address (set_dest, DFmode, NULL_RTX);
        dest2 = change_address (set_dest, DFmode,
  			      plus_constant_for_output (XEXP (dest1, 0), 8));
--- 3930,3934 ----
        break;
      case MEM:
!       dest1 = adjust_address (set_dest, DFmode, 0);
        dest2 = change_address (set_dest, DFmode,
  			      plus_constant_for_output (XEXP (dest1, 0), 8));
***************
*** 3951,3955 ****
    "
  {
!   rtx word0 = change_address (operands[1], DFmode, NULL_RTX);
    rtx word1 = change_address (operands[1], DFmode,
  			      plus_constant_for_output (XEXP (word0, 0), 8));
--- 3951,3955 ----
    "
  {
!   rtx word0 = adjust_address (operands[1], DFmode, 0);
    rtx word1 = change_address (operands[1], DFmode,
  			      plus_constant_for_output (XEXP (word0, 0), 8));
***************
*** 3987,3991 ****
    "
  {
!   rtx word1 = change_address (operands[0], DFmode, NULL_RTX);
    rtx word2 = change_address (operands[0], DFmode,
  			      plus_constant_for_output (XEXP (word1, 0), 8));
--- 3987,3991 ----
    "
  {
!   rtx word1 = adjust_address (operands[0], DFmode, 0);
    rtx word2 = change_address (operands[0], DFmode,
  			      plus_constant_for_output (XEXP (word1, 0), 8));
***************
*** 8907,8914 ****
  
    /* Reload the function value registers.  */
!   emit_move_insn (valreg1, change_address (result, DImode, XEXP (result, 0)));
    emit_move_insn (valreg2,
! 		  change_address (result, TARGET_ARCH64 ? TFmode : DFmode,
! 				  plus_constant (XEXP (result, 0), 8)));
  
    /* Put USE insns before the return.  */
--- 8907,8913 ----
  
    /* Reload the function value registers.  */
!   emit_move_insn (valreg1, adjust_address (result, DImode, 0));
    emit_move_insn (valreg2,
! 		  adjust_address (result, TARGET_ARCH64 ? TFmode : DFmode, 8));
  
    /* Put USE insns before the return.  */


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]