Date: Wed, 13 Dec 2000 16:25:46 -0500 (EST) From: Marc Tardif <intmktg@CAM.ORG> To: freebsd-hackers@freebsd.org Subject: syscall assembly Message-ID: <Pine.LNX.4.10.10012131620390.12420-100000@Gloria.CAM.ORG>
next in thread | raw e-mail | index | archive | help
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 majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.LNX.4.10.10012131620390.12420-100000>