[PATCH] D94118: [X86] ESP should not be in the regcall CSR list
Reid Kleckner via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 5 19:22:48 PST 2021
rnk added a comment.
In D94118#2481099 <https://reviews.llvm.org/D94118#2481099>, @pengfei wrote:
> 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.
The document is correct, SP is preserved, but it's done by the standard SP adjustments, not by explicitly pushing and popping the SP register.
================
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))>;
----------------
pengfei wrote:
> Why do we still preserve RSP for 64 bit?
Looks like that shows up in codegen as well.
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