From owner-freebsd-current Wed Dec 1 4:14:11 1999 Delivered-To: freebsd-current@freebsd.org Received: from post.mail.nl.demon.net (post-10.mail.nl.demon.net [194.159.73.20]) by hub.freebsd.org (Postfix) with ESMTP id 7D41614D1F for ; Wed, 1 Dec 1999 04:14:02 -0800 (PST) (envelope-from marcel@scc.nl) Received: from [212.238.132.94] (helo=scones.sup.scc.nl) by post.mail.nl.demon.net with esmtp (Exim 2.02 #1) id 11t8dp-0000KO-00; Wed, 1 Dec 1999 12:13:51 +0000 Received: from scc.nl (scones.sup.scc.nl [192.168.2.4]) by scones.sup.scc.nl (8.9.3/8.9.3) with ESMTP id NAA93120; Wed, 1 Dec 1999 13:13:26 +0100 (CET) (envelope-from marcel@scc.nl) Message-ID: <384510E6.6FB29574@scc.nl> Date: Wed, 01 Dec 1999 13:13:26 +0100 From: Marcel Moolenaar Organization: SCC vof X-Mailer: Mozilla 4.7 [en] (X11; I; Linux 2.2.5 i386) X-Accept-Language: en MIME-Version: 1.0 To: Ville-Pertti Keinonen Cc: dillon@apollo.backplane.com, bde@zeta.org.au, current@FreeBSD.ORG Subject: Re: kernel: -mpreferred-stack-boundary=2 ?? References: <19991201114859.29382.qmail@ns.demophon.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Ville-Pertti Keinonen wrote: > Perhaps crt1.c should call main like this (I can't immediately figure > out whether the stack pointer should be correctly aligned before the > return address is pushed or after the previous stack frame is pushed, > this is assuming the former, s/subl/addl/ would change it). The stack must be aligned before the return address is pushed: The following C fragment f(1); f(2); Translates to addl $-12,%esp pushl $1 call f addl $16,%esp addl $-12,%esp pushl $2 call f addl $16,%esp This assumes the stack is already aligned, of course. -- Marcel Moolenaar mailto:marcel@scc.nl SCC Internetworking & Databases http://www.scc.nl/ The FreeBSD project mailto:marcel@FreeBSD.org To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message