This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: altivec triplets: comments?

On Wed, Nov 07, 2001 at 02:24:46PM -0800, Geoff Keating wrote:
> The reason for the new altivec triplets needs some more explanation
> than Aldy's brief note.
> The powerpc-eabialtivec triplet parallels some of the other
> powerpc-eabi* triplets, like powerpc-eabiaix (not to be confused with
> powerpc-aix) or powerpc-eabisim, it just changes the compiler's
> defaults.  It should need no special changes outside gcc, everything
> else already uses -eabi*.

OK, that makes sense.

> The powerpc-linux-gnualtivec triplet is because there will be two
> completely different userspace powerpc linuxes; one will support
> altivec, and one won't, and they'll be binary incompatible to some
> degree, because the two ABIs are incompatible.  It's likely it will be
> convenient to, for instance, build cross-compilers from one to the
> other.  I don't think that in general people will want to use the
> -altivec version, because it has disadvantages and it will be possible
> to have Altivec code even in the regular ABI; the new triplet would be
> used only for embedded applications that are targetting a specific
> processor.

I can see how a separate triplet would be useful here too, but I was
leery of doing it through config.sub.  It seems that -linux-gnu* will
be correctly handled, although I expect we'll have to fix another few
dozen programs.

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?

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.

> Daniel commented that
> > For instance, there aren't triplets for every new MIPS
> > processor supported by GCC
> but actually, when we build a special version of Linux for some weird
> MIPS ABI, a different triplet _is_ used.  For instance,
> mips-linux-gnu
> mipsisa32-linux-gnu
> and in fact there are a bunch of triplets for particular MIPS
> processors, although most of these don't change the ABI they just
> change the ISA.

Right, I stand corrected.

Daniel Jacobowitz                           Carnegie Mellon University
MontaVista Software                         Debian GNU/Linux Developer

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]