Landing: 9d5efd46b332
Project / Subsystem
gcc / x86-64
Date
2026-05-10
Author
H.J. Lu
Commit
9d5efd46b3329f6b7b0eb2983f317687899caba6
Source
github
Perf win
No
Breaking
No
All attributes
- project
- gcc
- subsystem
- x86-64
- patch_id
- —
- commit_hash
- 9d5efd46b3329f6b7b0eb2983f317687899caba6
- source_type
- github
- headline
- x86-64: Use R11 for DRAP register in preserve_none functions
- tldr
- The compiler now uses R11 for the DRAP register in preserve_none functions on x86-64, improving stack alignment.
- author
- H.J. Lu
- outcome
- committed
- performance_win
- false
- breaking_change
- false
- series_id
- —
- series_parts
- []
- tags
-
- • x86-64
- • stack alignment
- • register allocation
- • optimization
- discussion_id_link
- —
- bugzilla_pr
- —
- date
- 2026-05-10T00:00:00.000Z
This commit changes the register used for the DRAP (dynamic realignment argument pointer) in preserve_none functions on x86-64 from R10 to R11. R11 is a more suitable choice because it doesn’t conflict with argument registers. This change ensures proper stack pointer restoration in function epilogues after stack realignment, and includes new test cases for verification.