summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChun-wei Fan <fanchunwei@src.gnome.org>2012-03-09 15:54:06 +0800
committerSøren Sandmann Pedersen <ssp@redhat.com>2012-03-15 15:18:11 -0400
commit21eeecffa93ba5912487d88851b1a5c60fc37768 (patch)
treefde9c5938be34ec641fe7123390d6779e25f2e4c
parent94aea2e868ae02235785f31b275f89b9661bca0e (diff)
Just include xmmintrin.h on MSVC as well
The xmmintrin.h as shipped with recent Visual C++ (2003+) provides _mm_shuffle_pi16 and _mm_mulhi_pu16, so including that header will do for using these functions, and MSVC does not like the GCC-specific implementations of _mm_shuffle_pi16 and _mm_mulhi_pu16 that is currently in the code. _MM_SHUFFLE is declared in the same way in MSVC's xmmintrin.h, so don't re-define it here to avoid a compilation warning.
-rw-r--r--pixman/pixman-mmx.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/pixman/pixman-mmx.c b/pixman/pixman-mmx.c
index f9efd73d..9d1f6afd 100644
--- a/pixman/pixman-mmx.c
+++ b/pixman/pixman-mmx.c
@@ -57,7 +57,7 @@ _mm_empty (void)
#endif
#ifdef USE_X86_MMX
-# ifdef __SUNPRO_C
+# if (defined(__SUNPRO_C) || defined(_MSC_VER))
# include <xmmintrin.h>
# else
/* We have to compile with -msse to use xmmintrin.h, but that causes SSE
@@ -88,8 +88,10 @@ _mm_shuffle_pi16 (__m64 __A, int8_t const __N)
# endif
#endif
+#ifndef _MSC_VER
#define _MM_SHUFFLE(fp3,fp2,fp1,fp0) \
(((fp3) << 6) | ((fp2) << 4) | ((fp1) << 2) | (fp0))
+#endif
/* Notes about writing mmx code
*