From 4137ba7ab7a1d7be1a3452dcf7f5a3818dcb4c6b Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Tue, 27 Jan 2004 11:27:40 +0100 Subject: [PATCH] i386.c (ix86_constant_alignment): Decrease alignment of long string literals from 32 bytes to sizeof (void *) when... * 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 | 6 ++++++ gcc/config/i386/i386.c | 6 +++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index b9e9d571149..05c5fb5a9dc 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2004-01-27 Jakub Jelinek + + * 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 * config/h8300/h8300.c (h8300_tiny_constant_address_p): Accept diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index 79102cfefdb..1401fc0ed94 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -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; }