Landing: 336f25a0ad83

Project / Subsystem

gcc / x86

Date

2026-05-13

Author

H.J. Lu

Commit

336f25a0ad83cc74b6a18137ffd177eefa4a81b0

Source

github

Perf win

No

Breaking

No

All attributes

project
gcc
subsystem
x86
patch_id
commit_hash
336f25a0ad83cc74b6a18137ffd177eefa4a81b0
source_type
github
headline
x86-64 MS ABI calls: Don't preserve less registers for preserve_none
tldr
Fixes x86-64 MS ABI calls with preserve_none attribute to not incorrectly preserve registers.
author
H.J. Lu
outcome
committed
performance_win
false
breaking_change
false
series_id
series_parts
[]
tags
  • x86
  • abi
  • optimization
discussion_id_link
bugzilla_pr
date
2026-05-13T00:00:00.000Z

This change corrects the handling of the preserve_none attribute for x86-64 calls using the MS ABI. Previously, GCC incorrectly set a flag that caused it to preserve more registers than necessary, mirroring the SYSV ABI’s behavior. This commit disables that flag for MS ABI calls, ensuring that the number of integer registers passed on the stack remains consistent with the ABI’s expectations (4 registers).