[PATCH] D159540: [Basic] X86 backend changes for UEFI

Daniel Thornburgh via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Sep 21 14:13:36 PDT 2023


mysterymath added inline comments.


================
Comment at: llvm/lib/Target/X86/X86CallingConv.td:522
   // Mingw64 and native Win64 use Win64 CC
   CCIfSubtarget<"isTargetWin64()", CCDelegateTo<RetCC_X86_Win64_C>>,
 
----------------
You'll need to add switching for Win64 here too; this appears to be the convention used for assigning return values.


================
Comment at: llvm/lib/Target/X86/X86CallingConv.td:1162
 
 def CSR_Win64 : CalleeSavedRegs<(add CSR_Win64_NoSSE,
                                      (sequence "XMM%u", 6, 15))>;
----------------
It looks like you'll need some stitching in X86RegisterInfo.cpp to cause the Win64 set of callee-saved registers to be used for UEFI targets.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D159540/new/

https://reviews.llvm.org/D159540



More information about the cfe-commits mailing list