]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
i386.c (ix86_constant_alignment): Decrease alignment of long string literals from...
authorJakub Jelinek <jakub@redhat.com>
Tue, 27 Jan 2004 10:27:40 +0000 (11:27 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Tue, 27 Jan 2004 10:27:40 +0000 (11:27 +0100)
* config/i386/i386.c (ix86_constant_alignment): Decrease alignment
of long string literals from 32 bytes to sizeof (void *) when !-Os
and to 1 with -Os.

From-SVN: r76694

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

index b9e9d5711498e3a3a7f4e06b120f29ca007a6373..05c5fb5a9dcaf1a5648be5045220c4291fb20bf6 100644 (file)
@@ -1,3 +1,9 @@
+2004-01-27  Jakub Jelinek  <jakub@redhat.com>
+
+       * config/i386/i386.c (ix86_constant_alignment): Decrease alignment
+       of long string literals from 32 bytes to sizeof (void *) when !-Os
+       and to 1 with -Os.
+
 2004-01-26  Kazu Hirata  <kazu@cs.umass.edu>
 
        * config/h8300/h8300.c (h8300_tiny_constant_address_p): Accept
index 79102cfefdb9149b648d54a6582d2313d015bcfe..1401fc0ed94d1bbb3dd74a47f87252a8e25b8011 100644 (file)
@@ -12565,9 +12565,9 @@ ix86_constant_alignment (tree exp, int align)
       else if (ALIGN_MODE_128 (TYPE_MODE (TREE_TYPE (exp))) && align < 128)
        return 128;
     }
-  else if (TREE_CODE (exp) == STRING_CST && TREE_STRING_LENGTH (exp) >= 31
-          && align < 256)
-    return 256;
+  else if (!optimize_size && TREE_CODE (exp) == STRING_CST
+          && TREE_STRING_LENGTH (exp) >= 31 && align < BITS_PER_WORD)
+    return BITS_PER_WORD;
 
   return align;
 }