aboutsummaryrefslogtreecommitdiff
path: root/gcc/builtins.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2020-08-27 18:44:40 +0200
committerJakub Jelinek <jakub@redhat.com>2020-08-27 18:44:40 +0200
commit04df5e7de2f3dd652a9cddc1c9adfbdf45947ae6 (patch)
treec72fded4155fe7118553038173a04e3b507d0d66 /gcc/builtins.c
parentabca87c57847cd04f5e05935ff9ae5121c1ecb1d (diff)
downloadgcc-04df5e7de2f3dd652a9cddc1c9adfbdf45947ae6.zip
gcc-04df5e7de2f3dd652a9cddc1c9adfbdf45947ae6.tar.gz
gcc-04df5e7de2f3dd652a9cddc1c9adfbdf45947ae6.tar.bz2
ia32: Fix alignment of _Atomic fields [PR65146]
For _Atomic fields, lowering the alignment of long long or double etc. fields on ia32 is undesirable, because then one really can't perform atomic operations on those using cmpxchg8b. The following patch stops lowering the alignment in fields for _Atomic types (the x86_field_alignment change) and for -mpreferred-stack-boundary=2 also ensures we don't misalign _Atomic long long etc. automatic variables (the ix86_{local,minimum}_alignment changes). Not sure about iamcu_alignment change, I know next to nothing about IA MCU, but unless it doesn't have cmpxchg8b instruction, it would surprise me if we don't want to do it as well. clang apparently doesn't lower the field alignment for _Atomic. 2020-08-27 Jakub Jelinek <jakub@redhat.com> PR target/65146 * config/i386/i386.c (iamcu_alignment): Don't decrease alignment for TYPE_ATOMIC types. (ix86_local_alignment): Likewise. (ix86_minimum_alignment): Likewise. (x86_field_alignment): Likewise, and emit a -Wpsabi diagnostic for it. * gcc.target/i386/pr65146.c: New test.
Diffstat (limited to 'gcc/builtins.c')
0 files changed, 0 insertions, 0 deletions