[PATCH] D94118: [X86] ESP should not be in the regcall CSR list

Pengfei Wang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 5 18:34:44 PST 2021


pengfei added a comment.

I saw the document <https://software.intel.com/content/www/us/en/develop/documentation/cpp-compiler-developer-guide-and-reference/top/compiler-reference/c-c-calling-conventions.html> mentions ESP/RSP should be preserve for regcall. But I cannot think out a situation that ESP/RSP need to preserve either.



================
Comment at: llvm/lib/Target/X86/X86CallingConv.td:1168
 def CSR_Win32_CFGuard_Check       : CalleeSavedRegs<(add CSR_32_RegCall, ECX)>;
 def CSR_Win64_RegCall_NoSSE : CalleeSavedRegs<(add RBX, RBP, RSP,
                                               (sequence "R%u", 10, 15))>;
----------------
Why do we still preserve RSP for 64 bit?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D94118



More information about the llvm-commits mailing list