From 16492300a39e75e1015a0ab33e22b1e3f605c5ce Mon Sep 17 00:00:00 2001 From: Michael Muré Date: Tue, 22 May 2012 03:48:44 +0000 Subject: 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 Feature safe: yes --- (limited to 'extensions/sse-fixups.c') 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 + #include #include @@ -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 -- cgit v0.9.0.2