aboutsummaryrefslogtreecommitdiff
path: root/gcc/rtl.h
diff options
context:
space:
mode:
authorRichard Sandiford <richard.sandiford@linaro.org>2017-09-04 10:48:40 +0000
committerRichard Sandiford <rsandifo@gcc.gnu.org>2017-09-04 10:48:40 +0000
commit3d09ba95c150d9676f9a2585fb61315e86fa644a (patch)
tree6c37f118811f8cff123ef56870a20145fd74b472 /gcc/rtl.h
parentd8c40eff56f69877b33c697ded756d50fde90c27 (diff)
downloadgcc-3d09ba95c150d9676f9a2585fb61315e86fa644a.zip
gcc-3d09ba95c150d9676f9a2585fb61315e86fa644a.tar.gz
gcc-3d09ba95c150d9676f9a2585fb61315e86fa644a.tar.bz2
Add subreg_memory_offset helper functions
This patch adds routines for converting a SUBREG_BYTE offset into a memory address offset. The two only differ for paradoxical subregs, where SUBREG_BYTE is always 0 but the memory address offset can be negative. 2017-09-04 Richard Sandiford <richard.sandiford@linaro.org> Alan Hayward <alan.hayward@arm.com> David Sherwood <david.sherwood@arm.com> gcc/ * rtl.h (subreg_memory_offset): Declare. * emit-rtl.c (subreg_memory_offset): New function. * expmed.c (store_bit_field_1): Use it. * expr.c (undefined_operand_subword_p): Likewise. * simplify-rtx.c (simplify_subreg): Likewise. Co-Authored-By: Alan Hayward <alan.hayward@arm.com> Co-Authored-By: David Sherwood <david.sherwood@arm.com> From-SVN: r251644
Diffstat (limited to 'gcc/rtl.h')
-rw-r--r--gcc/rtl.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/gcc/rtl.h b/gcc/rtl.h
index 36d4254..e1e664b 100644
--- a/gcc/rtl.h
+++ b/gcc/rtl.h
@@ -2888,6 +2888,8 @@ subreg_highpart_offset (machine_mode outermode, machine_mode innermode)
}
extern int byte_lowpart_offset (machine_mode, machine_mode);
+extern int subreg_memory_offset (machine_mode, machine_mode, unsigned int);
+extern int subreg_memory_offset (const_rtx);
extern rtx make_safe_from (rtx, rtx);
extern rtx convert_memory_address_addr_space_1 (scalar_int_mode, rtx,
addr_space_t, bool, bool);