Date: Fri, 3 Jun 2005 09:11:34 +0200 From: <toa@pop.agri.ch> To: <obrien@freebsd.org>, <peterg@ptree32.com.au> Cc: freebsd-ppc@freebsd.org Subject: RE: calling/runtime convention for ppc fbsd Message-ID: <755798E8D0ED7C43B2169A3673E1EB5F59444A@EXVS01.mcis.agrinet.local>
next in thread | raw e-mail | index | archive | help
-----Original Message----- From: David O'Brien [mailto:obrien@freebsd.org] Sent: Fri 6/3/2005 9:02 AM To: peterg@ptree32.com.au Cc: toa@pop.agri.ch; freebsd-ppc@freebsd.org Subject: Re: calling/runtime convention for ppc fbsd =20 On Fri, Jun 03, 2005 at 08:12:33AM +1000, peterg@ptree32.com.au wrote: > >>>> which caling / runtime convention does fbsd ppc follow? The sysv4 = > >>>> from SUN dated around september 1995? Or is it another one? > >>> > >>> That's the one. > >>=20 > >> Ok. > > > >Exactly the one above? > > > >I mean, small structures are passed in registers and not per = reference ? >=20 > I have to say I'm not sure. The FreeBSD gcc config is basically = 'sysv4', > but maybe that's been changed to not do the structure passing as in > the ABI document. I believe I saw a mention of GCC had a PPC psABI bug (while trying to = get thru several 1000's of emails). ---- I think I have it: linux defines DRAFT_V4_STRUCT_RET 1, while fbsd doesn't. >From rs6000.c: The AIX ABI for the RS/6000 specifies that all structures are returned in memory. The Darwin ABI does the same. The SVR4 ABI specifies that structures <=3D 8 bytes are returned in r3/r4, but a draft put them in memory, and GCC used to implement the draft instead of the final standard. Therefore, aix_struct_return controls this instead of DEFAULT_ABI; V.4 targets needing backward compatibility can change DRAFT_V4_STRUCT_RET to override the default, and -m switches get the final word. See rs6000_override_options for more details. Andreas
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?755798E8D0ED7C43B2169A3673E1EB5F59444A>