[llvm] [X86][APX] Implement Windows APX ABI callee-saved registers per Microsoft spec (PR #200391)
Timur Golubovich via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 2 12:02:06 PDT 2026
================
@@ -1224,8 +1237,14 @@ def CSR_Win64_RegCall_NoSSE : CalleeSavedRegs<(add RBX, RBP,
(sequence "R%u", 10, 15))>;
def CSR_Win64_RegCall : CalleeSavedRegs<(add CSR_Win64_RegCall_NoSSE,
(sequence "XMM%u", 8, 15))>;
+def CSR_Win64_APX_RegCall : CalleeSavedRegs<(add CSR_Win64_RegCall_NoSSE, R30, R31,
----------------
timurgol007 wrote:
Actually, the order doesn't affect correctness because it then is beeing parsed in two separate passes for gpr and xmms, but I placed R30/R31 before xmms intentionally so that when walking or printing the SaveList, gprs appear sequentially together which is better for readability (these arrays are generated there `X86GenRegisterInfoTargetDesc.inc`). I can change it to `(add CSR_Win64_RegCall, R30, R31)` if you prefer though, but the other existing SaveLists also follow this convention (gpr first, then xmm/ymm/xmm, then mask registers).
https://github.com/llvm/llvm-project/pull/200391
More information about the llvm-commits
mailing list