[LLVMdev] How are system calls made?

Charles Davis cdavis at mymail.mines.edu
Mon May 16 21:34:02 PDT 2011


On 5/16/11 10:30 PM, Hans Stimer wrote:
> How do you do this in LLVM?
> 
> open:
>     push    dword mode
>     push    dword flags
>     push    dword path
>     mov eax, 5
>     push    eax     ; Or any other dword
>     int 80h
>     add esp, byte 16
Same as in C: either with inline assembly, or by calling syscall(2).

Chip



More information about the llvm-dev mailing list