This is the mail archive of the gcc-patches@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: altivec predicates


>>>>> "David" == David Edelsohn <dje@watson.ibm.com> writes:

 > 	I guess I'm just being dense.  I don't understand why you need to
 > explicitly create separate builtin builtin variants for each mode.

No, I think you have a point.

How about this interface:

__builtin_altivec_predicate_vcmpeqfp (__CR6_blah, a1, a2);
__builtin_altivec_predicate_vcmpequwp (__CR6_blah, a1, a2);
__builtin_altivec_predicate_vcmpequhp (__CR6_blah, a1, a2);
__builtin_altivec_predicate_vcmpequbp (__CR6_blah, a1, a2);
__builtin_altivec_predicate_vcmpeqswp (__CR6_blah, a1, a2);
__builtin_altivec_predicate_vcmpeqshp (__CR6_blah, a1, a2);
__builtin_altivec_predicate_vcmpeqsbp (__CR6_blah, a1, a2);

where __CR6_blah is one of:

	#define __CR6_LT	0
	#define __CR6_EQ	1
	#define __CR6_LT_REV	2
	#define __CR6_EQ_REV	3

and two more sets for GT and GE for a total of 21 new builtins.

Btw, did we settle on "_predicate_", "_compare_", or another name?

Aldy


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