This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
SSE "fix" 24 - integer comparsions
- From: Jan Hubicka <jh at suse dot cz>
- To: Richard Henderson <rth at redhat dot com>, Jan Hubicka <jh at suse dot cz>,gcc-patches at gcc dot gnu dot org
- Date: Tue, 22 Oct 2002 23:31:31 +0200
- Subject: SSE "fix" 24 - integer comparsions
Hi,
this patch adds few variants of integer comparsions. These are not
specified in Intel documentation, but both commercial compilers I can
tests accepts them so people are using it. I don't se reason why we
can't.
Tue Oct 22 23:28:12 CEST 2002 Jan Hubicka <jh@suse.cz>
* xmmintrin.h (_mm_cmplt_epi*): New.
Index: xmmintrin.h
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config/i386/xmmintrin.h,v
retrieving revision 1.15
diff -c -3 -p -r1.15 xmmintrin.h
*** xmmintrin.h 22 Oct 2002 17:08:42 -0000 1.15
--- xmmintrin.h 22 Oct 2002 21:27:42 -0000
*************** _mm_cmpeq_epi32 (__m128i __A, __m128i __
*** 2308,2313 ****
--- 2308,2331 ----
}
static __inline __m128i
+ _mm_cmplt_epi8 (__m128i __A, __m128i __B)
+ {
+ return (__m128i)__builtin_ia32_pcmpgtb128 ((__v16qi)__B, (__v16qi)__A);
+ }
+
+ static __inline __m128i
+ _mm_cmplt_epi16 (__m128i __A, __m128i __B)
+ {
+ return (__m128i)__builtin_ia32_pcmpgtw128 ((__v8hi)__B, (__v8hi)__A);
+ }
+
+ static __inline __m128i
+ _mm_cmplt_epi32 (__m128i __A, __m128i __B)
+ {
+ return (__m128i)__builtin_ia32_pcmpgtd128 ((__v4si)__B, (__v4si)__A);
+ }
+
+ static __inline __m128i
_mm_cmpgt_epi8 (__m128i __A, __m128i __B)
{
return (__m128i)__builtin_ia32_pcmpgtb128 ((__v16qi)__A, (__v16qi)__B);