public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "cvs-commit at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/65146] alignment of _Atomic structure member is not correct
Date: Thu, 27 Aug 2020 16:45:29 +0000	[thread overview]
Message-ID: <bug-65146-4-veIgsVaEPr@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-65146-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65146

--- Comment #24 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jakub Jelinek <jakub@gcc.gnu.org>:

https://gcc.gnu.org/g:04df5e7de2f3dd652a9cddc1c9adfbdf45947ae6

commit r11-2909-g04df5e7de2f3dd652a9cddc1c9adfbdf45947ae6
Author: Jakub Jelinek <jakub@redhat.com>
Date:   Thu Aug 27 18:44:40 2020 +0200

    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.

  parent reply	other threads:[~2020-08-27 16:45 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-20 19:58 [Bug c/65146] New: " alexey.lapshin at oracle dot com
2015-02-20 21:43 ` [Bug c/65146] " joseph at codesourcery dot com
2015-02-20 22:51 ` alexey.lapshin at oracle dot com
2015-02-20 23:32 ` joseph at codesourcery dot com
2020-08-26 14:59 ` [Bug target/65146] " jason at gcc dot gnu.org
2020-08-26 16:03 ` jakub at gcc dot gnu.org
2020-08-26 17:33 ` jakub at gcc dot gnu.org
2020-08-26 17:58 ` hjl.tools at gmail dot com
2020-08-27 16:45 ` cvs-commit at gcc dot gnu.org [this message]
2022-04-27 12:37 ` peter at cordes dot ca
2023-12-04 10:10 ` egallager at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-65146-4-veIgsVaEPr@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).