Add more subreg offset helpers
commitca99c78703007760b5c46d3f27b5a9afe5ff3340
authorrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 23 Nov 2016 14:31:13 +0000 (23 14:31 +0000)
committerrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 23 Nov 2016 14:31:13 +0000 (23 14:31 +0000)
tree4bfd3e1a9778ceec5f17a57b1b4e198e8b97acb9
parentffeccaca6cd374d34c3aa6ffecf635509d75f22a
Add more subreg offset helpers

Provide versions of subreg_lowpart_offset and subreg_highpart_offset
that work on mode sizes rather than modes.  Also provide a routine
that converts an lsb position to a subreg offset.

The intent (in combination with later patches) is to move the
handling of the BYTES_BIG_ENDIAN != WORDS_BIG_ENDIAN case into
just two places, so that for other combinations we don't have
to split offsets into words and subwords.

gcc/
2016-11-15  Richard Sandiford  <richard.sandiford@arm.com>
    Alan Hayward  <alan.hayward@arm.com>
    David Sherwood  <david.sherwood@arm.com>

* rtl.h (subreg_size_offset_from_lsb): Declare.
(subreg_offset_from_lsb): New function.
(subreg_size_lowpart_offset): Declare.
(subreg_lowpart_offset): Turn into an inline function.
(subreg_size_highpart_offset): Declare.
(subreg_highpart_offset): Turn into an inline function.
* emit-rtl.c (subreg_size_lowpart_offset): New function.
(subreg_size_highpart_offset): Likewise
* rtlanal.c (subreg_size_offset_from_lsb): Likewise.

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