]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
i386.c (ix86_data_alignment): Don't force alignment to 256 bits when optimize_size.
authorJan Beulich <jbeulich@novell.com>
Tue, 10 Jan 2006 07:25:39 +0000 (07:25 +0000)
committerJan Beulich <jbeulich@gcc.gnu.org>
Tue, 10 Jan 2006 07:25:39 +0000 (07:25 +0000)
2006-01-10  Jan Beulich  <jbeulich@novell.com>

* config/i386/i386.c (ix86_data_alignment): Don't force alignment to
256 bits when optimize_size.

From-SVN: r109537

gcc/ChangeLog
gcc/config/i386/i386.c

index a12ae46fdb9f7a1bd206538394487e1dc4cafb49..ad3f304892d3e68e4c98bf1e321e4352fa7b6d6e 100644 (file)
@@ -1,3 +1,8 @@
+2006-01-10  Jan Beulich  <jbeulich@novell.com>
+
+       * config/i386/i386.c (ix86_data_alignment): Don't force alignment to
+       256 bits when optimize_size.
+
 2006-01-10  Jan Beulich  <jbeulich@novell.com>
 
        * config/i386/netware.h (TARGET_SUBTARGET_DEFAULT): Include
index c9886fd105a2a04021b0da49b301e9be3d8efed4..e48e288cbc8e285774394af0a8cc387f3b319fa5 100644 (file)
@@ -13363,12 +13363,15 @@ ix86_constant_alignment (tree exp, int align)
 int
 ix86_data_alignment (tree type, int align)
 {
+  int max_align = optimize_size ? BITS_PER_WORD : 256;
+
   if (AGGREGATE_TYPE_P (type)
-       && TYPE_SIZE (type)
-       && TREE_CODE (TYPE_SIZE (type)) == INTEGER_CST
-       && (TREE_INT_CST_LOW (TYPE_SIZE (type)) >= 256
-          || TREE_INT_CST_HIGH (TYPE_SIZE (type))) && align < 256)
-    return 256;
+      && TYPE_SIZE (type)
+      && TREE_CODE (TYPE_SIZE (type)) == INTEGER_CST
+      && (TREE_INT_CST_LOW (TYPE_SIZE (type)) >= (unsigned) max_align
+         || TREE_INT_CST_HIGH (TYPE_SIZE (type)))
+      && align < max_align)
+    align = max_align;
 
   /* x86-64 ABI requires arrays greater than 16 bytes to be aligned
      to 16byte boundary.  */