Fix problem reported by chris@lslsun.epfl.ch (Christian Iseli)
authorJim Wilson <wilson@gcc.gnu.org>
Wed, 10 Sep 1997 22:04:24 +0000 (15:04 -0700)
committerJim Wilson <wilson@gcc.gnu.org>
Wed, 10 Sep 1997 22:04:24 +0000 (15:04 -0700)
Fix problem reported by chris@lslsun.epfl.ch (Christian Iseli)
* emit-rtl.c (gen_lowpart_common): For a SUBREG, add in word when
create new subreg.

From-SVN: r15391

gcc/ChangeLog
gcc/emit-rtl.c

index f2cb5a31f155a92eae1b7a7414b8d646d40e3be2..05261bc0ef0c29263fa8e6cc5ff42e9842f312b5 100644 (file)
@@ -1,8 +1,13 @@
+Wed Sep 10 14:58:40 1997  Jim Wilson  <wilson@cygnus.com>
+
+       * emit-rtl.c (gen_lowpart_common): For a SUBREG, add in word when
+       create new subreg.
+
 Wed Sep 10 15:19:22 1997  Jeffrey A Law  (law@cygnus.com)
 
        * config.sub: Accept 'amigados' for backward compatability.
 
-Wed Sep 10 14:05:08 1997  Jim Wilson  <wilson@cygnus.com>
+Wed Sep 10 14:05:08 1997  H.J. Lu  (hjl@gnu.ai.mit.edu)
 
        * Makefile.in (testsuite/site.exp): New target.
        (check-gcc, check-g++): Depend on testsuite/site.exp.
index 86948de9905d728f3a58739685c286a124b58420..cc2834be1beb9cbdd6765c2c00ba68e01eb1e98c 100644 (file)
@@ -664,7 +664,7 @@ gen_lowpart_common (mode, x)
               || GET_MODE_SIZE (mode) == GET_MODE_UNIT_SIZE (GET_MODE (x))))
     return (GET_MODE (SUBREG_REG (x)) == mode && SUBREG_WORD (x) == 0
            ? SUBREG_REG (x)
-           : gen_rtx (SUBREG, mode, SUBREG_REG (x), SUBREG_WORD (x)));
+           : gen_rtx (SUBREG, mode, SUBREG_REG (x), SUBREG_WORD (x) + word));
   else if (GET_CODE (x) == REG)
     {
       /* If the register is not valid for MODE, return 0.  If we don't