Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 13 Dec 2000 15:21:39 -0700
From:      Drew Eckhardt <drew@PoohSticks.ORG>
To:        Alfred Perlstein <bright@wintelcom.net>
Cc:        Marc Tardif <intmktg@CAM.ORG>, freebsd-hackers@FreeBSD.ORG
Subject:   Re: syscall assembly 
Message-ID:  <200012132221.eBDMLdh28943@chopper.Poohsticks.ORG>
In-Reply-To: Your message of "Wed, 13 Dec 2000 14:10:23 PST." <20001213141023.O16205@fw.wintelcom.net> 

next in thread | previous in thread | raw e-mail | index | archive | help
In message <20001213141023.O16205@fw.wintelcom.net>, bright@wintelcom.net write
s:
>>         subl $8,%esp
>>         addl $-8,%esp

>> 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.

The 'C' compiler doesn't know open is a syscall, and treats it like
any other code.

The pushls put the arguments on the stack.

The subl/addl are there because your version of GCC is broken.


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?200012132221.eBDMLdh28943>