[LLVMdev] main, prologue & call

Chris Lattner sabre at nondot.org
Thu Dec 25 03:35:00 PST 2003


> libc or crt0.o
> in linux which one used by llvm system?

The JIT uses neither.  LLC (the static compiler) uses whatever the native
C compiler uses.

> >>prologue code
> >>call

> in llvm call is an instruction. I want to know when execute callee
> function, how the caller saves registers or stack? such as x86 call
> instruction.

LLVM matches the native calling conventions, so on X86 this means that it
pushes the arguments onto the program stack in reverse order, then
executes a call.  You can find out more about X86 specific details from
many other places.

-Chris

-- 
http://llvm.cs.uiuc.edu/
http://www.nondot.org/~sabre/Projects/




More information about the llvm-dev mailing list