Landing: ff1ab0ed4b52
Project / Subsystem
gcc / ms-sysv
Date
2026-08-18
Author
H.J. Lu
Commit
ff1ab0ed4b5221f4d7d3eff2e7aadb826e2c9d9a
Source
github
Perf win
No
Breaking
No
All attributes
- project
- gcc
- subsystem
- ms-sysv
- patch_id
- —
- commit_hash
- ff1ab0ed4b5221f4d7d3eff2e7aadb826e2c9d9a
- source_type
- github
- headline
- ms-sysv: Add call_do_test_unaligned helper for unaligned stacks
- tldr
- Introduces an assembly wrapper to correctly call functions with the ms_abi attribute when the stack is unaligned.
- author
- H.J. Lu
- outcome
- committed
- performance_win
- false
- breaking_change
- false
- series_id
- —
- series_parts
- []
- tags
-
- • x86_64
- • abi
- • compiler
- discussion_id_link
- —
- bugzilla_pr
- —
- date
- 2026-08-18T00:00:00.000Z
The ms-sysv ABI has specific stack alignment requirements. Direct calls to functions marked with ms_abi, like do_test_unaligned, can fail when the stack is not properly aligned due to GCC’s potential stack adjustments for argument saving. This change adds a new assembly function, call_do_test_unaligned, to ensure correct stack alignment before calling do_test_unaligned, thus fixing PR126927.