This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: ARM patches applied
- To: law at cygnus dot com
- Subject: Re: ARM patches applied
- From: Richard Earnshaw <rearnsha at arm dot com>
- Date: Wed, 24 Feb 1999 20:23:45 +0000
- Cc: Nick Clifton <nickc at cygnus dot com>, egcs-patches at cygnus dot com, Philip Blundell <pb at nexus dot co dot uk>
- Cc: richard dot earnshaw at arm dot com
- Organization: ARM Ltd.
- Reply-To: richard dot earnshaw at arm dot com
> > See below (arm_return_in_memory). As a note here, I don't like the way
> > the netbsd port is doing that (it uses non-pcc struct returning to compile
> > just one file in the standard library which contains the soft-float code,
> > it then needs structures of 2 words to be returned in registers -- very
> > dodgy, it would be better to fix the source file in libc so the undef
> > wasn't needed).
> Haven't the netbsd folks gone back and forth a couple times on this issue; I
> seem to recall it being discussed before.
>
> The problem (as I see it) is if they change then they break backwards
> compatibility.
>
Yes, but in the end the issue really turned out to be that they use PCC
struct returning: for them all structs and unions return in memory.
However, they have one file in libc which needs to return a structure in
registers (so that they can soft-float emulate returning a double in
r0,r1). They currently hack this by compiling that file with
-freg-strcut-return (or whatever). With the new definition of
RETURN_IN_MEMORY this all breaks because the APCS mandates that structures
larger than a word must always be returned in memory. The correct fix,
long-term is to make the soft-float emulation code return a long long;
whereupon the #undef of RETURN_IN_MEMORY can be deleted.
Richard.