(extract_split_bit_field): Change shift count calculation
authorRichard Stallman <rms@gnu.org>
Mon, 18 Oct 1993 20:17:08 +0000 (20:17 +0000)
committerRichard Stallman <rms@gnu.org>
Mon, 18 Oct 1993 20:17:08 +0000 (20:17 +0000)
in little-endian case.

From-SVN: r5794

gcc/expmed.c

index bb22a05851b1bbbae9da8fe1faef3f7299e3485a..93298339dfc1b08e0f91362bc477d57ae19096f7 100644 (file)
@@ -1503,9 +1503,9 @@ extract_split_bit_field (op0, bitsize, bitpos, unsignedp, align)
        part = expand_shift (LSHIFT_EXPR, word_mode, part,
                             build_int_2 (bitsize - bitsdone, 0), 0, 1);
 #else
-      if (bitsdone != 0)
+      if (bitsdone != thissize)
        part = expand_shift (LSHIFT_EXPR, word_mode, part,
-                            build_int_2 (bitsdone, 0), 0, 1);
+                            build_int_2 (bitsdone - thissize, 0), 0, 1);
 #endif
 
       if (first)