* Marc Tardif <[EMAIL PROTECTED]> [001213 13:30] wrote:
> Considering the following C code:
>
> #include <fcntl.h>
> int main() {
> open("file", O_RDONLY);
> return 0;
> }
>
> compiled with gcc -S -O2, the following
> assembly code is generated:
>
> main:
> pushl %ebp
> movl %esp,%ebp
> subl $8,%esp
> addl $-8,%esp
> pushl $0
> pushl $.LC0
> call open
> xorl %eax,%eax
> leave
>
> What is the purpose of the subl and addl
> instructions? On Linux, they are simply
> unexistent..
FreeBSD passes syscall args on the stack, Linux uses registers.
--
-Alfred Perlstein - [[EMAIL PROTECTED]|[EMAIL PROTECTED]]
"I have the heart of a child; I keep it in a jar on my desk."
To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message