[Pixman] [PATCH 1/8] mmx: rename USE_MMX to USE_X86_MMX

Matt Turner mattst88 at gmail.com
Fri Sep 23 11:54:10 PDT 2011


This will make upcoming ARM usage of pixman-mmx.c unambiguous.

Signed-off-by: Matt Turner <mattst88 at gmail.com>
---
 configure.ac            |    8 ++++----
 pixman/Makefile.am      |    2 +-
 pixman/Makefile.win32   |    2 +-
 pixman/pixman-cpu.c     |    6 +++---
 pixman/pixman-mmx.c     |    4 ++--
 pixman/pixman-private.h |    2 +-
 6 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/configure.ac b/configure.ac
index dc523df..561cb67 100644
--- a/configure.ac
+++ b/configure.ac
@@ -303,7 +303,7 @@ CFLAGS=$xserver_save_CFLAGS
 
 AC_ARG_ENABLE(mmx,
    [AC_HELP_STRING([--disable-mmx],
-                   [disable MMX fast paths])],
+                   [disable x86 MMX fast paths])],
    [enable_mmx=$enableval], [enable_mmx=auto])
 
 if test $enable_mmx = no ; then
@@ -311,17 +311,17 @@ if test $enable_mmx = no ; then
 fi
 
 if test $have_mmx_intrinsics = yes ; then
-   AC_DEFINE(USE_MMX, 1, [use MMX compiler intrinsics])
+   AC_DEFINE(USE_X86_MMX, 1, [use x86 MMX compiler intrinsics])
 else
    MMX_CFLAGS=
 fi
 
 AC_MSG_RESULT($have_mmx_intrinsics)
 if test $enable_mmx = yes && test $have_mmx_intrinsics = no ; then
-   AC_MSG_ERROR([MMX intrinsics not detected])
+   AC_MSG_ERROR([x86 MMX intrinsics not detected])
 fi
 
-AM_CONDITIONAL(USE_MMX, test $have_mmx_intrinsics = yes)
+AM_CONDITIONAL(USE_X86_MMX, test $have_mmx_intrinsics = yes)
 
 dnl ===========================================================================
 dnl Check for SSE2
diff --git a/pixman/Makefile.am b/pixman/Makefile.am
index 2421a4f..0932ce7 100644
--- a/pixman/Makefile.am
+++ b/pixman/Makefile.am
@@ -22,7 +22,7 @@ EXTRA_DIST =				\
 DISTCLEANFILES = $(BUILT_SOURCES)
 
 # mmx code
-if USE_MMX
+if USE_X86_MMX
 noinst_LTLIBRARIES += libpixman-mmx.la
 libpixman_mmx_la_SOURCES = \
 	pixman-mmx.c
diff --git a/pixman/Makefile.win32 b/pixman/Makefile.win32
index beff4a0..381f2cd 100644
--- a/pixman/Makefile.win32
+++ b/pixman/Makefile.win32
@@ -14,7 +14,7 @@ ifeq ($(SSE2_VAR),)
 SSE2_VAR=on
 endif
 
-MMX_CFLAGS = -DUSE_MMX -w14710 -w14714
+MMX_CFLAGS = -DUSE_X86_MMX -w14710 -w14714
 SSE2_CFLAGS = -DUSE_SSE2
 
 # MMX compilation flags
diff --git a/pixman/pixman-cpu.c b/pixman/pixman-cpu.c
index 973ed54..78d3033 100644
--- a/pixman/pixman-cpu.c
+++ b/pixman/pixman-cpu.c
@@ -337,7 +337,7 @@ pixman_have_arm_neon (void)
 
 #endif /* USE_ARM_SIMD || USE_ARM_NEON */
 
-#if defined(USE_MMX) || defined(USE_SSE2)
+#if defined(USE_X86_MMX) || defined(USE_SSE2)
 /* The CPU detection code needs to be in a file not compiled with
  * "-mmmx -msse", as gcc would generate CMOV instructions otherwise
  * that would lead to SIGILL instructions on old CPUs that don't have
@@ -564,7 +564,7 @@ pixman_have_sse2 (void)
 #endif
 
 #else /* __amd64__ */
-#ifdef USE_MMX
+#ifdef USE_X86_MMX
 #define pixman_have_mmx() TRUE
 #endif
 #ifdef USE_SSE2
@@ -581,7 +581,7 @@ _pixman_choose_implementation (void)
     imp = _pixman_implementation_create_general();
     imp = _pixman_implementation_create_fast_path (imp);
     
-#ifdef USE_MMX
+#ifdef USE_X86_MMX
     if (pixman_have_mmx ())
 	imp = _pixman_implementation_create_mmx (imp);
 #endif
diff --git a/pixman/pixman-mmx.c b/pixman/pixman-mmx.c
index c044593..eca6d25 100644
--- a/pixman/pixman-mmx.c
+++ b/pixman/pixman-mmx.c
@@ -33,7 +33,7 @@
 #include <config.h>
 #endif
 
-#ifdef USE_MMX
+#ifdef USE_X86_MMX
 
 #include <mmintrin.h>
 #include "pixman-private.h"
@@ -3145,4 +3145,4 @@ _pixman_implementation_create_mmx (pixman_implementation_t *fallback)
     return imp;
 }
 
-#endif /* USE_MMX */
+#endif /* USE_X86_MMX */
diff --git a/pixman/pixman-private.h b/pixman/pixman-private.h
index 6e716c6..09f88c8 100644
--- a/pixman/pixman-private.h
+++ b/pixman/pixman-private.h
@@ -545,7 +545,7 @@ _pixman_implementation_create_fast_path (pixman_implementation_t *fallback);
 pixman_implementation_t *
 _pixman_implementation_create_noop (pixman_implementation_t *fallback);
 
-#ifdef USE_MMX
+#ifdef USE_X86_MMX
 pixman_implementation_t *
 _pixman_implementation_create_mmx (pixman_implementation_t *fallback);
 #endif
-- 
1.7.3.4



More information about the Pixman mailing list