va_list q

Valentin Nechayev netch at lucky.net
Thu Apr 22 01:25:07 PDT 2004


 Wed, Apr 21, 2004 at 22:58:01, peter wrote about "Re: va_list q": 

> amd64 needs to use the same code that is in the #ifdef __powerpc__.  Its 
> what we use in src/usr.sbin/pppd FWIW.

Thanks, I couldn't find vfmtmsg() and thought it was introduced after.

> On powerpc and amd64, the argument passing ABI is so complicated that 
> the sequence counters can't be fit in the spare bits in a pointer like 
> on the other platforms.  So on those two (and some other) platforms, 
> gcc implements va_list as a pointer to an external structure.

> As an aside, this breaks code that assums it can copy va_lists by 
> assignment.  On powerpc and amd64, you *must* use va_copy(), or you 
> simply copy the pointer, not the actual argument passing state.

I'll copy hack from system sources. But is it better to use va_copy()?


-netch-


More information about the freebsd-amd64 mailing list