This is the mail archive of the gcc@gcc.gnu.org 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]
Other format: [Raw text]

Re: front end changes for altivec



On Tuesday, November 27, 2001, at 05:26 PM, Aldy Hernandez wrote:
>
> the thing is that there are builtins that expect V4SI, or V4SF, or
> V16QI, etc.  i guess i can have all vectors be V4SI (or vector_size(16))
> and cast them (which does nothing, but quiets the parser).
>
> actually, why can't we do this then:
>
> 	#define __vector  __attribute__ ((mode(V4SI)))
>
> i still would like to have different modes for different vector types
> (short, int, char).

I got this working both ways and eventually let all vectors be V16QI.
That removes some bloat in rs6000.md and there are somewhat fewer
changes in the target-independent parts of the code (e.g. for casts).
The other way is certainly more convenient for resolving those builtins,
though.  I come from a BE background, so to me a single mode for all
16-byte vector objects seems cleanest, but I'm sure people from
FE backgrounds would disagree.


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