[all-commits] [llvm/llvm-project] 12cfc4: [X86][APX] Implement Windows APX ABI callee-saved ...

Timur Golubovich via All-commits all-commits at lists.llvm.org
Fri Jun 5 06:13:38 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 12cfc4dc56fcf7568602d0973d8b1090959d0900
      https://github.com/llvm/llvm-project/commit/12cfc4dc56fcf7568602d0973d8b1090959d0900
  Author: Timur Golubovich <timurgol007 at gmail.com>
  Date:   2026-06-05 (Fri, 05 Jun 2026)

  Changed paths:
    M llvm/docs/ReleaseNotes.md
    M llvm/lib/Target/X86/X86CallingConv.td
    M llvm/lib/Target/X86/X86RegisterInfo.cpp
    M llvm/lib/Target/X86/X86RegisterInfo.td
    M llvm/lib/Target/X86/X86Subtarget.cpp
    M llvm/test/CodeGen/X86/apx/memfold-no-physreg.ll
    M llvm/test/CodeGen/X86/apx/mul-i1024.ll
    A llvm/test/CodeGen/X86/apx/setjmp-win64-abi.ll
    A llvm/test/CodeGen/X86/apx/win64-abi.ll

  Log Message:
  -----------
  [X86][APX] Implement Windows APX ABI callee-saved registers per Microsoft spec (#200391)

Per the Microsoft x64 calling convention, R30 and R31 are non-volatile
when APX is available. Define CSR_Win64_APX and CSR_Win64_APX_NoSSE
extending the standard Win64 CSR sets. Update getCalleeSavedRegs and
getCallPreservedMask accordingly.

Reserve R30/R31 in functions that call setjmp, as the unwinder cannot
restore APX extended registers. Emit a warning for large functions where
this may impact performance.

Ref:
https://learn.microsoft.com/en-us/cpp/build/x64-calling-convention?view=msvc-170#callercallee-saved-registers

---------

Co-authored-by: Daniel Paoliello <danpao at microsoft.com>



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list