summaryrefslogtreecommitdiff
path: root/audio/openal/patches/patch-src_arch_i386_x86__floatmul.c
diff options
context:
space:
mode:
Diffstat (limited to 'audio/openal/patches/patch-src_arch_i386_x86__floatmul.c')
-rw-r--r--audio/openal/patches/patch-src_arch_i386_x86__floatmul.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/audio/openal/patches/patch-src_arch_i386_x86__floatmul.c b/audio/openal/patches/patch-src_arch_i386_x86__floatmul.c
index f8ea04ed696..b454640e1b5 100644
--- a/audio/openal/patches/patch-src_arch_i386_x86__floatmul.c
+++ b/audio/openal/patches/patch-src_arch_i386_x86__floatmul.c
@@ -1,4 +1,4 @@
-$NetBSD: patch-src_arch_i386_x86__floatmul.c,v 1.2 2011/09/22 15:18:39 wiz Exp $
+$NetBSD: patch-src_arch_i386_x86__floatmul.c,v 1.3 2012/04/17 17:40:50 joerg Exp $
Fix build with gcc-4.5.
@@ -17,14 +17,14 @@ Fix build with gcc-4.5.
+ v_one.s[2] = 0;
+ v_one.s[3] = 0;
temp = __builtin_ia32_pmulhw(*(v4hi*)bpt, v_sa.v);
-+#if defined(__GNUC__) && defined(__GNUC_MINOR__) && (__GNUC__ <= 3 || (__GNUC__ == 4 && __GNUC_MINOR__ <= 2))
++#if defined(__GNUC__) && defined(__GNUC_MINOR__) && (__GNUC__ <= 3 || (__GNUC__ == 4 && __GNUC_MINOR__ <= 2)) && !defined(__clang__)
*(v4hi*)bpt = __builtin_ia32_psllw(temp, 1LL);
+#else
+ *(v4hi*)bpt = __builtin_ia32_psllw(temp, v_one.v);
+#endif
bpt += 4;
temp = __builtin_ia32_pmulhw(*(v4hi*)bpt, v_sa.v);
-+#if defined(__GNUC__) && defined(__GNUC_MINOR__) && (__GNUC__ <= 3 || (__GNUC__ == 4 && __GNUC_MINOR__ <= 2))
++#if defined(__GNUC__) && defined(__GNUC_MINOR__) && (__GNUC__ <= 3 || (__GNUC__ == 4 && __GNUC_MINOR__ <= 2)) && !defined(__clang__)
*(v4hi*)bpt = __builtin_ia32_psllw(temp, 1LL);
+#else
+ *(v4hi*)bpt = __builtin_ia32_psllw(temp, v_one.v);