Remove use of MMX extensions.
authorSøren Sandmann Pedersen <sandmann@redhat.com>
Sun, 24 Aug 2008 03:42:36 +0000 (23:42 -0400)
committerSøren Sandmann Pedersen <sandmann@redhat.com>
Sun, 24 Aug 2008 03:42:36 +0000 (23:42 -0400)
They were never a big improvement anyway, and now that we have SSE2
support, they would only be useful on Pentium IIIs, and only if
explicitly enabled, which most distributions couldn't do anyway.

TODO
configure.ac
pixman/pixman-mmx.c

diff --git a/TODO b/TODO
index 94088ce..cb7d5a9 100644 (file)
--- a/TODO
+++ b/TODO
@@ -1,4 +1,5 @@
   - Rename "SSE" to "MMX_EXTENSIONS"
+  - Be consistent about calling sse2 sse2
 
   - SSE 2 issues:
 
index 0cf32c7..7d80145 100644 (file)
@@ -180,45 +180,6 @@ fi
 
 AM_CONDITIONAL(USE_MMX, test $have_mmx_intrinsics = yes)
 
-dnl =======================================================
-
-dnl GCC 4.2 when compiling with -msse will generate SSE instructions
-dnl on its own.  This means anything compiled with -mss can only be
-dnl run after a runtime check for SSE.  Unfortunately, since we still
-dnl need to support MMX-but-not-SSE (such as the OLPC), this means we
-dnl can only use SSE when compiling for x86-64 (where SSE is always
-dnl supported).
-
-have_sse_intrinsics=no
-AC_MSG_CHECKING(whether to use SSE intrinsics)
-xserver_save_CFLAGS=$CFLAGS
-CFLAGS="$CFLAGS -msse $MMX_CFLAGS"
-
-AC_COMPILE_IFELSE([
-#if defined(__GNUC__) && (__GNUC__ < 3 || (__GNUC__ == 3 && __GNUC_MINOR__ < 4))
-#error "Need GCC >= 3.4 for SSE intrinsics"
-#endif
-#if !defined(__amd64__) && !defined(__x86_64__)
-#error "Need x86-64 for SSE"
-#endif
-#include <mmintrin.h>
-#include <xmmintrin.h>
-int main () {
-    __m64 v = _mm_cvtsi32_si64 (1);
-    v = _mm_shuffle_pi16 (v, _MM_SHUFFLE(3, 3, 3, 3));
-    return _mm_cvtsi64_si32 (v);
-}], have_sse_intrinsics=yes)
-CFLAGS=$xserver_save_CFLAGS
-AC_MSG_RESULT($have_sse_intrinsics)
-
-if test $have_sse_intrinsics = yes ; then
-   AC_DEFINE(USE_SSE, 1, [use SSE compiler intrinsics])
-   MMX_CFLAGS="-msse $MMX_CFLAGS"
-fi
-
-AM_CONDITIONAL(USE_SSE, test $have_sse_intrinsics = yes)
-
-
 dnl ===========================================================================
 dnl Check for SSE2
 
index 9d6eb8b..36e82b7 100644 (file)
@@ -227,28 +227,6 @@ pix_add (__m64 a, __m64 b)
     return  _mm_adds_pu8 (a, b);
 }
 
-#ifdef USE_SSE
-
-static inline __m64
-expand_alpha (__m64 pixel)
-{
-    return _mm_shuffle_pi16 (pixel, _MM_SHUFFLE(3, 3, 3, 3));
-}
-
-static inline __m64
-expand_alpha_rev (__m64 pixel)
-{
-    return _mm_shuffle_pi16 (pixel, _MM_SHUFFLE(0, 0, 0, 0));
-}
-
-static inline __m64
-invert_colors (__m64 pixel)
-{
-    return _mm_shuffle_pi16 (pixel, _MM_SHUFFLE(3, 0, 1, 2));
-}
-
-#else
-
 static inline __m64
 expand_alpha (__m64 pixel)
 {
@@ -300,8 +278,6 @@ invert_colors (__m64 pixel)
     return x;
 }
 
-#endif
-
 static inline __m64
 over (__m64 src, __m64 srca, __m64 dest)
 {