From owner-freebsd-hackers Wed Dec 13 14:17:13 2000 From owner-freebsd-hackers@FreeBSD.ORG Wed Dec 13 14:17:12 2000 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from Gloria.CAM.ORG (Gloria.CAM.ORG [205.151.116.34]) by hub.freebsd.org (Postfix) with ESMTP id 7E4F837B402 for ; Wed, 13 Dec 2000 14:17:11 -0800 (PST) Received: from localhost (intmktg@localhost) by Gloria.CAM.ORG (8.9.3/8.9.3) with ESMTP id RAA12679; Wed, 13 Dec 2000 17:12:40 -0500 Date: Wed, 13 Dec 2000 17:12:40 -0500 (EST) From: Marc Tardif To: Alfred Perlstein Cc: freebsd-hackers@FreeBSD.ORG Subject: Re: syscall assembly In-Reply-To: <20001213141023.O16205@fw.wintelcom.net> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Wed, 13 Dec 2000, Alfred Perlstein wrote: > * Marc Tardif [001213 13:30] wrote: [ snip ] > > subl $8,%esp > > addl $-8,%esp > > pushl $0 > > pushl $.LC0 > > call open > > FreeBSD passes syscall args on the stack, Linux uses registers. > So why is %esp displaced by 16 bytes when only 8 bytes are necessary (4 for $0 and 4 for $.LC0)? And couldn't the compiler use a single instruction such as subl $16,%esp or addl $-16,%esp? Are two instructions used for pipelining purposes, where subl is synchro- nised with the first pushl and addl with the second pushl? To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message