Subject: Re: egcs / koffice
To: Todd Whitesel <toddpw@best.com>
From: Richard Earnshaw <rearnsha@arm.com>
List: port-arm32
Date: 10/25/1998 16:08:43
> > The change was made to make GCC compatible with the ARM toolkit and the 
> > APCS.
> 
> Urg, does the APCS really specify that? Oh well.

The rules are complex (and don't entirely make sense), but the gist of it 
is that any struct or union larger than 32 bits (and a few others as well) 
are returned in memory.

> 
> <BARF>
> So it means that moving to EGCS on ARM entails a severe transition, because
> installing a new shared libc runs the risk of breaking every call to ldiv and
> so on.
> </BARF>

Yes it looks like it, unless we set these up to make them behave the same 
way as we are thinking of making the softfloat code work; however I don't 
think putting these attributes on things that are visible to  "userland" 
would be a good move.  We can get away with it with the softfloat code, 
since that just provides compiler support functions.

Richard.

BTW, the code that was in gcc before was just plain broken -- for example, 
structures of size 4, 8 or 16 bytes would get returned in registers; but 
12 bytes structures would get returned in memory.