Subject: Re: ARM: The switch to ELF. Are we ready yet?
To: Todd Vierling <tv@wasabisystems.com>
From: Ben Harris <bjh21@netbsd.org>
List: port-arm
Date: 03/18/2002 21:00:05
On Mon, 18 Mar 2002, Todd Vierling wrote:
> On Mon, 18 Mar 2002, Ben Harris wrote:
>
> : > 1) Structure returning. We currently don't conform to the ATPCS
> : > conventions for this (currently using old, horrible, APCS conventions).
> : > (rearnsha)
> :
> : I think this is an insignificant problem, in that (I hope) structure
> : returning is a very rare activity, so we can get away with claiming the
> : old behaviour to be a bug in GCC and fixing it when we can. It's not as
> : if GCC isn't short of other bugs.
Erm, s/isn't/is/, obviously.
> It's part of the established system ABI, however. See div(3), ldiv(3) --
> both return structs. There may be others.
A div_t is >4 bytes long, so it's returned indirectly in both APCS and
ATPCS. I think the change only affects non-integer-like <= 4-byte
structures.
> If it's not fixed now, you can't "fix" it later without creating yet another
> binary compatibility layer point (as we frown *very heavily* on flag days).
> Take it from experience; you want to get the ABI as correct as possible the
> first time around.
Yeah, and since the rules have got simpler (you just need to check the
size of the structure to know how to return it), the change shouldn't be
too hard to make.
--
Ben Harris <bjh21@netbsd.org>
Portmaster, NetBSD/arm26 <URL:http://www.netbsd.org/Ports/arm26/>