[cfe-commits] r98299 - /cfe/trunk/lib/Headers/smmintrin.h

Eric Christopher echristo at apple.com
Thu Mar 11 15:36:29 PST 2010


Author: echristo
Date: Thu Mar 11 17:36:29 2010
New Revision: 98299

URL: http://llvm.org/viewvc/llvm-project?rev=98299&view=rev
Log:
Add packed integer array insertion.

Modified:
    cfe/trunk/lib/Headers/smmintrin.h

Modified: cfe/trunk/lib/Headers/smmintrin.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Headers/smmintrin.h?rev=98299&r1=98298&r2=98299&view=diff
==============================================================================
--- cfe/trunk/lib/Headers/smmintrin.h (original)
+++ cfe/trunk/lib/Headers/smmintrin.h Thu Mar 11 17:36:29 2010
@@ -199,6 +199,19 @@
 /* Extract a float from X at index N into the first index of the return.  */
 #define _MM_PICK_OUT_PS(X, N) _mm_insert_ps (_mm_setzero_ps(), (X),   \
                                              _MM_MK_INSERTPS_NDX((N), 0, 0x0e))
+                                             
+/* Insert int into packed integer array at index.  */
+#define _mm_insert_epi8(X, I, N) (__extension__ ({ __v16qi __a = (__v16qi)X; \
+                                                   __a[N] = I;               \
+                                                   __a;}))
+#define _mm_insert_epi32(X, I, N) (__extension__ ({ __v4si __a = (__v4si)X; \
+                                                    __a[N] = I;             \
+                                                    __a;}))
+#ifdef __x86_64__
+#define _mm_insert_epi64(X, I, N) (__extension__ ({ __v2di __a = (__v2di)X; \
+                                                    __a[N] = I;             \
+                                                    __a;}))
+#endif /* __x86_64__ */
 
 #endif /* __SSE4_1__ */
 





More information about the cfe-commits mailing list