diff options
author | Jan Beulich <jbeulich@novell.com> | 2006-01-10 07:25:39 +0000 |
---|---|---|
committer | Jan Beulich <jbeulich@gcc.gnu.org> | 2006-01-10 07:25:39 +0000 |
commit | 6c23a1f24ffe3530a58c8fbdb8c3ac518dae3653 (patch) | |
tree | ecd0d337721f5882a7efe7fe67798da551ed80e4 /gcc | |
parent | 345f13fecf607a6f0eabe77734139cc25b6aa56b (diff) | |
download | gcc-6c23a1f24ffe3530a58c8fbdb8c3ac518dae3653.zip gcc-6c23a1f24ffe3530a58c8fbdb8c3ac518dae3653.tar.gz gcc-6c23a1f24ffe3530a58c8fbdb8c3ac518dae3653.tar.bz2 |
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/i386.c (ix86_data_alignment): Don't force alignment to
256 bits when optimize_size.
From-SVN: r109537
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/config/i386/i386.c | 13 |
2 files changed, 13 insertions, 5 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index a12ae46..ad3f304 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,10 @@ 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 MASK_ALIGN_DOUBLE. * config/i386/nwld.h (LINK_SPEC): Add --extensions:GNU option. diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index c9886fd..e48e288 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -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. */ |