Landing: 77b2eaf09c77
Project / Subsystem
gcc / x86
Date
2026-05-24
Author
oltolm
Commit
77b2eaf09c77bf2dddcb8c35ee8bc9cc99e2f93c
Source
github
Perf win
No
Breaking
No
All attributes
- project
- gcc
- subsystem
- x86
- patch_id
- —
- commit_hash
- 77b2eaf09c77bf2dddcb8c35ee8bc9cc99e2f93c
- source_type
- github
- headline
- x86: Fix stack alignment for AVX arguments on Windows.
- tldr
- Fixes stack alignment issues for indirect AVX arguments and return values on Windows, ensuring correct memory access.
- author
- oltolm
- outcome
- committed
- performance_win
- false
- breaking_change
- false
- series_id
- —
- series_parts
- []
- tags
-
- • x86
- • AVX
- • ABI
- • alignment
- • windows
- discussion_id_link
- —
- bugzilla_pr
- —
- date
- 2026-05-24T00:00:00.000Z
This patch resolves stack alignment issues on x86_64 Windows when using AVX instructions. The Windows ABI limits stack alignment to 128 bits, but 256-bit AVX values are passed and returned indirectly. This could lead to under-aligned stack slots and incorrect memory accesses. The fix involves dynamically allocating stack space for over-aligned arguments and return slots, and overallocating local stack slots to ensure proper alignment.