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..
Notes:
FreeBSD fbsd.b0x.com 4.2-RELEASE
gcc version 2.95.2 19991024 (release)
To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message