On Wed, Jun 11, 2008 at 07:49:12AM -0700, H.J. Lu wrote: > > I guess we all agree on passing variadic arguments on stack (that is > > only those belonging on ...) and rest in registers. It seems easiest in > > regard to future register set extensions too. Only negative thing is > > that calls to variadic functions will become bit longer, but I guess it > > is not big deal. (the fact that register passing conventions are shorter > > and variadic functions tends to be called many times was also original > > motivation to support register passing on pretty much everything for > > varargs in psABI) > > > > There is no precedent for passing named parameters in registers but > unnamed parameters on the stack. On IA32 for the __m128 types, we > pass ALL __m128 parameters on the stack for varargs functions, not > just the unnamed ones. I think we should do the same for x86-64.
Why should the 32-bit ABI influence x86-64 ABI decisions? There are clear advantages of passing __m128 named arguments in registers (shorter/faster code both on the caller and callee side) and there are advantages of passing __m128 unnamed arguments on the stack (for va_arg to work, they need to be on the stack, and if they are passed in registers, the callee would need to push them to the stack). Jakub