[LLVMbugs] [Bug 6138] New: x86 *mmintrin.h header problems

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Mon Jan 25 08:53:46 PST 2010


http://llvm.org/bugs/show_bug.cgi?id=6138

           Summary: x86 *mmintrin.h header problems
           Product: new-bugs
           Version: trunk
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: new bugs
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: brian.sumner at amd.com
                CC: llvmbugs at cs.uiuc.edu


There are a few problems in the x86 intrinsic headers emmintrin.h and
xmmintrin.h

This short patch will clean them up:
----------------- headers.patch -----------------------------
diff -u include/emmintrin.h include-fixed/emmintrin.h
--- include/emmintrin.h 2010-01-25 08:50:56.000000000 -0800
+++ include-fixed/emmintrin.h   2010-01-25 08:49:25.000000000 -0800
@@ -35,7 +35,7 @@

 typedef int __v4si __attribute__((__vector_size__(16)));
 typedef short __v8hi __attribute__((__vector_size__(16)));
-typedef char __v16qi __attribute__((__vector_size__(16)));
+typedef signed char __v16qi __attribute__((__vector_size__(16)));

 static inline __m128d __attribute__((__always_inline__, __nodebug__))
 _mm_add_sd(__m128d a, __m128d b)
@@ -1024,12 +1024,6 @@
 }

 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)
 {
   return (__m128i){ (long long)q0, (long long)q1 };
@@ -1060,15 +1054,15 @@
 }

 static inline __m128i __attribute__((__always_inline__, __nodebug__))
-_mm_set1_epi64x(long long q)
+_mm_set1_epi64(__m64 q)
 {
-  return (__m128i){ q, q };
+  return (__m128i){ (long long)q, (long long)q };
 }

 static inline __m128i __attribute__((__always_inline__, __nodebug__))
-_mm_set1_epi64(__m64 q)
+_mm_set1_epi64x(long long q)
 {
-  return (__m128i){ (long long)q, (long long)q };
+  return (__m128i){ q, q };
 }

 static inline __m128i __attribute__((__always_inline__, __nodebug__))
Only in include: .svn
diff -u include/xmmintrin.h include-fixed/xmmintrin.h
--- include/xmmintrin.h 2010-01-25 08:50:56.000000000 -0800
+++ include-fixed/xmmintrin.h   2010-01-25 08:49:15.000000000 -0800
@@ -895,7 +895,7 @@
   (row0) = _mm_movelh_ps(tmp0, tmp2); \
   (row1) = _mm_movehl_ps(tmp2, tmp0); \
   (row2) = _mm_movelh_ps(tmp1, tmp3); \
-  (row3) = _mm_movelh_ps(tmp3, tmp1); \
+  (row3) = _mm_movehl_ps(tmp3, tmp1); \
 } while (0)

 /* Ugly hack for backwards-compatibility (compatible with gcc) */
----------------------- end of patch -----------------------------


-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



More information about the llvm-bugs mailing list