From: Segher Boessenkool Date: Tue, 7 Mar 2017 11:53:32 +0000 (+0100) Subject: i386: Do not align small stack slots to 16 bytes X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=2413298e2df06c6013fb5533b7e01d6bdb38e4c7;p=gcc.git i386: Do not align small stack slots to 16 bytes As Shmuel reported in , on x86-64 small structures in automatic storage are aligned to 16 bytes. This seems to be because of a mix-up between bits and bytes in the i386 target code. * config/i386/i386.c (ix86_local_alignment): Align most aggregates of 16 bytes and more to 16 bytes, not those of 16 bits and more. From-SVN: r245949 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index b09e49fe872..8298ebb8d4d 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2017-03-07 Segher Boessenkool + + * config/i386/i386.c (ix86_local_alignment): Align most aggregates + of 16 bytes and more to 16 bytes, not those of 16 bits and more. + 2017-03-07 Kyrylo Tkachov PR c/79855 diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index e705a3eb923..5fcd51f1385 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -30467,7 +30467,7 @@ ix86_local_alignment (tree exp, machine_mode mode, != TYPE_MAIN_VARIANT (va_list_type_node))) && TYPE_SIZE (type) && TREE_CODE (TYPE_SIZE (type)) == INTEGER_CST - && wi::geu_p (TYPE_SIZE (type), 16) + && wi::geu_p (TYPE_SIZE (type), 128) && align < 128) return 128; }