This is the mail archive of the
libffi-discuss@sourceware.org
mailing list for the libffi project.
Re: Structure-return bug on powerpc32 (patch)
- From: Anthony Green <green at redhat dot com>
- To: Andreas Tobler <andreast-list at fgznet dot ch>
- Cc: Wim Lewis <wiml at hhhh dot org>, libffi-discuss at sources dot redhat dot com
- Date: Mon, 01 Jun 2009 15:57:45 -0400
- Subject: Re: Structure-return bug on powerpc32 (patch)
- References: <20090530014135.GA4607@underhill.hhhh.org> <4A242FB6.1000902@fgznet.ch>
Andreas Tobler wrote:
Wim Lewis wrote:
Here's a patch which fixes the bug. It also fixes an unrelated
problem I noticed in that section of code, which was that the structure-
return code was clobbering cr3 and cr4, which are designated as
callee-saved
in the ppc abi documentation I have. (I've never seen a compiler
actually
use those fields, but still.) This involved moving some of the bitfields
in the flags word around.
With this patch, libffi-3.0.8 passes four of the five tests which were
failing on netbsd5/ppc32 (the fifth test failure is an unrelated
problem),
as well as the odd_struct.c tests I linked to in my last message.
Thank you Wim!
I'll get this patch into the gcc repo, I already have the approval.
The use of mtxer and stswx is a bit costy.
AG needs to sync the repo once I committed it to gcc.
I'll watch for the commit.
Thanks Andreas.
AG
Regards,
Andreas