Undo accidental GET_MODE_BITSIZE damage.
authorJames E Wilson <wilson@specifixinc.com>
Tue, 11 Nov 2003 20:54:38 +0000 (20:54 +0000)
committerJim Wilson <wilson@gcc.gnu.org>
Tue, 11 Nov 2003 20:54:38 +0000 (12:54 -0800)
(store_bit_field, extract_bit_field): Revert last two
changes.

From-SVN: r73463

gcc/ChangeLog
gcc/expmed.c

index e25e22b1f491b25059f2b3abf4776853b07b3a13..b07f54a6c4da9c0ee2ccc43490766d08cee2a7f1 100644 (file)
@@ -1,3 +1,8 @@
+2003-11-11  James E Wilson  <wilson@specifixinc.com>
+
+       * expmed.c (store_bit_field, extract_bit_field): Revert last two
+       changes.
+
 2003-11-11  Kazu Hirata  <kazu@cs.umass.edu>
 
        * config/h8300/lib1funcs.asm: Replace DenHighZero with
index cb30ff35db6f3b9ab629735c815cb8d7b69b72d5..d93be934be3baf3cdfdc80187c86fca315e7ec25 100644 (file)
@@ -326,17 +326,13 @@ store_bit_field (rtx str_rtx, unsigned HOST_WIDE_INT bitsize,
 
      If the target is memory, storing any naturally aligned field can be
      done with a simple store.  For targets that support fast unaligned
-     memory, any naturally sized, unit aligned field can be done directly.
-
-     It's okay if the requested bitsize is greater than fieldmode's
-     bitsize; that just means the mode has padding bits.  */
+     memory, any naturally sized, unit aligned field can be done directly.  */
 
   byte_offset = (bitnum % BITS_PER_WORD) / BITS_PER_UNIT
                 + (offset * UNITS_PER_WORD);
 
   if (bitpos == 0
-      && GET_MODE_BITSIZE (fieldmode) != 0
-      && bitsize >= GET_MODE_BITSIZE (fieldmode)
+      && bitsize == GET_MODE_BITSIZE (fieldmode)
       && (GET_CODE (op0) != MEM
          ? ((GET_MODE_SIZE (fieldmode) >= UNITS_PER_WORD
             || GET_MODE_SIZE (GET_MODE (op0)) == GET_MODE_SIZE (fieldmode))
@@ -1033,12 +1029,9 @@ extract_bit_field (rtx str_rtx, unsigned HOST_WIDE_INT bitsize,
   if (GET_CODE (op0) == REG
       && mode == GET_MODE (op0)
       && bitnum == 0
-      && GET_MODE_BITSIZE (GET_MODE (op0)) != 0
-      && bitsize >= GET_MODE_BITSIZE (GET_MODE (op0)))
+      && bitsize == GET_MODE_BITSIZE (GET_MODE (op0)))
     {
-      /* We're trying to extract a full register from itself.
-         (If the requested bitsize is greater than the bitsize of op0,
-         that just means op0's mode has padding bits.)  */
+      /* We're trying to extract a full register from itself.  */
       return op0;
     }