split_complex_* flaw

Richard Henderson rth@redhat.com
Sun Feb 1 19:46:00 GMT 2004


On Sun, Feb 01, 2004 at 05:59:58PM +1030, Alan Modra wrote:
> > 	Either the default implementation of GCC's std_builtin_va_arg
> > machinery needs to do something special for SPLIT_COMPLEX_ARGS or each
> > port needs to do something special.
> 
> I don't like the idea very much.  We have this nice simple va_list
> type, and now _Complex float is going to be an odd case.

Oh please.  You're optimizing for the wrong case -- va_arg of complex
float will happen approximately never.  It should work, but it needn't
work efficiently.  What *should* work efficiently are the complex libm
routines.  And those clearly benefit from having the complex be split.

There's example code in alpha.c for how to handle va_arg.  Basically, 
you recurse, collect two arguments, and put them together again in
local storage.


r~



More information about the Gcc mailing list