[PATCH] D155863: [X86][Regcall] Add an option to respect regcall ABI v.4 in win64&win32
Bing Yu via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Jul 24 06:56:44 PDT 2023
yubing added inline comments.
================
Comment at: llvm/lib/Target/X86/X86CallingConv.td:98-103
+def RC_X86_64_RegCallv4_Win : RC_X86_64_RegCall {
+ let GPR_8 = [AL, CL, DL, DIL, SIL, R8B, R9B, R11B, R12B, R14B, R15B];
+ let GPR_16 = [AX, CX, DX, DI, SI, R8W, R9W, R11W, R12W, R14W, R15W];
+ let GPR_32 = [EAX, ECX, EDX, EDI, ESI, R8D, R9D, R11D, R12D, R14D, R15D];
+ let GPR_64 = [RAX, RCX, RDX, RDI, RSI, R8, R9, R11, R12, R14, R15];
+}
----------------
pengfei wrote:
> According to the spec, Win64 calling convention is identical to Linux64 on V4, i.e., both `R10` and `R11` are reserved. I think you can reuse `RC_X86_64_RegCall_SysV` instead.
i think spec says the following GP64 are passing/returning value
RAX, RCX, RDX, RDI, RSI, R8, R9, R10, R11, R12, R14, R15
REF: https://www.intel.com/content/www/us/en/docs/cpp-compiler/developer-guide-reference/2021-8/c-c-calling-conventions.html#GUID-011A435D-F8D0-46D7-B973-9B704CA5B54E
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D155863/new/
https://reviews.llvm.org/D155863
More information about the cfe-commits
mailing list