This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: ix86_data_alignment: bad defaults?


> 
> Why do we use 256 instead of BIGGEST ALIGNMENT in ix86_data_alignment?
> This is causing all sorts of build problems for djgpp, as I'm getting
> lots of warnings about too-big alignments, and with -Werror...

It is to improve performance of string functions on larger chunks of
data.  x86-64 specify this, for x86 it is optional.  I don't think we
should end up warning here - it is done only for static variables where
the alignment can be higher than what BIGGEST_ALIGNMENT promise.

Honza
> 
> Index: i386.c
> ===================================================================
> --- i386.c      (revision 122221)
> +++ i386.c      (working copy)
> @@ -15417,7 +15417,7 @@
>  int
>  ix86_data_alignment (tree type, int align)
>  {
> -  int max_align = optimize_size ? BITS_PER_WORD : 256;
> +  int max_align = optimize_size ? BITS_PER_WORD : BIGGEST_ALIGNMENT;
>  
>    if (AGGREGATE_TYPE_P (type)
>        && TYPE_SIZE (type)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]