This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: [rfa:ppc] Fix PPC/NBSD struct return; Was: userdef.exp regression for ppc?
- From: Jason R Thorpe <thorpej at wasabisystems dot com>
- To: Zack Weinberg <zack at codesourcery dot com>
- Cc: gcc at gcc dot gnu dot org
- Date: Sun, 2 Jun 2002 12:39:00 -0700
- Subject: Re: [rfa:ppc] Fix PPC/NBSD struct return; Was: userdef.exp regression for ppc?
- Organization: Wasabi Systems, Inc.
- References: <200206011546.g51FkMj30586@duracef.shout.net> <3CF902B0.50405@cygnus.com> <20020602115105.E27682@dr-evil.shagadelic.org> <20020602192404.GA19552@codesourcery.com>
[ We're firmly in GCC-land now, so I'm removing the GDB folks from
the CC list... ]
On Sun, Jun 02, 2002 at 12:24:04PM -0700, Zack Weinberg wrote:
> I'm a little confused here. Are you saying that the 2.9x native GCC
> for NetBSD followed the SVR4 spec, returning small structures in
> registers, but 3.1 and -current don't (because I incorrectly thought
> the earlier compilers used the AIX convention)? If so, the fix should
> be as simple as removing the
Yes, that's what I'm saying :-) I didn't realize it at first, either,
because the RETURN_IN_MEMORY() macro in the native 2.9x matches the AIX
convention.
The difference is that NetBSD's native 2.9x defaults to
-fno-pcc-struct-return (which has the side-effect of giving the
SVR4 semantics) whereas 3.1 and -current default to -fpcc-struct-return.
> /* For backward compatibility, we must continue to use the AIX
> structure return convention. */
> #undef DRAFT_V4_STRUCT_RET
> #define DRAFT_V4_STRUCT_RET 1
>
> from gcc/config/rs6000/netbsd.h...
Yah... I also think I should set DEFAULT_PCC_STRUCT_RETURN to 0 in
rs6000/netbsd.h. Though, I admit that I'm a little unclear as to
whether or not -fno-pcc-struct-return is going to make any difference
if DRAFT_V4_STRUCT_RET is removed.
--
-- Jason R. Thorpe <thorpej@wasabisystems.com>