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: Jakub Jelinek <jakub at redhat dot com>
- To: Jan Hubicka <jh at suse dot cz>
- Cc: "H.J. Lu" <hjl dot tools at gmail dot com>, Jan Hubicka <hubicka at ucw 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 17:11:22 +0200
- Subject: Re: RFC: Extend x86-64 psABI for 256bit AVX register
- References: <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> <6dc9ffc80806100647p2c199dbcj5a3650ad97837c63@mail.gmail.com> <20080610145014.GH17032@kam.mff.cuni.cz>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Tue, Jun 10, 2008 at 04:50:14PM +0200, Jan Hubicka wrote:
> 1) make __m256 passed on stack on variadic functions and in registers
> otherwse. Then we don't need to worry about varargs changes at all.
> This will break unprototyped calls.
> 2) extend rax to pass info about if __m256 registers are present and
> upper half needs to be saved.
> This will break passing __m256 arguments to functions with prologues
> compiled with legacy compiler that will do wild jump. All other cases
> should work
> 3) Save upper halves whenever we want to save SSE registers. This will
> break calling variadic functions compiled with __m256 support in.
>
> I guess either 1) or 2) is fine for me, as I told earlier, I am not big
> fan of 3). I guess 1) is easier and probably make more sense?
I vote for 1), though I think it should be passed on stack only for ...
args. E.g. for
void foo (__m256 x, ...);
void bar (__m256 x, __m256 y, __m256 z)
{
foo (x, y, z);
}
the first argument would be passed in %ymm0, while the unnamed arguments
y and z would be pushed to stack.
Jakub