From owner-freebsd-ppc@FreeBSD.ORG Thu Jun 16 13:42:49 2005 Return-Path: X-Original-To: freebsd-ppc@FreeBSD.org Delivered-To: freebsd-ppc@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 191EC16A41C for ; Thu, 16 Jun 2005 13:42:49 +0000 (GMT) (envelope-from jhb@FreeBSD.org) Received: from mail27.sea5.speakeasy.net (mail27.sea5.speakeasy.net [69.17.117.29]) by mx1.FreeBSD.org (Postfix) with ESMTP id CA87043D53 for ; Thu, 16 Jun 2005 13:42:48 +0000 (GMT) (envelope-from jhb@FreeBSD.org) Received: (qmail 27427 invoked from network); 16 Jun 2005 13:42:48 -0000 Received: from server.baldwin.cx ([216.27.160.63]) (envelope-sender ) by mail27.sea5.speakeasy.net (qmail-ldap-1.03) with AES256-SHA encrypted SMTP for ; 16 Jun 2005 13:42:48 -0000 Received: from zion.baldwin.cx (zion.baldwin.cx [192.168.0.7]) (authenticated bits=0) by server.baldwin.cx (8.13.1/8.13.1) with ESMTP id j5GDgctg035295; Thu, 16 Jun 2005 09:42:42 -0400 (EDT) (envelope-from jhb@FreeBSD.org) From: John Baldwin To: freebsd-ppc@FreeBSD.org Date: Thu, 16 Jun 2005 09:14:18 -0400 User-Agent: KMail/1.8 References: <42AF3DF7.1080701@pop.agri.ch> <20050615172106.GA1675@dragon.NUXI.org> In-Reply-To: <20050615172106.GA1675@dragon.NUXI.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Message-Id: <200506160914.19625.jhb@FreeBSD.org> X-Spam-Status: No, score=-2.8 required=4.2 tests=ALL_TRUSTED autolearn=failed version=3.0.2 X-Spam-Checker-Version: SpamAssassin 3.0.2 (2004-11-16) on server.baldwin.cx Cc: David O'Brien Subject: Re: ABI convention for structs <=8 bytes? X-BeenThere: freebsd-ppc@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the PowerPC List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Jun 2005 13:42:49 -0000 On Wednesday 15 June 2005 01:21 pm, David O'Brien wrote: > On Tue, Jun 14, 2005 at 10:28:39PM +0200, Andreas Tobler wrote: > > My situation is the following, there are two implementation of the SYSv4 > > abi for PPC around in gcc. The first one, a draft, passes structs > > smaller or equal to 8 bytes in memory. The second one, the final one, > > passes them in registers. > > So far the fbsd ppc uses the final one. Fine. Except that it is a > > nightmare to build the resulting struct out of registers with alignment > > rules... > > > > OpenBSD, NetBSD and Linux PPC which rely on SYSV4 pass them in memory. > > AIX and Darwin do pass them also in memory but they have a different AB= I. > > > > NetBSD passed it until 1.5 also in registers, according to the comments > > in gdb ppcnbsd-tdep.c. Now they use the 'broken' convention. I do not > > know more about why and how long this will be... > > > > My simple question is, will the fbsd-ppc ABI convention stay with the > > final SYSV4 ABI from Sun, or will there be a switch to the broken one? > > My plans are to stick to the official ELF (we do do the full SVR4 ABI). I > think sticking to Darwin and OpenSolaris/PPC (in-progress) has merit. I don't think you really read his e-mail. Linux, OpenBSD, NetBSD, Linux, A= IX=20 _and_ Darwin all use an ABI that passes these structs in memory rather than= =20 registers. The first three happen to use a specific draft ABI whereas Darw= in=20 and AIX use some other ABI that also passes them in memory. No one but=20 =46reeBSD uses the "final" ABI that tries to pass them in registers except= =20 perhaps for the OpenSolaris/PPC that you just mentioned. It would seem tha= t=20 even if Solaris goes the "final" route, we would still be in the vast=20 majority for ppc ABIs.=20 =2D-=20 John Baldwin =A0<>< =A0http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve" =A0=3D =A0http://www.FreeBSD.org