[Pixman] [PATCH 1/4] mmx: rename USE_MMX to USE_X86_MMX
Matt Turner
mattst88 at gmail.com
Thu Aug 25 14:22:27 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 4c62102..6828ecf 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 44e6b17..b8ce196 100644
--- a/pixman/Makefile.am
+++ b/pixman/Makefile.am
@@ -57,7 +57,7 @@ EXTRA_DIST = Makefile.win32 pixman-combine.c.template make-combine.pl pixman-reg
CLEANFILES = pixman-combine32.c pixman-combine64.c pixman-combine32.h pixman-combine64.h
# 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 7c92722..cca2241 100644
--- a/pixman/Makefile.win32
+++ b/pixman/Makefile.win32
@@ -19,7 +19,7 @@ SSE2_VAR=on
endif
CFLAGS = -MD -nologo -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE -I../pixman/src -I. -DPACKAGE=$(LIBRARY) -DPACKAGE_VERSION="" -DPACKAGE_BUGREPORT=""
-MMX_CFLAGS = -DUSE_MMX -w14710 -w14714
+MMX_CFLAGS = -DUSE_X86_MMX -w14710 -w14714
SSE2_CFLAGS = -DUSE_SSE2
# optimization 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 697ec4c..6a68080 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"
@@ -3164,4 +3164,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 a25897d..71e52cc 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