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?
On Sun, Jun 02, 2002 at 01:04:52PM -0700, Zack Weinberg wrote:
> #define RETURN_IN_MEMORY(TYPE) \
> (AGGREGATE_TYPE_P (TYPE) && \
> (TARGET_AIX_STRUCT_RET || \
> (unsigned HOST_WIDE_INT) int_size_in_bytes (TYPE) > 8))
>
> /* DRAFT_V4_STRUCT_RET defaults off. */
> #define DRAFT_V4_STRUCT_RET 0
>
> /* Let RETURN_IN_MEMORY control what happens. */
> #define DEFAULT_PCC_STRUCT_RETURN 0
Huh, yah, duh.
> But I see how you got confused. There is a nasty gotcha in this area
> of target configuration. If you have any kind of nontrivial
> RETURN_IN_MEMORY macro, you *have* to define DEFAULT_PCC_STRUCT_RETURN
> to 0, because the effect of flag_pcc_struct_return is to override
> RETURN_IN_MEMORY and force all aggregates to be returned in memory.
Ah, ok, I see.
--
-- Jason R. Thorpe <thorpej@wasabisystems.com>