This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [RFA] PPC ABI compliance fix
- From: Kevin Buettner <kevinb at redhat dot com>
- To: Elena Zannoni <ezannoni at redhat dot com>, gdb-patches at sources dot redhat dot com
- Date: Fri, 22 Mar 2002 13:46:51 -0700
- Subject: Re: [RFA] PPC ABI compliance fix
- References: <15515.34258.778318.466752@localhost.redhat.com>
On Mar 22, 2:28pm, Elena Zannoni wrote:
> Back in November, gcc changed the way structures <= 8 bytes are
> returned on the PPC. The change was made to be compliant with the
> SVR4 ABI.
>
> http://gcc.gnu.org/ml/gcc-patches/2001-11/msg01468.html
>
> The abi specifies that such structures are passed in r3 and r4.
> Bigger structures are passed in memory.
>
> Gcc was passing every structure in memory. The change was made for
> embedded targets, but not for natives (PowerPC Linux, NetBSD, and
> FreeBSD).
>
> Of course this change breaks binary compatibility with older gcc's.
> Not sure what to do about that, if anything, the case it covers is a
> corner case, anyway.
Hmm... I have a hunch that, eventually, the natives will need to
change too.
For now though, your change is okay.
(Alternately, we could take a really hard nosed stance and implement
the ABI exactly as written and just put up with the failures.)
Kevin