]> granicus.if.org Git - clang/commitdiff
Fix PR4923.
authorAnders Carlsson <andersca@mac.com>
Fri, 18 Sep 2009 17:03:55 +0000 (17:03 +0000)
committerAnders Carlsson <andersca@mac.com>
Fri, 18 Sep 2009 17:03:55 +0000 (17:03 +0000)
Fix error in _mm_set_pd/_mm_setr_pd and add _mm_set_epi64x/_mm_set1_epi64x. Patch by Laurent Morichetti!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82228 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Headers/emmintrin.h

index 9db6951292d723a3d4c0c4b6f99c6240ac688a74..b83ed5fe02743ee0aa79b261350839e662ce5296 100644 (file)
@@ -500,13 +500,13 @@ _mm_set1_pd(double w)
 static inline __m128d __attribute__((__always_inline__, __nodebug__))
 _mm_set_pd(double w, double x)
 {
-  return (__m128d){ w, x };
+  return (__m128d){ x, w };
 }
 
 static inline __m128d __attribute__((__always_inline__, __nodebug__))
 _mm_setr_pd(double w, double x)
 {
-  return (__m128d){ x, w };
+  return (__m128d){ w, x };
 }
 
 static inline __m128d __attribute__((__always_inline__, __nodebug__))
@@ -1023,6 +1023,12 @@ _mm_loadl_epi64(__m128i const *p)
   return (__m128i) { *(long long*)p, 0};
 }
 
+static inline __m128i __attribute__((__always_inline__, __nodebug__))
+_mm_set_epi64x(long long q1, long long q0)
+{
+  return (__m128i){ q0, q1 };
+}
+
 static inline __m128i __attribute__((__always_inline__, __nodebug__))
 _mm_set_epi64(__m64 q1, __m64 q0)
 {
@@ -1047,6 +1053,12 @@ _mm_set_epi8(char b15, char b14, char b13, char b12, char b11, char b10, char b9
   return (__m128i)(__v16qi){ b0, b1, b2, b3, b4, b5, b6, b7, b8, b9, b10, b11, b12, b13, b14, b15 };
 }
 
+static inline __m128i __attribute__((__always_inline__, __nodebug__))
+_mm_set1_epi64x(long long q)
+{
+  return (__m128i){ q, q };
+}
+
 static inline __m128i __attribute__((__always_inline__, __nodebug__))
 _mm_set1_epi64(__m64 q)
 {