pixman: Branch 'master'
Søren Sandmann Pedersen
sandmann at kemper.freedesktop.org
Fri Apr 11 21:22:02 PDT 2008
configure.ac | 4 ++--
pixman/pixman-mmx.c | 27 +++++++++++++++++----------
2 files changed, 19 insertions(+), 12 deletions(-)
New commits:
commit 53882228c9bbd50609e2858502b9bc087ca76903
Author: Søren Sandmann <sandmann at redhat.com>
Date: Sat Apr 12 00:22:35 2008 -0400
Simplify handling compiler handling in MMX code
Instead of using the parameters --param inline-unit-growth=10000 and
--param large-function-growth=10000", just make the inline functions
__always_inline__.
Also support Intel's compiler in pixman-mmx.c.
Based on a patch by Serhat <ubunturk at gmail.com>
diff --git a/configure.ac b/configure.ac
index 6b0efcb..0f52b87 100644
--- a/configure.ac
+++ b/configure.ac
@@ -129,7 +129,7 @@ AC_MSG_RESULT($have_gcc4)
dnl ===========================================================================
dnl Check for MMX
-MMX_CFLAGS="-mmmx -Winline --param inline-unit-growth=10000 --param large-function-growth=10000"
+MMX_CFLAGS="-mmmx -Winline"
have_mmx_intrinsics=no
AC_MSG_CHECKING(whether to use MMX intrinsics)
@@ -197,7 +197,7 @@ AM_CONDITIONAL(USE_SSE, test $have_sse_intrinsics = yes)
dnl ===========================================================================
dnl Check for SSE2
-SSE_CFLAGS="-mmmx -msse2 -Winline --param inline-unit-growth=10000 --param large-function-growth=10000"
+SSE_CFLAGS="-mmmx -msse2 -Winline"
have_sse2_intrinsics=no
AC_MSG_CHECKING(whether to use SSE2 intrinsics)
diff --git a/pixman/pixman-mmx.c b/pixman/pixman-mmx.c
index 8afbcb8..024dfee 100644
--- a/pixman/pixman-mmx.c
+++ b/pixman/pixman-mmx.c
@@ -142,28 +142,33 @@ static const MMXData c =
#endif
};
-#ifdef _MSC_VER
-#undef inline
-#define inline __forceinline
-#endif
-
#ifdef __GNUC__
-#define MC(x) ((__m64) c.mmx_##x)
+# ifdef __ICC
+# define MC(x) M64(c.mmx_##x)
+# else
+# define MC(x) ((__m64)c.mmx_##x)
+# endif
+# define inline __inline__ __attribute__ ((__always_inline__))
#endif
+
#ifdef _MSC_VER
-#define MC(x) c.mmx_##x
+# define MC(x) c.mmx_##x
+# undef inline
+# define inline __forceinline
#endif
static inline __m64
M64 (ullong x)
{
-#ifdef __GNUC__
+#ifdef __ICC
+ return _mm_cvtsi64_m64 (x);
+#elif defined (__GNUC__)
return (__m64)x;
#endif
#ifdef _MSC_VER
__m64 res;
-
+
res.m64_u64 = x;
return res;
#endif
@@ -172,7 +177,9 @@ M64 (ullong x)
static inline ullong
ULLONG (__m64 x)
{
-#ifdef __GNUC__
+#ifdef __ICC
+ return _mm_cvtm64_si64 (x);
+#elif defined (__GNUC__)
return (ullong)x;
#endif
More information about the xorg-commit
mailing list