[rfa:ppc] Fix PPC/NBSD struct return; Was: userdef.exp regression for ppc?

Jason R Thorpe thorpej@wasabisystems.com
Sun Jun 2 12:39:00 GMT 2002


[ 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>



More information about the Gcc mailing list