aboutsummaryrefslogtreecommitdiff
path: root/gcc/rtl.h
diff options
context:
space:
mode:
authorRichard Kenner <kenner@vlsi1.ultra.nyu.edu>2002-01-27 18:29:33 +0000
committerRichard Kenner <kenner@gcc.gnu.org>2002-01-27 13:29:33 -0500
commit917afb0c3fa15b32383bdfbc13a481012c42fcb4 (patch)
tree4c36f941d21f80038408fabd59032302b6791807 /gcc/rtl.h
parentf70a54cb876ecdde60b6ea9caa1e730b360f3272 (diff)
downloadgcc-917afb0c3fa15b32383bdfbc13a481012c42fcb4.zip
gcc-917afb0c3fa15b32383bdfbc13a481012c42fcb4.tar.gz
gcc-917afb0c3fa15b32383bdfbc13a481012c42fcb4.tar.bz2
emit-rtl.c (get_mem_attrs): Don't default alignment for non-BLKmode if not STRICT_ALIGNMENT.
* emit-rtl.c (get_mem_attrs): Don't default alignment for non-BLKmode if not STRICT_ALIGNMENT. * rtl.h (MEM_ALIGN): Likewise. From-SVN: r49268
Diffstat (limited to 'gcc/rtl.h')
-rw-r--r--gcc/rtl.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/gcc/rtl.h b/gcc/rtl.h
index 4ef5c4c..b474531 100644
--- a/gcc/rtl.h
+++ b/gcc/rtl.h
@@ -926,12 +926,12 @@ do { \
: GET_MODE (RTX) != BLKmode ? GEN_INT (GET_MODE_SIZE (GET_MODE (RTX))) \
: 0)
-/* For a MEM rtx, the alignment in bits. */
+/* For a MEM rtx, the alignment in bits. We can use the alignment of the
+ mode as a default when STRICT_ALIGNMENT, but not if not. */
#define MEM_ALIGN(RTX) \
(MEM_ATTRS (RTX) != 0 ? MEM_ATTRS (RTX)->align \
- : GET_MODE (RTX) != BLKmode ? GET_MODE_ALIGNMENT (GET_MODE (RTX)) \
- : BITS_PER_UNIT)
-
+ : (STRICT_ALIGNMENT && GET_MODE (RTX) != BLKmode \
+ ? GET_MODE_ALIGNMENT (GET_MODE (RTX)) : BITS_PER_UNIT))
/* Copy the attributes that apply to memory locations from RHS to LHS. */
#define MEM_COPY_ATTRIBUTES(LHS, RHS) \