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.
Best Regards,
Jon
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,
Correct.
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 two.
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
Hello, Gordon.
think there is special support in the LLVM assembly language for these
two.
Yes, afair - x86_stdcallcc and x86_fastcallcc
Note that fastcc / CallingConv::Fast is not fastcall. (It's actually
an alias for ccc...)
No, at least on x86.