This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: split_complex_* flaw


>>>>> Alan Modra writes:

> Consider _Complex float on powerpc64 linux.
> a) It is laid out in the parameter save area of memory as two adjacent
>    32 bit words, ie. in one doubleword.
>
> Two adjacent float args are laid out in the parameter save area in
> separate doublewords.

>>>>> Richard Henderson writes:
> I strongly
> suggest just fixing it so that the rule is simple: complex
> arguments are passed as two independent scalar arguments.

	Which symptom are we concerned about?  On AIX and PPC64 Linux, the
parameter save area is GPR register images.  GPRs are doublewords for
PPC64, so all parameter save area slots are doublewords.  Float and
_Complex float arguments only occupy half of the slot, but the slot still
is a doubleword.

	A pointer to a complex float is a pointer to a pair of packed,
adjacent floats occupying a doubleword, but the stack image is two
doublewords. 

	I thought the SPLIT_COMPLEX_ARGS stuff meant that the parameter
passing machinery of GCC only saw two floats, so it should just treat it
as two, scalar arguments.  If some part of GCC is storing a packed
_Complex float in the parameter save area, that would appear to be the
problem and wouldn't be honoring SPLIT_COMPLEX_ARGS.

David


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]