diff options
author | Seth Brenith <sethbrenith@users.noreply.github.com> | 2023-12-04 11:53:36 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-12-04 11:53:36 -0800 |
commit | f6c7baea098aac03687f5041fc860ca95f070e4e (patch) | |
tree | 23826312afbd0dea8f55c49abc04beb60ade28c6 /llvm/docs/LangRef.rst | |
parent | c43c86c285a39dcc6ec4a15b8f155152031b3997 (diff) | |
download | llvm-f6c7baea098aac03687f5041fc860ca95f070e4e.zip llvm-f6c7baea098aac03687f5041fc860ca95f070e4e.tar.gz llvm-f6c7baea098aac03687f5041fc860ca95f070e4e.tar.bz2 |
[Win/x64] Update preserve_most to treat XMM registers like C (#73866)
As [scottmcm
described](https://discourse.llvm.org/t/conv-c-and-conv-preservemost-mix-badly-on-windows-x64/73054),
the `preserve_most` calling convention, as currently implemented, is a
bad fit for Windows on x64. The intent of `preserve_most` is "to make
the code in the caller as unintrusive as possible", but `preserve_most`
causes the caller to spill and restore ten SIMD registers. It would be
preferable to make `preserve_most` treat the XMM registers however the C
calling convention does on the target operating system.
This is a breaking change, but the documentation indicates that
`preserve_most` is still experimental, so I believe that ABI
compatibility is not yet a requirement.
Diffstat (limited to 'llvm/docs/LangRef.rst')
-rw-r--r-- | llvm/docs/LangRef.rst | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/llvm/docs/LangRef.rst b/llvm/docs/LangRef.rst index af064d7..4bd19a3 100644 --- a/llvm/docs/LangRef.rst +++ b/llvm/docs/LangRef.rst @@ -365,8 +365,9 @@ added in the future: - On X86-64 the callee preserves all general purpose registers, except for R11 and return registers, if any. R11 can be used as a scratch register. - Floating-point registers (XMMs/YMMs) are not preserved and need to be - saved by the caller. + The treatment of floating-point registers (XMMs/YMMs) matches the OS's C + calling convention: on most platforms, they are not preserved and need to + be saved by the caller, but on Windows, xmm6-xmm15 are preserved. - On AArch64 the callee preserve all general purpose registers, except X0-X8 and X16-X18. |