This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: split_complex_* flaw
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~