forked from gentoo/gentoo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
babl-0.1.10-clang.patch
50 lines (39 loc) · 1.56 KB
/
babl-0.1.10-clang.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
From 16492300a39e75e1015a0ab33e22b1e3f605c5ce Mon Sep 17 00:00:00 2001
From: Michael Muré <[email protected]>
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 <[email protected]>
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 <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
--
cgit v0.9.0.2