This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: altivec triplets: comments?
> Date: Wed, 7 Nov 2001 18:22:17 -0500
> From: Daniel Jacobowitz <drow@mvista.com>
> Cc: Aldy Hernandez <aldyh@redhat.com>, gcc@gcc.gnu.org
> How much is it really possible to use Altivec in the regular ABI? By
> compiler support, I mean, and not inline assembly. Without the
> alignment and call-saved/call-clobbered information, using the builtins
> for anything nontrivial would be more or less impossible... right?
The alignment is a problem, but on linux the stack is already aligned
correctly, it's just that GCC doesn't know about it.
The other problems only happen if you have a call-saved altivec
register, or use them for argument passing. There's nothing that
prevents you from making all the altivec registers call-clobbered, and
prohibiting passing arguments in altivec registers, and then
everything should Just Work, although perhaps a little less efficiently.
> There was talk of actually changing the ABI used in Linux for this; do
> you recall the setjmp/longjmp patches I sent to libc-alpha six months
> ago? (which died after that, AFAICT, although we still use them here.)
> Before they could be committed you said:
>
> > > > Aside from that, the Altivec Programmers Interface Manual says that
> > > > altivec registers 20-31 are to be saved by setjmp/longjmp on the SVR4 ABI.
> > >
> > > Then there _are_ ABI changes -- the ABI before Altivec is not
> > > completely compatible with the one after.
> >
> > Yes. I want to transition powerpc-linux from the current ABI to a
> > different one, with a number of improvements including Altivec
> > support and better SVR4 ABI compatibility.
>
> Have we just given up on that? And Ulrich suggested adding a thread
> register at the same time.
I still hope to do this, but not as part of this project. There are a
bunch of other changes I'd like to make at the same time, for instance
moving to 128-bit 'long double' and correcting some other minor
inconsistencies between the powerpc-linux ABI and the real powerpc
SVR4 ABI.
--
- Geoffrey Keating <geoffk@geoffk.org> <geoffk@redhat.com>