# HG changeset patch # User michael # Date 1155038631 0 # Node ID 8e13ec0f8aa3e30d0ac26792cb0f15799f0e665a # Parent 6805c1e5507e12a45be4ec29633614e23d523795 change vorbis_inverse_coupling_sse2() so it works on sse1 cpus diff -r 6805c1e5507e -r 8e13ec0f8aa3 i386/dsputil_mmx.c --- a/i386/dsputil_mmx.c Tue Aug 08 10:24:26 2006 +0000 +++ b/i386/dsputil_mmx.c Tue Aug 08 12:03:51 2006 +0000 @@ -40,6 +40,9 @@ static const uint64_t mm_wone attribute_used __attribute__ ((aligned(8))) = 0x0001000100010001ULL; static const uint64_t mm_wtwo attribute_used __attribute__ ((aligned(8))) = 0x0002000200020002ULL; +static const uint64_t ff_pdw_80000000[2] attribute_used __attribute__ ((aligned(16))) = +{0x8000000080000000ULL, 0x8000000080000000ULL}; + static const uint64_t ff_pw_20 attribute_used __attribute__ ((aligned(8))) = 0x0014001400140014ULL; static const uint64_t ff_pw_3 attribute_used __attribute__ ((aligned(8))) = 0x0003000300030003ULL; static const uint64_t ff_pw_4 attribute_used __attribute__ ((aligned(8))) = 0x0004000400040004ULL; @@ -2738,22 +2741,27 @@ } asm volatile("emms"); } -static void vorbis_inverse_coupling_sse2(float *mag, float *ang, int blocksize) +static void vorbis_inverse_coupling_sse(float *mag, float *ang, int blocksize) { int i; + + asm volatile( + "movaps %0, %%xmm5 \n\t" + ::"m"(ff_pdw_80000000[0]) + ); for(i=0; i0) & (a ^ sign(m))) "movaps %%xmm3, %1 \n\t" @@ -3191,8 +3199,8 @@ } #endif - if(mm_flags & MM_SSE2) - c->vorbis_inverse_coupling = vorbis_inverse_coupling_sse2; + if(mm_flags & MM_SSE) + c->vorbis_inverse_coupling = vorbis_inverse_coupling_sse; else if(mm_flags & MM_3DNOW) c->vorbis_inverse_coupling = vorbis_inverse_coupling_3dnow; }