From owner-freebsd-hackers Wed Dec 13 14:21:49 2000 From owner-freebsd-hackers@FreeBSD.ORG Wed Dec 13 14:21:47 2000 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from chopper.Poohsticks.ORG (chopper.poohsticks.org [63.227.60.73]) by hub.freebsd.org (Postfix) with ESMTP id 6E37937B402 for ; Wed, 13 Dec 2000 14:21:46 -0800 (PST) Received: from chopper.Poohsticks.ORG (drew@localhost.poohsticks.org [127.0.0.1]) by chopper.Poohsticks.ORG (8.10.1/8.10.1) with ESMTP id eBDMLdh28943; Wed, 13 Dec 2000 15:21:39 -0700 Message-Id: <200012132221.eBDMLdh28943@chopper.Poohsticks.ORG> To: Alfred Perlstein Cc: Marc Tardif , freebsd-hackers@FreeBSD.ORG Subject: Re: syscall assembly In-reply-to: Your message of "Wed, 13 Dec 2000 14:10:23 PST." <20001213141023.O16205@fw.wintelcom.net> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <28939.976746099.1@chopper.Poohsticks.ORG> Date: Wed, 13 Dec 2000 15:21:39 -0700 From: Drew Eckhardt Sender: drew@chopper.Poohsticks.ORG Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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