Fixup fromcvs/togit conversion
[minix-pkgsrc.git] / audio / openal / patches / patch-src_arch_i386_x86__floatmul.c
blob2b96692e3e7da389709630c9263a393f29c85138
1 $NetBSD: patch-src_arch_i386_x86__floatmul.c,v 1.2 2011/09/22 15:18:39 wiz Exp $
3 Fix build with gcc-4.5.
5 --- src/arch/i386/x86_floatmul.c.orig 2005-12-21 19:06:35.000000000 +0000
6 +++ src/arch/i386/x86_floatmul.c
7 @@ -82,11 +82,27 @@ void _alFloatMul(ALshort *bpt, ALfloat s
8 v_sa.s[3] = v_sa.s[0];
10 while (samples_main--) {
11 + union {
12 + short s[4];
13 + v4hi v;
14 + } ALIGN16(v_one);
15 + v_one.s[0] = 1;
16 + v_one.s[1] = 0;
17 + v_one.s[2] = 0;
18 + v_one.s[3] = 0;
19 temp = __builtin_ia32_pmulhw(*(v4hi*)bpt, v_sa.v);
20 +#if defined(__GNUC__) && defined(__GNUC_MINOR__) && (__GNUC__ <= 3 || (__GNUC__ == 4 && __GNUC_MINOR__ <= 2)) && !defined(__clang__)
21 *(v4hi*)bpt = __builtin_ia32_psllw(temp, 1LL);
22 +#else
23 + *(v4hi*)bpt = __builtin_ia32_psllw(temp, v_one.v);
24 +#endif
25 bpt += 4;
26 temp = __builtin_ia32_pmulhw(*(v4hi*)bpt, v_sa.v);
27 +#if defined(__GNUC__) && defined(__GNUC_MINOR__) && (__GNUC__ <= 3 || (__GNUC__ == 4 && __GNUC_MINOR__ <= 2)) && !defined(__clang__)
28 *(v4hi*)bpt = __builtin_ia32_psllw(temp, 1LL);
29 +#else
30 + *(v4hi*)bpt = __builtin_ia32_psllw(temp, v_one.v);
31 +#endif
32 bpt += 4;