diff options
author | Richard Henderson <rth@redhat.com> | 2002-09-16 21:15:12 -0700 |
---|---|---|
committer | Richard Henderson <rth@gcc.gnu.org> | 2002-09-16 21:15:12 -0700 |
commit | 8c317c5f947d932a1a7bfa0a14711bf127936154 (patch) | |
tree | 7ed96aea869e8b3bcd47f9acf767d6ce90bc33d1 | |
parent | 3780101d62cf3732d9fd61f56b7278532b9a38e3 (diff) | |
download | gcc-8c317c5f947d932a1a7bfa0a14711bf127936154.zip gcc-8c317c5f947d932a1a7bfa0a14711bf127936154.tar.gz gcc-8c317c5f947d932a1a7bfa0a14711bf127936154.tar.bz2 |
emit-rtl.c (set_mem_attributes_minus_bitpos): Adjust SIZE as well as OFFSET for BITPOS.
* emit-rtl.c (set_mem_attributes_minus_bitpos): Adjust SIZE
as well as OFFSET for BITPOS.
From-SVN: r57228
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/emit-rtl.c | 9 |
2 files changed, 12 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 847e93a..0a5248f 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2002-09-16 Richard Henderson <rth@redhat.com> + + * emit-rtl.c (set_mem_attributes_minus_bitpos): Adjust SIZE + as well as OFFSET for BITPOS. + 2002-09-16 Jeff Garzik <jgarzik@mandrakesoft.com> * config.gcc: Treat winchip_c6-*|winchip2-*|c3-* as pentium-mmx. diff --git a/gcc/emit-rtl.c b/gcc/emit-rtl.c index 70a1228..4a8b9e3 100644 --- a/gcc/emit-rtl.c +++ b/gcc/emit-rtl.c @@ -1885,9 +1885,14 @@ set_mem_attributes_minus_bitpos (ref, t, objectp, bitpos) } /* If we modified OFFSET based on T, then subtract the outstanding - bit position offset. */ + bit position offset. Similarly, increase the size of the accessed + object to contain the negative offset. */ if (apply_bitpos) - offset = plus_constant (offset, -(apply_bitpos / BITS_PER_UNIT)); + { + offset = plus_constant (offset, -(apply_bitpos / BITS_PER_UNIT)); + if (size) + size = plus_constant (size, apply_bitpos / BITS_PER_UNIT); + } /* Now set the attributes we computed above. */ MEM_ATTRS (ref) |