Enum CallingConvention
Calling Convention for functions
public enum CallingConvention
Fields
AMDGpuComputeShader = 90Calling convention used for Mesa compute shaders.
AMDGpuEs = 96Calling convention used for AMDPAL shader stage before geometry shader if geometry is in use.
Either the domain (= tessellation evaluation) shader if tessellation is in use, or otherwise the vertex shader.
AMDGpuGeometryShader = 88Calling convention used for Mesa geometry shaders.
AMDGpuHullShader = 93Calling convention used for Mesa hull shaders. (= tessellation control shaders)
AMDGpuKernel = 91Calling convention for AMDGPU code object kernels.
AMDGpuLS = 95Calling convention used for AMDPAL vertex shader if tessellation is in use.
AMDGpuPixelShader = 89Calling convention used for Mesa pixel shaders.
AMDGpuVertexShader = 87Calling convention used for Mesa vertex shaders.
AVRBuiltIn = 86Calling convention used for special AVR rtlib functions which have an "optimized" convention to preserve registers.
AVRInterrupt = 84Used for AVR interrupt routines
AVRSignal = 85Calling convention used for AVR signal routines
AnyReg = 13Calling convention for dynamic register based calls (e.g.stackmap and patchpoint intrinsics)
ArmAAPCS = 67ARM Architecture Procedure Calling Standard calling convention (aka EABI). Soft float variant
ArmAAPCSVfp = 68Same as ArmAAPCS but uses hard floating point ABI
ArmAPCS = 66ARM APCS (officially obsolete but some old targets use it)
C = 0The default llvm calling convention, compatible with C
This convention is the only calling convention that supports varargs calls. As with typical C calling conventions, the callee/caller have to tolerate certain amounts of prototype mismatch
ColdCall = 9Cold calling
CxxFastTls = 17Calling convention for access functions.
FastCall = 8Fast calling convention
FirstTargetSpecific = 64Marker enum that identifies the start of the target specific conventions all values greater than or equal to this value are target specific
GlasgowHaskellCompiler = 10Glasgow Haskell Compiler
HHVM = 81Calling convention used by HipHop Virtual Machine (HHVM)
HHVMCCall = 82HHVM calling convention for invoking C/C++ helpers
HiPE = 11The High=Performance Erlang convention
IntelOpenCLBuiltIn = 77Calling conventions for Intel OpenCL built-ins
MSP430BuiltIn = 94Calling convention used for special MSP430 rtlib functions which have an "optimized" convention using additional registers.
MSP430Interrupt = 69Calling convention used for MSP430 interrupt routines
MaxCallingConvention = 1023The highest possible calling convention ID. Must be some 2^k - 1.
PreserveAll = 15Preserve all calling convention for runtime calls that preserves (almost) all registers.
PreserveMost = 14Preserve most calling convention for runtime calls that preserves most registers.
PtxDevice = 72Call to a PTX device function
Passes all arguments in register or parameter space.
PtxKernel = 71Call to a PTX kernel
Passes all arguments in parameter space
SpirFunction = 75Calling convention for SPIR non-kernel device functions.
SpirKernel = 76Calling convention for SPIR kernel functions.
Swift = 16Swift calling convention
WebKitJS = 12Webkit JavaScript calling convention
X86FastCall = 65X86 fast call convention
'fast' analog of X86StdCall. Passes first two arguments in ECX:EDX registers, others - via stack. Callee is responsible for stack cleaning.
X86Interrupt = 83x86 hardware interrupt context
Callee may take one or two parameters, where the 1st represents a pointer to hardware context frame and the 2nd represents hardware error code, the presence of the later depends on the interrupt vector taken. Valid for both 32- and 64-bit sub-targets.
X86RegCall = 92Register calling convention used for parameters transfer optimization
X86StdCall = 64X86 stdcall convention
This calling convention is mostly used by the Win32 API. It is basically the same as the C convention with the difference in that the callee is responsible for popping the arguments from the stack.
X86ThisCall = 70Similar to X86StdCall, passes first 'this' argument in ECX all others via stack
Callee is responsible for stack cleaning. MSVC uses this by default for C++ instance methods in its ABI
X86VectorCall = 80MSVC calling convention that passes vectors and vector aggregates in SSE registers
X86x64SysV = 78The C convention as specified in the x86-64 supplement to the System V ABI, used on most non-Windows systems.
X86x64Win64 = 79The C convention as implemented on Windows/x86-64 and AArch64.
This convention differs from the more common X86x64SysV convention in a number of ways, most notably in that XMM registers used to pass arguments are shadowed by GPRs, and vice versa.
On AArch64, this is identical to the normal C (AAPCS) calling convention for normal functions, but floats are passed in integer registers to variadic functions