summaryrefslogtreecommitdiff
path: root/gcc/emit-rtl.c
diff options
context:
space:
mode:
authorrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>2004-08-18 21:08:35 +0000
committerrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>2004-08-18 21:08:35 +0000
commite265a6da77f2623966ed1a19d1ab6b809ec97fef (patch)
tree8e12ef5e22b0f9baabc992a10805a642c7d0bec6 /gcc/emit-rtl.c
parent78d140c990f84aa03c72b5f074683bf3f7b6307f (diff)
downloadlinaro-gcc-e265a6da77f2623966ed1a19d1ab6b809ec97fef.tar.gz
linaro-gcc-e265a6da77f2623966ed1a19d1ab6b809ec97fef.tar.bz2
linaro-gcc-e265a6da77f2623966ed1a19d1ab6b809ec97fef.zip
* emit-rtl.c (gen_const_mem): New.
* rtl.h (gen_const_mem): Declare. * expr.c (do_tablejump): Use it. * varasm.c (force_const_mem): Likewise. * config/darwin.c (machopic_indirect_data_reference): Likewise. (machopic_legitimize_pic_address): Likewise. * config/arm/arm.c (legitimize_pic_address): Likewise. * config/i386/i386.c (legitimize_pic_address): Likewise. (legitimize_tls_address): Likewise. * config/ia64/ia64.c (ia64_expand_tls_address): Likewise. * config/ia64/ia64.md (load_fptr): Likewise. * config/m32r/m32r.c (m32r_legitimize_pic_address): Likewise. * config/pa/pa.c (legitimize_pic_address): Likewise. * config/rs6000/rs6000.c (rs6000_legitimize_tls_address): Likewise. (rs6000_emit_move): Likewise. * config/s390/s390.c (legitimize_pic_address): Likewise. (legitimize_tls_address): Likewise. * config/s390/s390.md (casesi): Likewise. * config/sh/sh.c (sh_reorg): Likewise. * config/sparc/sparc.c (legitimize_pic_address): Likewise. * config/v850/v850.md (casesi): Likewise. * config/darwin.c (machopic_indirect_call_target): Set MEM_NOTRAP_P. * config/sh/sh.c (prepare_move_operands): Remove incorrect use of MEM_READONLY_P. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@86207 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/emit-rtl.c')
-rw-r--r--gcc/emit-rtl.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/gcc/emit-rtl.c b/gcc/emit-rtl.c
index 1137c45986b..4d40705d1bc 100644
--- a/gcc/emit-rtl.c
+++ b/gcc/emit-rtl.c
@@ -607,6 +607,17 @@ gen_rtx_MEM (enum machine_mode mode, rtx addr)
return rt;
}
+/* Generate a memory referring to non-trapping constant memory. */
+
+rtx
+gen_const_mem (enum machine_mode mode, rtx addr)
+{
+ rtx mem = gen_rtx_MEM (mode, addr);
+ MEM_READONLY_P (mem) = 1;
+ MEM_NOTRAP_P (mem) = 1;
+ return mem;
+}
+
rtx
gen_rtx_SUBREG (enum machine_mode mode, rtx reg, int offset)
{