[LLVMdev] Calling Conventions

Gordon Henriksen gordonhenriksen at mac.com
Mon Mar 31 22:23:55 PDT 2008

On Mar 31, 2008, at 22:14, Jon Sargeant wrote:

> I'm trying to understand the LLVM calling conventions.  Coming from  
> a Windows C++ background, I'm familiar with three calling  
> conventions: cdecl, stdcall, and fastcall.  It looks like cdecl  
> corresponds to ccc in LLVM,


> but I'm not sure about the other two.

In LangRef.html, the stdcall and fastcall conventions you know are  
lumped under "cc <n>" for target-specific conventions, although I  
think there is special support in the LLVM assembly language for these  

In CallingConv.h, they're available with the symbolic constants  
CallingConv::X86_StdCall (64) and CallingConv::X86_FastCall (65).

Note that fastcc / CallingConv::Fast is not fastcall. (It's actually  
an alias for ccc...)

— Gordon

More information about the llvm-dev mailing list