expmed.c (store_bit_field): Do not use bitfield instructions for STRICT_ALIGNMENT...
authorJeff Law <law@gcc.gnu.org>
Wed, 25 Aug 1993 23:38:10 +0000 (17:38 -0600)
committerJeff Law <law@gcc.gnu.org>
Wed, 25 Aug 1993 23:38:10 +0000 (17:38 -0600)
* expmed.c (store_bit_field): Do not use bitfield instructions for
STRICT_ALIGNMENT machines if the MEM's alignment isn't as big as
the MEM's mode.

From-SVN: r5213

gcc/expmed.c

index 1739e70..c8e2f22 100644 (file)
@@ -389,7 +389,8 @@ store_bit_field (str_rtx, bitsize, bitnum, fieldmode, value, align, total_size)
          else
            bestmode = GET_MODE (op0);
 
-         if (bestmode == VOIDmode)
+         if (bestmode == VOIDmode
+             || (STRICT_ALIGNMENT && GET_MODE_SIZE (bestmode) > align))
            goto insv_loses;
 
          /* Adjust address to point to the containing unit of that mode.  */
@@ -959,7 +960,8 @@ extract_bit_field (str_rtx, bitsize, bitnum, unsignedp,
                  else
                    bestmode = GET_MODE (xop0);
 
-                 if (bestmode == VOIDmode)
+                 if (bestmode == VOIDmode
+                     || (STRICT_ALIGNMENT && GET_MODE_SIZE (bestmode) > align))
                    goto extzv_loses;
 
                  /* Compute offset as multiple of this unit,
@@ -1092,7 +1094,8 @@ extract_bit_field (str_rtx, bitsize, bitnum, unsignedp,
                  else
                    bestmode = GET_MODE (xop0);
 
-                 if (bestmode == VOIDmode)
+                 if (bestmode == VOIDmode
+                     || (STRICT_ALIGNMENT && GET_MODE_SIZE (bestmode) > align))
                    goto extv_loses;
 
                  /* Compute offset as multiple of this unit,