From owner-freebsd-ppc@FreeBSD.ORG Wed Jun 15 20:57:56 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 5DA0716A41F for ; Wed, 15 Jun 2005 20:57:56 +0000 (GMT) (envelope-from toa@pop.agri.ch) Received: from smtp.messaging.ch (exsmtp01.agrinet.ch [81.221.250.200]) by mx1.FreeBSD.org (Postfix) with ESMTP id CB38B43D48 for ; Wed, 15 Jun 2005 20:57:55 +0000 (GMT) (envelope-from toa@pop.agri.ch) Received: from [192.168.225.5] ([80.218.0.93]) by smtp.messaging.ch with Microsoft SMTPSVC(6.0.3790.211); Wed, 15 Jun 2005 22:57:53 +0200 Message-ID: <42B0964E.4070703@pop.agri.ch> Date: Wed, 15 Jun 2005 22:57:50 +0200 From: Andreas Tobler User-Agent: Mozilla Thunderbird 1.0.2 (Macintosh/20050317) X-Accept-Language: en-us, en MIME-Version: 1.0 To: freebsd-ppc@freebsd.org References: <42AF3DF7.1080701@pop.agri.ch> <20050615172106.GA1675@dragon.NUXI.org> In-Reply-To: <20050615172106.GA1675@dragon.NUXI.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 15 Jun 2005 20:57:53.0806 (UTC) FILETIME=[E6301AE0:01C571EC] 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: Wed, 15 Jun 2005 20:57:56 -0000 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 ABI. >> >>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. > So, for the non native English speaker: FreeBSD/PowerPC will use the final SYSV ABI (SYSTEM V APPLICATION BINARY INTERFACE PowerPC Processor Supplement) Dated: Part No: 802-3334-10 Revision A, September 1995 ? I was not speaking about ELF, only the ABI. I do not care about which one, the broken one would have been a bit more easy. The final one needs some more coding. Side note, Darwin uses a different ABI and I just mentioned it as a sample passing structs in mem and not in $R. OpenSolaris/PPC is completely new to me and I wonder what it target is. And my question based on the uncertainty what other *BSD targets are doing. Thanks for clarification, Regards, Andreas