[LLVMdev] what is the use of call conv of function?

Duncan Sands baldrick at free.fr
Sat Jul 2 09:27:16 PDT 2011


Hi Jochen,

> When I set the calling convention of a function to stdcall this has no
> effect.
> When I set stdcall to all call instructions then it works.
> So I wonder what is the use of the calling convention of a function?

the call needs a calling convention to know which registers to put its
parameters.  The callee (the function) needs a calling convention to know
which registers to extract the passed parameters from.

Ciao, Duncan.



More information about the llvm-dev mailing list