This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: RFC: Extend x86-64 psABI for 256bit AVX register
- From: Jan Hubicka <hubicka at ucw dot cz>
- To: Jakub Jelinek <jakub at redhat dot com>
- Cc: Jan Hubicka <hubicka at ucw dot cz>, "H.J. Lu" <hjl dot tools at gmail dot com>, Jan Hubicka <jh at suse dot cz>, discuss at x86-64 dot org, GCC <gcc at gcc dot gnu dot org>, "Girkar, Milind" <milind dot girkar at intel dot com>, "Dmitriev, Serguei N" <serguei dot n dot dmitriev at intel dot com>, "Kreitzer, David L" <david dot l dot kreitzer at intel dot com>
- Date: Tue, 10 Jun 2008 13:32:20 +0200
- Subject: Re: RFC: Extend x86-64 psABI for 256bit AVX register
- References: <6dc9ffc80806050731s77b49d63id048d142d76560c9@mail.gmail.com> <20080605151511.GB24241@atrey.karlin.mff.cuni.cz> <6dc9ffc80806050914t76383385o380c0bb8ebc4e972@mail.gmail.com> <20080606082834.GC31743@kam.mff.cuni.cz> <20080606135026.GA14877@lucon.org> <20080606142813.GA18621@lucon.org> <20080609144054.GA13869@atrey.karlin.mff.cuni.cz> <20080610113921.GX3726@sunsite.mff.cuni.cz>
>
> 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),
Unprototyped functions calls all get rax set. If calle is variadic,
things still work. Sure, for __m256 we can also declare prototypes for
variadic functions mandatory and simply pass things on stack.
Honza
> 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