summaryrefslogtreecommitdiffstats
path: root/extra/wavpack/gcc44.patch
blob: 0ee4b1e764c1d12a2530e1f08af521cc33714eb6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
--- src/wavpack_local.h.orig	2009-04-07 10:34:58.000000000 -0400
+++ src/wavpack_local.h	2009-04-07 11:03:45.000000000 -0400
@@ -745,9 +745,17 @@
 
 #define _m_paddd(m1, m2) __builtin_ia32_paddd (m1, m2)
 #define _m_pcmpeqd(m1, m2) __builtin_ia32_pcmpeqd (m1, m2)
-#define _m_pslldi(m1, m2) __builtin_ia32_pslld (m1, m2)
-#define _m_psradi(m1, m2) __builtin_ia32_psrad (m1, m2)
-#define _m_psrldi(m1, m2) __builtin_ia32_psrld (m1, m2)
+
+#if (__GNUC__ == 4 && __GNUC_MINOR__ >= 4) || __GNUC__ > 4
+#	define _m_pslldi(m1, m2) __builtin_ia32_pslldi ((__m64)m1, m2)
+#	define _m_psradi(m1, m2) __builtin_ia32_psradi ((__m64)m1, m2)
+#	define _m_psrldi(m1, m2) __builtin_ia32_psrldi ((__m64)m1, m2)
+#else
+#	define _m_pslldi(m1, m2) __builtin_ia32_pslld (m1, m2)
+#	define _m_psradi(m1, m2) __builtin_ia32_psrad (m1, m2)
+#	define _m_psrldi(m1, m2) __builtin_ia32_psrld (m1, m2)
+#endif
+
 #define _m_psubd(m1, m2) __builtin_ia32_psubd (m1, m2)
 #define _m_punpckhdq(m1, m2) __builtin_ia32_punpckhdq (m1, m2)
 #define _m_punpckldq(m1, m2) __builtin_ia32_punpckldq (m1, m2)