On Mon, Jun 09, 2008 at 04:40:54PM +0200, Jan Hubicka wrote: > Still it seems to me that we can use extend current eax convention. > Currently the value must be in range 0...8 as it specify number of SSE > registers. We can pack both numbers into it. This way we get > unforutnately wild jump on case of AVX code calling non-AVX function and > passing in AVX arguments, but this seems less important than 1) and 2) > to me and I don't see how to get all three cases working. > > Duplicating the value seems OK with me if it simplifies implementation > significandly.
I don't understand why you want to pass __m256 and 256-bit vector values to anonymous arguments in registers. The only thing the vararg functions would do with it would be save it somewhere on the stack. Given the x86_64 ABI, you can't expect calling an implicitly prototyped or non-vararg prototyped function which is actually defined as vararg function (as %rax wouldn't be properly initialized), which means you need a prototype for all vararg functions and at that point the caller can just do the job for the callee and push stuff on the stack. Then vararg prologue doesn't need to save %ymm* registers at all and va_arg will handle __m256 just fine. Jakub