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:41:25 +0000	[thread overview]
Message-ID: <bug-111107-4-NnPViTufvW@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 #2 from Zebediah Figura <zfigura at codeweavers dot com> ---
(In reply to Andrew Pinski from comment #1)
> This on purpose, it is only callbacks (from libc) and main that needs the
> realignment here.

I don't understand what you mean? It's not just libc and main that needs this.
As mentioned, this is *the* 32-bit x86 ABI on Windows. Win32 programs compiled
with MSVC don't assume 16-byte alignment (if they do now, they didn't
historically, and we do regularly run across programs in Wine that do not keep
the stack aligned to 16 bytes).

And again, gcc does not, as a blanket statement, assume 16-byte stack alignment
for i386. If we think that gcc *should* assume 16-byte stack alignment, then we
should also get rid of the existing code in gcc that assumes 4-byte stack
alignment. I think this is a bad idea, for the reasons I've been describing,
but if that's the decision then let's please at least be consistent and clear
about it.

I'm sure this is something of a canned response since, as you say, this issue
has been reported before (although I couldn't actually find any such reports,
just from searching the gcc Bugzilla?). I wouldn't report this as a bug per se
if gcc wasn't currently being *inconsistent* about what it assumes the stack
alignment is.

  parent reply	other threads:[~2023-08-22 21:41 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 [this message]
2023-08-22 21:41 ` pinskia at gcc dot gnu.org
2023-08-22 21:56 ` zfigura at codeweavers dot com
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-NnPViTufvW@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).