From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id D24183857361; Wed, 20 Apr 2022 14:41:30 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D24183857361 From: "hjl.tools at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/54412] minimal 32-byte stack alignment with -mavx on 64-bit Windows Date: Wed, 20 Apr 2022 14:41:30 +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: 4.7.1 X-Bugzilla-Keywords: wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: hjl.tools at gmail dot com X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: ebotcazou 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 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Apr 2022 14:41:30 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D54412 --- Comment #40 from H.J. Lu --- (In reply to Eric Botcazou from comment #37) > > If the Windows ABI doesn't align stack or not as much as gcc assumes, t= hen a > > fix would ensure only automatic vars on Windows are accessed always usi= ng > > unaligned vector instructions provided dynamic stack realignment is not= an > > option. >=20 > It's classical double-word alignment, i.e. 16 bytes, and AVX requires 32 > bytes. > The implementation of dynamic stack realignment is too much of a kludge to > be safely used on Windows IMO so, yes, the way out is probably unaligned > vector instructions. Assembler in binutils 2.38 supports: -muse-unaligned-vector-move encode aligned vector move as unaligned vector mo= ve=