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



> I prefer
> 
> 	int foo __attribute__((vector(4)));
> 
> which, iirc, also works as a prefix,
> 
> 	__attribute__((vector(4))) int foo;
> 
> which, with appropriate cpp magic in <altivec.h> becomes
> 
> #define __vector  __attribute__((__vector__(4)))
> 
> 	__vector int foo;

not good, because we have "vector int" (V4SI), "vector short" (V8HI),
"vector char" (V16QI), etc.  we can't just define "__vector" to expand
to a given vector size because that depends on the type being vectored.

i still prefer :):

	__vector(4) int foo;

and then have a default for the given backend+target_switches:

	__vector int foo;

a clean implementation IMO.

-- 
Aldy Hernandez			E-mail: aldyh@redhat.com
Professional Gypsy
Red Hat, Inc.


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