This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: altivec predicates
- From: Aldy Hernandez <aldyh at redhat dot com>
- To: David Edelsohn <dje at watson dot ibm dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: 03 Feb 2002 14:35:30 +1100
- Subject: Re: altivec predicates
- References: <200202020234.VAA20940@makai.watson.ibm.com>
>>>>> "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