public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/54412] New: Request for 32-byte stack alignment with -mavx on Windows
@ 2012-08-30  1:10 rcopley at gmail dot com
  2013-09-10 10:30 ` [Bug target/54412] " ktietz at gcc dot gnu.org
                   ` (25 more replies)
  0 siblings, 26 replies; 27+ messages in thread
From: rcopley at gmail dot com @ 2012-08-30  1:10 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54412

             Bug #: 54412
           Summary: Request for 32-byte stack alignment with -mavx on
                    Windows
    Classification: Unclassified
           Product: gcc
           Version: 4.7.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: rcopley@gmail.com


Created attachment 28103
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=28103
Self-contained C source, with AVX alignment bug on Windows

Code generated by GCC 4.7.1 for the Windows x86_64-w64-mingw32 target, with
"-mavx", can segfault due to alignment errors when the 32-byte ymm registers
are spilled onto the stack. May I please submit a feature request for 32-byte
stack alignment on this target where necessary?

Compiled for Windows with "gcc -O0 -m64 -mavx bug.c" using GCC 4.7.1 with the
MingGW W64 toolchain, the attached program segfaults. Specifically, it uses
vmovapd to copy the value of %ymm0 to a location on the stack before calling
f(), but doesn't align the location to 32 bytes as required by that
instruction. In contrast, the generated code for Linux (using GCC 4.6.3 from
Ubuntu) does explicitly align the stack to 32 bytes.

The lack of stack alignment on Windows has been noted before; see for
example http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49001 and
http://stackoverflow.com/questions/5983389.


^ permalink raw reply	[flat|nested] 27+ messages in thread

end of thread, other threads:[~2024-03-28 20:26 UTC | newest]

Thread overview: 27+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-08-30  1:10 [Bug target/54412] New: Request for 32-byte stack alignment with -mavx on Windows rcopley at gmail dot com
2013-09-10 10:30 ` [Bug target/54412] " ktietz at gcc dot gnu.org
2013-09-10 17:26 ` rcopley at gmail dot com
2013-09-10 17:49 ` rcopley at gmail dot com
2014-09-03 21:17 ` roland at rschulz dot eu
2014-09-04 22:49 ` rcopley at gmail dot com
2014-09-05  1:42 ` roland at rschulz dot eu
2014-09-05 18:40 ` rcopley at gmail dot com
2014-09-05 18:44 ` rcopley at gmail dot com
2014-09-21  1:08 ` rcopley at gmail dot com
2015-09-22 10:51 ` ktietz at gcc dot gnu.org
2021-08-23  3:12 ` [Bug target/54412] minimal 32-byte stack alignment with -mavx on 64-bit Windows arthur200126 at gmail dot com
2021-08-25  5:38 ` dimula73 at gmail dot com
2021-09-26  7:15 ` mehdi.chinoune at hotmail dot com
2022-04-01 15:01 ` lists at coryfields dot com
2022-04-01 15:38 ` ebotcazou at gcc dot gnu.org
2022-04-01 16:27 ` steve at sk2 dot org
2022-04-01 17:59 ` jakub at gcc dot gnu.org
2022-04-01 20:25 ` ebotcazou at gcc dot gnu.org
2022-04-01 20:50 ` rcopley at gmail dot com
2022-04-01 21:00 ` ebotcazou at gcc dot gnu.org
2022-04-20 14:41 ` hjl.tools at gmail dot com
2024-01-09 10:15 ` ebotcazou at gcc dot gnu.org
2024-03-26 15:12 ` avraham.adler at gmail dot com
2024-03-27 17:42 ` dimula73 at gmail dot com
2024-03-28 17:30 ` avraham.adler at gmail dot com
2024-03-28 20:26 ` ebotcazou at gcc dot gnu.org

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).