simplify-rtx.c (simplify_immed_subreg): Correctly extract the high word of an integra...
authorRichard Earnshaw <rearnsha@arm.com>
Mon, 12 Jan 2004 16:01:18 +0000 (16:01 +0000)
committerRichard Earnshaw <rearnsha@gcc.gnu.org>
Mon, 12 Jan 2004 16:01:18 +0000 (16:01 +0000)
* simplify-rtx.c (simplify_immed_subreg): Correctly extract the
high word of an integral CONST_DOUBLE.

From-SVN: r75725

gcc/ChangeLog
gcc/simplify-rtx.c

index 724ede3a50ba75d9f45e665be025005522ff6a13..a3970ca76be4fb4d814bc90715afd0282f94bfa0 100644 (file)
@@ -1,3 +1,8 @@
+2004-01-12  Richard Earnshaw  <rearnsha@arm.com>
+
+       * simplify-rtx.c (simplify_immed_subreg): Correctly extract the
+       high word of an integral CONST_DOUBLE.
+
 2004-01-09  Paul Brook  <paul@codesourcery.com>
 
        * simplify-rtx.c (simplify_plus_minus): Always generate canonical form.
index 615e09f8452d9ac21205608f13101469344b408b..5664bca9081a3c30a846864576950cb32664cc56 100644 (file)
@@ -3041,7 +3041,8 @@ simplify_immed_subreg (enum machine_mode outermode, rtx op,
                *vp++ = CONST_DOUBLE_LOW (el) >> i;
              while (i < HOST_BITS_PER_WIDE_INT * 2 && i < elem_bitsize)
                {
-                 *vp++ = CONST_DOUBLE_HIGH (el) >> i;
+                 *vp++
+                   = CONST_DOUBLE_HIGH (el) >> (i - HOST_BITS_PER_WIDE_INT);
                  i += value_bit;
                }
              /* It shouldn't matter what's done here, so fill it with