This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [Patch] Altivec ABI as default for powerpc64 linux
- From: Aldy Hernandez <aldyh at redhat dot com>
- To: Segher Boessenkool <segher at kernel dot crashing dot org>
- Cc: Geoff Keating <geoffk at geoffk dot org>, "Hartmut Penner" <HPENNER at de dot ibm dot com>, Alan Modra <amodra at bigpond dot net dot au>, gcc-patches at gcc dot gnu dot org, dje at watson dot ibm dot com
- Date: 02 Feb 2004 15:40:33 -0400
- Subject: Re: [Patch] Altivec ABI as default for powerpc64 linux
- References: <OFD9F832EE.F6CB723A-ONC1256E2B.0035AC31-C1256E2B.003789DA@de.ibm.com><jm65ethums.fsf@desire.geoffk.org><02B21AE4-55A0-11D8-AB6A-000A95A4DC02@kernel.crashing.org>
>>>>> "Segher" == Segher Boessenkool <segher@kernel.crashing.org> writes:
>> It's not set as the default because the default linux64 processor is a
>> 630, which (as far as I know) doesn't have Altivec. Perhaps someone
>> should change that, if linux64 is going to require Altivec.
> We're not proposing to enable -maltivec by default, just -mabi=altivec,
> so we only have to support one ABI. If you don't pass -maltivec, no
> AltiVec insns will be used, and so no vector regs will be used; vectors
> of a size that would be a nice fit for an AltiVec reg will just have to
> be passed like any other strange-size vector.
> I don't know if this actually works right now, nor if people agree
> with me :-)
Having one ABI is fine in theory, but you need to make sure that
-mabi=altivec will play nicely with vector operations in the abscence
of AltiVec. In theory this works, but in practice it doesn't because
no one has tested it, or has had the interest to make it work.
I will gladly take patches to get this to work.
For starters, try this with powerpc-linux-gnu and -mabi=altivec (but
no -maltivec), and fix it :).
typedef int vec __attribute__((mode(V4SI)));
vec poo, bar;
extern void funk(vec);
f(){
funk(poo);
}
Aldy