]> gcc.gnu.org Git - gcc.git/commitdiff
*** empty log message ***
authorRichard Stallman <rms@gnu.org>
Sun, 19 Apr 1992 01:16:25 +0000 (01:16 +0000)
committerRichard Stallman <rms@gnu.org>
Sun, 19 Apr 1992 01:16:25 +0000 (01:16 +0000)
From-SVN: r787

gcc/expmed.c

index 4b0f77daa6a0ce342167ed086f024ffb89085349..44dc7ec0310472a46b68a59ac929147bea938bbd 100644 (file)
@@ -200,13 +200,18 @@ store_bit_field (str_rtx, bitsize, bitnum, fieldmode, value, align, total_size)
 
   /* Note that the adjustment of BITPOS above has no effect on whether
      BITPOS is 0 in a REG bigger than a word.  */
-  if (GET_MODE_SIZE (fieldmode) >= UNITS_PER_WORD && GET_CODE (op0) != MEM
+  if (GET_MODE_SIZE (fieldmode) >= UNITS_PER_WORD
+      && (! STRICT_ALIGNMENT || GET_CODE (op0) != MEM)
       && bitpos == 0 && bitsize == GET_MODE_BITSIZE (fieldmode))
     {
       /* Storing in a full-word or multi-word field in a register
         can be done with just SUBREG.  */
       if (GET_MODE (op0) != fieldmode)
-       op0 = gen_rtx (SUBREG, fieldmode, op0, offset);
+       if (GET_CODE (op0) == REG)
+         op0 = gen_rtx (SUBREG, fieldmode, op0, offset);
+       else
+         op0 = change_address (op0, fieldmode,
+                               plus_constant (XEXP (op0, 0), offset));
       emit_move_insn (op0, value);
       return value;
     }
This page took 0.059549 seconds and 5 git commands to generate.