[Pixman] [PATCH 2/4] mmx: prepare pixman-mmx.c to be compiled for ARM/iwmmxt

Matt Turner mattst88 at gmail.com
Thu Aug 25 14:22:28 PDT 2011


Adding iwmmxt inline assembly doesn't help performance, so don't bother.

Signed-off-by: Matt Turner <mattst88 at gmail.com>
---
 pixman/pixman-mmx.c |   13 +++++++++++--
 1 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/pixman/pixman-mmx.c b/pixman/pixman-mmx.c
index 6a68080..7673675 100644
--- a/pixman/pixman-mmx.c
+++ b/pixman/pixman-mmx.c
@@ -33,7 +33,7 @@
 #include <config.h>
 #endif
 
-#ifdef USE_X86_MMX
+#if defined USE_X86_MMX || defined USE_ARM_IWMMXT
 
 #include <mmintrin.h>
 #include "pixman-private.h"
@@ -47,6 +47,15 @@
 #define CHECKPOINT()
 #endif
 
+#ifdef USE_ARM_IWMMXT
+/* Empty the multimedia state. For some reason, ARM's mmintrin.h doesn't provide this.  */
+extern __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__))
+_mm_empty (void)
+{
+
+}
+#endif
+
 /* Notes about writing mmx code
  *
  * give memory operands as the second operand. If you give it as the
@@ -3164,4 +3173,4 @@ _pixman_implementation_create_mmx (pixman_implementation_t *fallback)
     return imp;
 }
 
-#endif /* USE_X86_MMX */
+#endif /* USE_X86_MMX || USE_ARM_IWMMXT */
-- 
1.7.3.4



More information about the Pixman mailing list