split_complex_* flaw
David Edelsohn
dje@watson.ibm.com
Sun Feb 1 21:47:00 GMT 2004
>>>>> Ian Lance Taylor writes:
Ian> As you know, I originally wrote the PPC64 Linux ABI to be calling
Ian> convention compatible with the 64-bit AIX ABI. I think that any
Ian> differences between the calling convention on AIX and Linux are the
Ian> result of independent evolution, or are mistakes.
Ian> The AIX documentation I was working from said this:
Ian> - Other scalar values, such as FORTRAN complex numbers, are mapped
Ian> to the number of doublewords required by their size.
Ian> I copied that directly into the PPC64 Linux ABI. That says pretty
Ian> clearly to me that complex float is represented as a single
Ian> doubleword, since that is all that the size requires.
Ian> So, did AIX change, or was the ABI documentation incorrect?
The AIX ABI documentation was written for 32-bit AIX. This
confusion was an oversight.
I have always interpreted that statement to mean what I know is
correct, reading "their size" to mean the size of a pair of GPRs, not the
type size. Complex float is a pair of floats, passed in a pair of FPRs
(always doublewords), mapping to two GPRs (in 64-bit mode), so the size is
two doublewords. I now realize the statement is ambiguous.
Packing the PSA in 64-bit mode is not efficient and not what IBM
XLC does.
David
More information about the Gcc
mailing list