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: "H.J. Lu" <hjl dot tools at gmail dot com>
- To: "Jan Hubicka" <hubicka at ucw dot cz>
- Cc: "Jakub Jelinek" <jakub at redhat 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 06:47:26 -0700
- 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> <20080610113220.GD13869@atrey.karlin.mff.cuni.cz>
On Tue, Jun 10, 2008 at 4:32 AM, Jan Hubicka <hubicka@ucw.cz> wrote:
>>
>> 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.
>
Do unprototyped functions calls work with __m128 and vararg on ia32?
I don't think it works since the first 3 __m128 were passed in registers,
but everything is passed on stack for vararg. If we require prototypes
for ia32, we should do the same for x86-64.
--
H.J.