]> gcc.gnu.org Git - gcc.git/commitdiff
expr.c (expand_expr, [...]): When seeing if should use bitfield operations...
authorRichard Kenner <kenner@vlsi1.ultra.nyu.edu>
Sat, 5 Jul 2003 11:51:54 +0000 (11:51 +0000)
committerRichard Kenner <kenner@gcc.gnu.org>
Sat, 5 Jul 2003 11:51:54 +0000 (07:51 -0400)
* expr.c (expand_expr, case COMPONENT_REF): When seeing if should use
bitfield operations, use STRICT_ALIGNMENT, not SLOW_UNALIGNED_ACCESS
if EXPAND_CONST_ADDRESS or EXPAND_INITIALIZER.

From-SVN: r68968

gcc/ChangeLog
gcc/expr.c

index f3369639fa46531dc87617acfbdd1ca7e8a8f28e..04fa53e0bce312187f8333d53f8a9e76d71a52be 100644 (file)
@@ -1,3 +1,9 @@
+2003-07-05  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
+
+       * expr.c (expand_expr, case COMPONENT_REF): When seeing if should use 
+       bitfield operations, use STRICT_ALIGNMENT, not SLOW_UNALIGNED_ACCESS
+       if EXPAND_CONST_ADDRESS or EXPAND_INITIALIZER.
+
 2003-07-05  Andreas Jaeger  <aj@suse.de>
 
        * genattrtab.c (write_attr_get): Revert part of last patch to
index 56d733f2d0fcb237b82ccc3fc52cd694a45f0c46..88374f35ee36fe457d866208f9fc9e8460822d89 100644 (file)
@@ -7541,7 +7541,10 @@ expand_expr (tree exp, rtx target, enum machine_mode tmode, enum expand_modifier
            || (mode1 != BLKmode
                && (((TYPE_ALIGN (TREE_TYPE (tem)) < GET_MODE_ALIGNMENT (mode)
                      || (bitpos % GET_MODE_ALIGNMENT (mode) != 0))
-                    && SLOW_UNALIGNED_ACCESS (mode1, MEM_ALIGN (op0)))
+                    && ((modifier == EXPAND_CONST_ADDRESS
+                         || modifier == EXPAND_INITIALIZER)
+                        ? STRICT_ALIGNMENT
+                        : SLOW_UNALIGNED_ACCESS (mode1, MEM_ALIGN (op0))))
                    || (bitpos % BITS_PER_UNIT != 0)))
            /* If the type and the field are a constant size and the
               size of the type isn't the same size as the bitfield,
This page took 0.091447 seconds and 5 git commands to generate.