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]

split_complex_* flaw


There is a fundamental design flaw in the complex arg splitting code.

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.
b) It is passed to a function in two consecutive fp regs if fp regs
   haven't been exhausted by prior args, and it doesn't correspond to
   the variable part of a stdarg function.
c) It is passed to a function as laid out in the parameter save area if
   it's in the variable part of a stdarg function, or if fp regs have
   been exhausted.  The first 8 doublewords of the parameter save area
   are passed in gp regs, the rest is passed on the stack.
d) In the case of a function without a prototype, it's passed both as
   for (b) and (c).

Two adjacent float args are laid out in the parameter save area in
separate doublewords.

This difference is why gcc.dg/complex-1 is failing on powerpc64-linux.
I don't see any way to fix this problem without throwing out the whole
complex arg splitting code.

-- 
Alan Modra
IBM OzLabs - Linux Technology Centre


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