diff options
author | Mathieu Arnold <mat@FreeBSD.org> | 2016-07-26 16:51:15 +0000 |
---|---|---|
committer | Mathieu Arnold <mat@FreeBSD.org> | 2016-07-26 16:51:15 +0000 |
commit | 9fa9eb9ac7bf1d3de825ee25a8f0ae81b7b77896 (patch) | |
tree | 9b071a8105704e992946dcd6b801e9fcb7635142 /audio/openal/files/patch-src_arch_i386_x86__floatmul.c | |
parent | MooseFS is a Fault tolerant, High Available, Highly Performing, Scale-Out, (diff) |
Cleanup patches, a* categories.
Rename them to follow the make makepatch naming, and regenerate them.
With hat: portmgr
Sponsored by: Absolight
Diffstat (limited to 'audio/openal/files/patch-src_arch_i386_x86__floatmul.c')
-rw-r--r-- | audio/openal/files/patch-src_arch_i386_x86__floatmul.c | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/audio/openal/files/patch-src_arch_i386_x86__floatmul.c b/audio/openal/files/patch-src_arch_i386_x86__floatmul.c new file mode 100644 index 000000000000..3901c418dfcf --- /dev/null +++ b/audio/openal/files/patch-src_arch_i386_x86__floatmul.c @@ -0,0 +1,39 @@ +--- src/arch/i386/x86_floatmul.c.orig 2005-12-21 19:06:35 UTC ++++ src/arch/i386/x86_floatmul.c +@@ -46,7 +46,7 @@ void _alFloatMul(ALshort *bpt, ALfloat s + v4hi temp; + + +- samples_pre = MMX_ALIGN - (aint)bpt % MMX_ALIGN; ++ samples_pre = (MMX_ALIGN - (aint)bpt % MMX_ALIGN) % MMX_ALIGN; + samples_pre /= sizeof(ALshort); + samples_main = len - samples_pre; + samples_post = samples_main % 8; +@@ -82,11 +82,27 @@ void _alFloatMul(ALshort *bpt, ALfloat s + v_sa.s[3] = v_sa.s[0]; + + while (samples_main--) { ++ union { ++ short s[4]; ++ v4hi v; ++ } ALIGN16(v_one); ++ v_one.s[0] = 1; ++ v_one.s[1] = 0; ++ 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)) && !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)) && !defined(__clang__) + *(v4hi*)bpt = __builtin_ia32_psllw(temp, 1LL); ++#else ++ *(v4hi*)bpt = __builtin_ia32_psllw(temp, v_one.v); ++#endif + bpt += 4; + } + } |