This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: __builtin_va_arg rfc
On Sat, Apr 24, 1999 at 07:23:58PM -0600, Jeffrey A Law wrote:
> An FYI, I don't think we should try to deal with this for egcs-1.2, even
> though the primary motivation is to fix a ppc varargs/stdarg problem.
Ok.
There is another way to solve the problem for PPC -- Alpha, which
also uses a struct with weird initializations, builds the whole thing
internally and passes it out like so
/* Call __builtin_next_arg even though we aren't using its value, so that
we can verify that firstarg is correct. */
#define va_start(pvar, firstarg) \
(__builtin_next_arg (firstarg), \
(pvar) = *(__gnuc_va_list *) __builtin_saveregs ())
All that's needed is for ppc to hide quite a lot of magic in
expand_builtin_saveregs and suffer the cost of a structure copy.
r~