summaryrefslogtreecommitdiff
path: root/gcc/emit-rtl.c
diff options
context:
space:
mode:
authorkenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4>2001-07-04 17:43:18 +0000
committerkenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4>2001-07-04 17:43:18 +0000
commit537ffcfc50a329aa4be838127266a1cb06083133 (patch)
treedf66055b376252d4e98b02a6a2492ca9f4731ad2 /gcc/emit-rtl.c
parentda31bd92c01701e2bf94aa2cdaf5a57e5ce21f42 (diff)
downloadgcc-537ffcfc50a329aa4be838127266a1cb06083133.tar.gz
* emit-rtl.c (replace_equiv_address): New function.
* expr.h (replace_equiv_address): New declaration. * explow.c (validize_mem): Call it instead of change_address and also call if -fforce-addr and address is constant. * expr.c: Replace more calls to change_address with adjust_address and/or replace_equiv_address or to validize_mem. * function.c, regmove.c, config/alpha/alpha.c: Likewise. * config/arm/arm.md, config/clipper/clipper.md: Likewise. * config/dsp16xx/dsp16xx.md, config/fr30/fr30.c: Likewise. * config/i370/i370.md, config/i860/i860.md: Likewise. * config/i960/i960.md, config/mips/mips.c: Likewise. * config/mips/mips.md, config/pa/pa.md: Likewise. * config/pdp11/pdp11.md, config/rs6000/rs6000.c: Likewise. * config/rs6000/rs6000.md, config/sh/sh.md: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@43762 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/emit-rtl.c')
-rw-r--r--gcc/emit-rtl.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/gcc/emit-rtl.c b/gcc/emit-rtl.c
index 861e73bf3ad..deca99b7459 100644
--- a/gcc/emit-rtl.c
+++ b/gcc/emit-rtl.c
@@ -1601,6 +1601,7 @@ change_address (memref, mode, addr)
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. */
@@ -1615,6 +1616,21 @@ adjust_address (memref, mode, offset)
return
change_address (memref, mode, plus_constant (XEXP (memref, 0), offset));
}
+
+/* Return a memory reference like MEMREF, but with its address changed to
+ ADDR. The caller is asserting that the actual piece of memory pointed
+ to is the same, just the form of the address is being changed, such as
+ by putting something into a register. */
+
+rtx
+replace_equiv_address (memref, addr)
+ rtx memref;
+ rtx addr;
+{
+ /* For now, this is just a wrapper for change_address, but eventually
+ will do memref tracking. */
+ return change_address (memref, VOIDmode, addr);
+}
/* Return a newly created CODE_LABEL rtx with a unique label number. */