From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id BBFB93858C53; Tue, 22 Aug 2023 21:56:54 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org BBFB93858C53 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1692741414; bh=kUKrmd40JZobwaXMVunVkr/JyExz2+5rrQDdf98NWig=; h=From:To:Subject:Date:In-Reply-To:References:From; b=enxBJbrqUTQgrWDLY+MWBN9Fq0aLHMVbFEhuSUxKrQSAN1ERbBkd6XZoakkUjfwHa ZNsR1jpfSlLx5O3VgzaKKZilxhaZluNYS91gML3o25p8LtVpbfiYtFT0ZlpDvJ7Vrz xq/nKwWmExdQWvsxH+P0O+UfytPIurN5TdH8+i2k= From: "zfigura at codeweavers dot com" 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 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Version: 12.2.0 X-Bugzilla-Keywords: ABI, wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: zfigura at codeweavers dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D111107 --- Comment #4 from Zebediah Figura --- (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 W= ine. 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= =3D2, or something, fine, but I'd like GCC to be consistent about that policy. Other= wise it looks like this behaviour is a bug. That's why I reported this as a bug.=