public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "zfigura at codeweavers dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/111107] i686-w64-mingw32 does not realign stack when __attribute__((aligned)) or __attribute__((vector_size)) are used
Date: Tue, 22 Aug 2023 21:56:54 +0000	[thread overview]
Message-ID: <bug-111107-4-wmJb6swkT3@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-111107-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #4 from Zebediah Figura <zfigura at codeweavers dot com> ---
(In reply to Andrew Pinski from comment #3)
> https://inbox.sourceware.org/gcc-patches/5969976.Bvae8NF9fS@polaris/

Again, I'm not sure what you're trying to communicate here. I'm aware that
-mstackrealign exists (and its attribute equivalent). We *do* use that in Wine.

Here is, again, what I am trying to communicate: Currently i686-w64-mingw32-gcc
effectly assumes 4-byte stack alignment in some places (when -msse2 is used),
and 16-byte alignment in others (when __attribute__((aligned)) is used). I am
trying to request that it pick one or the other and stick with it.

Now, personally, I think that assuming 4-byte stack alignment makes more
*sense*. Otherwise *every* API function needs that extra alignment, which is
wasteful when comparatively little code actually uses types aligned to 8 or
more bytes. (It obviously makes more sense if you can get the whole API to
agree on 16-bytes; then you don't have to manually align anything).

But if there's a clear consensus that gcc should assume 16 bytes, and that it's
Wine's responsibility to set -mstackrealign, or -mincoming-stack-boundary=2, or
something, fine, but I'd like GCC to be consistent about that policy. Otherwise
it looks like this behaviour is a bug. That's why I reported this as a bug.

  parent reply	other threads:[~2023-08-22 21:56 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-22 21:27 [Bug target/111107] New: " zfigura at codeweavers dot com
2023-08-22 21:29 ` [Bug target/111107] " pinskia at gcc dot gnu.org
2023-08-22 21:41 ` zfigura at codeweavers dot com
2023-08-22 21:41 ` pinskia at gcc dot gnu.org
2023-08-22 21:56 ` zfigura at codeweavers dot com [this message]
2023-08-23  7:55 ` rguenth at gcc dot gnu.org
2023-08-24 20:29 ` zfigura at codeweavers dot com
2023-08-28 18:28 ` gabrielopcode at gmail dot com
2023-11-25  7:34 ` alexhenrie24 at gmail dot com
2023-11-25  8:57 ` amonakov at gcc dot gnu.org
2023-11-25 17:40 ` gabrielopcode at gmail dot com
2023-11-25 18:54 ` alexhenrie24 at gmail dot com
2023-11-25 19:20 ` alexhenrie24 at gmail dot com
2023-11-25 21:45 ` alexhenrie24 at gmail dot com
2023-11-28 22:34 ` ebotcazou at gcc dot gnu.org
2023-11-28 22:58 ` ebotcazou at gcc dot gnu.org
2023-11-29  3:54 ` zfigura at codeweavers dot com
2023-11-29  7:49 ` ebotcazou at gcc dot gnu.org
2023-11-29 19:05 ` zfigura at codeweavers dot com

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-111107-4-wmJb6swkT3@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).