aboutsummaryrefslogtreecommitdiff
path: root/gcc/rtlanal.c
diff options
context:
space:
mode:
authorRichard Sandiford <richard.sandiford@arm.com>2014-09-22 07:36:51 +0000
committerRichard Sandiford <rsandifo@gcc.gnu.org>2014-09-22 07:36:51 +0000
commit0cb07998ae317e89dbf9695db731bfc8aa5f9d41 (patch)
treee628812b6b8bd37be67d38a58cf45d98de1a1770 /gcc/rtlanal.c
parent853d50d3c82212fee406279c386cef1673adfbc3 (diff)
downloadgcc-0cb07998ae317e89dbf9695db731bfc8aa5f9d41.zip
gcc-0cb07998ae317e89dbf9695db731bfc8aa5f9d41.tar.gz
gcc-0cb07998ae317e89dbf9695db731bfc8aa5f9d41.tar.bz2
rtl.h (subreg_info): Expand commentary
gcc/ * rtl.h (subreg_info): Expand commentary * rtlanal.c (subreg_get_info): Likewise. From-SVN: r215447
Diffstat (limited to 'gcc/rtlanal.c')
-rw-r--r--gcc/rtlanal.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/gcc/rtlanal.c b/gcc/rtlanal.c
index e361f0f..3063458 100644
--- a/gcc/rtlanal.c
+++ b/gcc/rtlanal.c
@@ -3410,7 +3410,20 @@ subreg_lsb (const_rtx x)
xmode - The mode of xregno.
offset - The byte offset.
ymode - The mode of a top level SUBREG (or what may become one).
- info - Pointer to structure to fill in. */
+ info - Pointer to structure to fill in.
+
+ Rather than considering one particular inner register (and thus one
+ particular "outer" register) in isolation, this function really uses
+ XREGNO as a model for a sequence of isomorphic hard registers. Thus the
+ function does not check whether adding INFO->offset to XREGNO gives
+ a valid hard register; even if INFO->offset + XREGNO is out of range,
+ there might be another register of the same type that is in range.
+ Likewise it doesn't check whether HARD_REGNO_MODE_OK accepts the new
+ register, since that can depend on things like whether the final
+ register number is even or odd. Callers that want to check whether
+ this particular subreg can be replaced by a simple (reg ...) should
+ use simplify_subreg_regno. */
+
void
subreg_get_info (unsigned int xregno, enum machine_mode xmode,
unsigned int offset, enum machine_mode ymode,