This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [x86-64 psABI]: Extend x86-64 psABI to support AVX-512
- From: OndÅej BÃlka <neleai at seznam dot cz>
- To: Jakub Jelinek <jakub at redhat dot com>
- Cc: Richard Biener <richard dot guenther at gmail dot com>, "H.J. Lu" <hjl dot tools at gmail dot com>, GNU C Library <libc-alpha at sourceware dot org>, GCC Development <gcc at gcc dot gnu dot org>, Binutils <binutils at sourceware dot org>, "Girkar, Milind" <milind dot girkar at intel dot com>, "Kreitzer, David L" <david dot l dot kreitzer at intel dot com>
- Date: Thu, 25 Jul 2013 08:55:38 +0200
- Subject: Re: [x86-64 psABI]: Extend x86-64 psABI to support AVX-512
- References: <CAMe9rOrvMxSLj3LcYBs71tVdw6C0vJFKD2HxvnoHc13UamftwA at mail dot gmail dot com> <ddab98c2-bb3b-4d02-b403-e7d5690cfe00 at email dot android dot com> <CAMe9rOpxErCVtE-PDZ3Yb9mL+4E+XQ-are9Df4YBbEioj+MmZA at mail dot gmail dot com> <b9c5d467-834a-4b57-b48c-ac4bb450c9e5 at email dot android dot com> <20130725030655 dot GL14138 at laptop dot redhat dot com>
On Thu, Jul 25, 2013 at 05:06:55AM +0200, Jakub Jelinek wrote:
> On Wed, Jul 24, 2013 at 07:36:31PM +0200, Richard Biener wrote:
> > >Make them callee saved means we need to change ld.so to
> > >preserve them and we need to change unwind library to
> > >support them. It is certainly doable.
> >
> > IMHO it was a mistake to not have any callee saved xmm register in the
> > original abi - we should fix this at this opportunity. Loops with
> > function calls are not that uncommon.
>
> I've raised that earlier already. One issue with that beyond having to
> teach unwinders about this (dynamic linker if you mean only for the lazy PLT
> resolving is only a matter of whether the dynamic linker itself has been
> built with a compiler that would clobber those registers anywhere) is that
> as history shows, the vector registers keep growing over time.
> So if we reserve now either 8 or all 16 zmm16 to zmm31 registers as call
> saved, do we save them as 512 bit registers, or say 1024 bit already?
We shouldn't save them all as we would often need to unnecessarily save
register in leaf function. I am fine with 8. In practice 4 should be
enough for most use cases.
> If just 512 bit, then when next time the vector registers grow in size (will
> they?), would we have just low parts of the 1024 bits registers call saved
> and upper half call clobbered (I guess that is the case for M$Win 64-bit ABI
> now, just with 128 bit vs. more).
>
I do not think that 1024 bit registers will come in next ten years.
If they came tohn call clobbered is better. Full 1024 bits would be used
rarely; given that in most cases we will use them just to store 64bit
for doubles.
> But yeah, it would be nice to have some call saved ones.
>
> Jakub