[Pixman] [PATCH v3 1/3] autoconf: test MMX extension instructions

Matt Turner mattst88 at gmail.com
Mon Feb 20 15:34:58 PST 2012


Signed-off-by: Matt Turner <mattst88 at gmail.com>
---
 configure.ac |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/configure.ac b/configure.ac
index 4f8a0c5..ae092e5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -297,6 +297,9 @@ error "Need GCC >= 3.4 for MMX intrinsics"
 #include <mmintrin.h>
 int main () {
     __m64 v = _mm_cvtsi32_si64 (1);
+    /* test to make sure MMX Ext instructions are usable */
+    v = (__m64) __builtin_ia32_pshufw ((__v4hi)v, 0);
+    v = (__m64) __builtin_ia32_pmulhuw ((__v4hi)v, (__v4hi)v);
     return _mm_cvtsi64_si32 (v);
 }]])], have_mmx_intrinsics=yes)
 CFLAGS=$xserver_save_CFLAGS
-- 
1.7.3.4



More information about the Pixman mailing list