From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 6037B38582AE; Wed, 29 Nov 2023 19:05:48 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6037B38582AE DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1701284748; bh=tN/2YNh84grBfI0Mu5aKlHao57gsSlWlMRy6H6T+oOk=; h=From:To:Subject:Date:In-Reply-To:References:From; b=rT43Zo0Log9X+wRvfAYCwZPQBcZRbNcuFdVg7s/BDL35iJvXteizVkuGtZWUEOmOg d/ag4MwpvMJnsOKoaCPu6FYeNMNA8D1XdYM5IV25RuAzfDB2cmQKgZEOYvjSpOZiGw gtnL0h+dH+EfPhI08M5QRbq2lfhaHkm5Vluf24oI= 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: Wed, 29 Nov 2023 19:05:47 +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: NEW 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 #17 from Zeb Figura --- Actually, for that matter, what is the intended purpose of -mstackrealign? = How is it supposed to differ from -mincoming-stack-boundary and -mpreferred-stack-boundary? The documentation is kind of unclear; it "reali= gns the stack at entry [...] if necessary", which sounds like it could be synonymous with -mincoming-stack-boundary or -mpreferred-stack-boundary. But the mechanism in the code seems to be entirely separate, and it's also broken with -mavx512f (bug 110273). From some quick testing it also seems t= o be broken with aligned(8), though not aligned(16). That seems to be due to the logic at [1]; not sure if that was intentional but I'll admit it doesn't ma= ke much sense to me. But I also don't see why this mechanism is used instead of whatever mechanism is used for -mincoming-stack-boundary. [1] https://gcc.gnu.org/git/?p=3Dgcc.git;a=3Dblob;f=3Dgcc/config/i386/i386.cc;h= =3D9390f525b99f0c078c912876aee8498bc3e7701b;hb=3DHEAD#l7768=