[babl] sse-fixups: use more portable functions to help compile with clang



commit 16492300a39e75e1015a0ab33e22b1e3f605c5ce
Author: Michael Murà <batolettre gmail com>
Date:   Tue May 22 12:48:44 2012 +0900

    sse-fixups: use more portable functions to help compile with clang
    
    Original patch found here
    http://www.freebsd.org/cgi/cvsweb.cgi/ports/x11/babl/files/patch-sse-fixups.c?rev=1.1;content-type=text%2Fplain
    
    CVS tags: RELEASE_8_3_0, HEAD
    
    Fix the build with clang.
    
    PR:		ports/163518
    Submitted by:	Jan Beich <jbeich tormail net>
    Feature safe:	yes

 extensions/sse-fixups.c |   12 +++++++-----
 1 files changed, 7 insertions(+), 5 deletions(-)
---
diff --git a/extensions/sse-fixups.c b/extensions/sse-fixups.c
index fdcc06f..95f1cc8 100644
--- a/extensions/sse-fixups.c
+++ b/extensions/sse-fixups.c
@@ -23,6 +23,8 @@
 
 #if defined(__GNUC__) && (__GNUC__ >= 4) && defined(USE_SSE) && defined(USE_MMX)
 
+#include <xmmintrin.h>
+
 #include <stdint.h>
 #include <stdlib.h>
 
@@ -40,11 +42,11 @@ typedef int   g2int   __attribute__ ((vector_size (2*sizeof(int))));
 #define g4float_zero      g4float_all(0.0)
 #define g4float_ff        g4float_all(255.0)
 
-#define g4float_max(a,b)    __builtin_ia32_maxps(a, b)
-#define g4float_min(a,b)    __builtin_ia32_minps(a, b)
-#define g4float_cvt2pi(a)   __builtin_ia32_cvtps2pi(a)
-#define g4float_movhl(a,b)  __builtin_ia32_movhlps(a, b)
-#define g4float_emms        __builtin_ia32_emms
+#define g4float_max(a,b)    _mm_max_ps(a, b)
+#define g4float_min(a,b)    _mm_min_ps(a, b)
+#define g4float_cvt2pi(a)   _mm_cvtps_pi32(a)
+#define g4float_movhl(a,b)  _mm_movehl_ps(a, b)
+#define g4float_emms        _mm_empty
 
 
 static INLINE long



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]