Date: Thu, 16 Jun 2005 13:14:02 -0400 From: John Baldwin <jhb@FreeBSD.org> To: freebsd-ppc@freebsd.org Subject: Re: ABI convention for structs <=8 bytes? Message-ID: <200506161314.03497.jhb@FreeBSD.org> In-Reply-To: <200506160914.19625.jhb@FreeBSD.org> References: <42AF3DF7.1080701@pop.agri.ch> <20050615172106.GA1675@dragon.NUXI.org> <200506160914.19625.jhb@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thursday 16 June 2005 09:14 am, John Baldwin wrote: > 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 > > > 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. > > I don't think you really read his e-mail. Linux, OpenBSD, NetBSD, Linux, > AIX _and_ Darwin all use an ABI that passes these structs in memory rather > than registers. The first three happen to use a specific draft ABI whereas > Darwin and AIX use some other ABI that also passes them in memory. No one > but FreeBSD uses the "final" ABI that tries to pass them in registers > except perhaps for the OpenSolaris/PPC that you just mentioned. It would > seem that even if Solaris goes the "final" route, we would still be in the > vast majority for ppc ABIs. s/majority/minority/ -- John Baldwin <jhb@FreeBSD.org> <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve" = http://www.FreeBSD.org
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200506161314.03497.jhb>