Add subreg_memory_offset helper functions
commit57689c1061f64df41b20db8975a93bcbd9653fd8
authorrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 4 Sep 2017 10:48:40 +0000 (4 10:48 +0000)
committerrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 4 Sep 2017 10:48:40 +0000 (4 10:48 +0000)
tree6c37f118811f8cff123ef56870a20145fd74b472
parent31d7a9b35fef974dad13881df6d319b7b08600e8
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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@251644 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog
gcc/emit-rtl.c
gcc/expmed.c
gcc/expr.c
gcc/rtl.h
gcc/simplify-rtx.c