Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 22 Apr 2004 11:24:55 +0300
From:      Valentin Nechayev <netch@lucky.net>
To:        Peter Wemm <peter@wemm.org>
Cc:        amd64@freebsd.org
Subject:   Re: va_list q
Message-ID:  <20040422082455.GV34647@lucky.net>
In-Reply-To: <200404212258.01563.peter@wemm.org>
References:  <20040422050128.GQ34647@lucky.net> <200404212258.01563.peter@wemm.org>

next in thread | previous in thread | raw e-mail | index | archive | help
 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-



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040422082455.GV34647>