From da6df2b165ecb2a4ce80cb2bca75a1cb083457f3 Mon Sep 17 00:00:00 2001 From: atmos4 Date: Sat, 7 Sep 2002 13:57:41 +0000 Subject: [PATCH] Minor speedup by nick kurshev. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@7308 b3059339-0415-0410-9bf9-f77b7e298cf2 --- mp3lib/dct64_k7.c | 96 ++++++++++++++++------------------------------- 1 file changed, 32 insertions(+), 64 deletions(-) diff --git a/mp3lib/dct64_k7.c b/mp3lib/dct64_k7.c index bc14bfc6f1..f697943005 100644 --- a/mp3lib/dct64_k7.c +++ b/mp3lib/dct64_k7.c @@ -31,10 +31,8 @@ void __attribute__ (( __stdcall__ )) dct64_MMX_3dnowex(real *a,real *b,real *c) " movq 8(%%eax), %%mm4\n\t" " movq %%mm0, %%mm3\n\t" " movq %%mm4, %%mm7\n\t" -" movq 120(%%eax), %%mm1\n\t" -" movq 112(%%eax), %%mm5\n\t" -" pswapd %%mm1, %%mm1\n\t" -" pswapd %%mm5, %%mm5\n\t" +" pshufw $78, 120(%%eax), %%mm1\n\t" +" pshufw $78, 112(%%eax), %%mm5\n\t" " pfadd %%mm1, %%mm0\n\t" " pfadd %%mm5, %%mm4\n\t" " movq %%mm0, (%%edx)\n\t" @@ -52,10 +50,8 @@ void __attribute__ (( __stdcall__ )) dct64_MMX_3dnowex(real *a,real *b,real *c) " movq 24(%%eax), %%mm4\n\t" " movq %%mm0, %%mm3\n\t" " movq %%mm4, %%mm7\n\t" -" movq 104(%%eax), %%mm1\n\t" -" movq 96(%%eax), %%mm5\n\t" -" pswapd %%mm1, %%mm1\n\t" -" pswapd %%mm5, %%mm5\n\t" +" pshufw $78, 104(%%eax), %%mm1\n\t" +" pshufw $78, 96(%%eax), %%mm5\n\t" " pfadd %%mm1, %%mm0\n\t" " pfadd %%mm5, %%mm4\n\t" " movq %%mm0, 16(%%edx)\n\t" @@ -73,10 +69,8 @@ void __attribute__ (( __stdcall__ )) dct64_MMX_3dnowex(real *a,real *b,real *c) " movq 40(%%eax), %%mm4\n\t" " movq %%mm0, %%mm3\n\t" " movq %%mm4, %%mm7\n\t" -" movq 88(%%eax), %%mm1\n\t" -" movq 80(%%eax), %%mm5\n\t" -" pswapd %%mm1, %%mm1\n\t" -" pswapd %%mm5, %%mm5\n\t" +" pshufw $78, 88(%%eax), %%mm1\n\t" +" pshufw $78, 80(%%eax), %%mm5\n\t" " pfadd %%mm1, %%mm0\n\t" " pfadd %%mm5, %%mm4\n\t" " movq %%mm0, 32(%%edx)\n\t" @@ -94,10 +88,8 @@ void __attribute__ (( __stdcall__ )) dct64_MMX_3dnowex(real *a,real *b,real *c) " movq 56(%%eax), %%mm4\n\t" " movq %%mm0, %%mm3\n\t" " movq %%mm4, %%mm7\n\t" -" movq 72(%%eax), %%mm1\n\t" -" movq 64(%%eax), %%mm5\n\t" -" pswapd %%mm1, %%mm1\n\t" -" pswapd %%mm5, %%mm5\n\t" +" pshufw $78, 72(%%eax), %%mm1\n\t" +" pshufw $78, 64(%%eax), %%mm5\n\t" " pfadd %%mm1, %%mm0\n\t" " pfadd %%mm5, %%mm4\n\t" " movq %%mm0, 48(%%edx)\n\t" @@ -117,10 +109,8 @@ void __attribute__ (( __stdcall__ )) dct64_MMX_3dnowex(real *a,real *b,real *c) " movq 8(%%edx), %%mm4\n\t" " movq %%mm0, %%mm3\n\t" " movq %%mm4, %%mm7\n\t" -" movq 56(%%edx), %%mm1\n\t" -" movq 48(%%edx), %%mm5\n\t" -" pswapd %%mm1, %%mm1\n\t" -" pswapd %%mm5, %%mm5\n\t" +" pshufw $78, 56(%%edx), %%mm1\n\t" +" pshufw $78, 48(%%edx), %%mm5\n\t" " pfadd %%mm1, %%mm0\n\t" " pfadd %%mm5, %%mm4\n\t" " movq %%mm0, (%%ecx)\n\t" @@ -138,10 +128,8 @@ void __attribute__ (( __stdcall__ )) dct64_MMX_3dnowex(real *a,real *b,real *c) " movq 24(%%edx), %%mm4\n\t" " movq %%mm0, %%mm3\n\t" " movq %%mm4, %%mm7\n\t" -" movq 40(%%edx), %%mm1\n\t" -" movq 32(%%edx), %%mm5\n\t" -" pswapd %%mm1, %%mm1\n\t" -" pswapd %%mm5, %%mm5\n\t" +" pshufw $78, 40(%%edx), %%mm1\n\t" +" pshufw $78, 32(%%edx), %%mm5\n\t" " pfadd %%mm1, %%mm0\n\t" " pfadd %%mm5, %%mm4\n\t" " movq %%mm0, 16(%%ecx)\n\t" @@ -161,10 +149,8 @@ void __attribute__ (( __stdcall__ )) dct64_MMX_3dnowex(real *a,real *b,real *c) " movq 72(%%edx), %%mm4\n\t" " movq %%mm0, %%mm3\n\t" " movq %%mm4, %%mm7\n\t" -" movq 120(%%edx), %%mm1\n\t" -" movq 112(%%edx), %%mm5\n\t" -" pswapd %%mm1, %%mm1\n\t" -" pswapd %%mm5, %%mm5\n\t" +" pshufw $78, 120(%%edx), %%mm1\n\t" +" pshufw $78, 112(%%edx), %%mm5\n\t" " pfadd %%mm1, %%mm0\n\t" " pfadd %%mm5, %%mm4\n\t" " movq %%mm0, 64(%%ecx)\n\t" @@ -182,10 +168,8 @@ void __attribute__ (( __stdcall__ )) dct64_MMX_3dnowex(real *a,real *b,real *c) " movq 88(%%edx), %%mm4\n\t" " movq %%mm0, %%mm3\n\t" " movq %%mm4, %%mm7\n\t" -" movq 104(%%edx), %%mm1\n\t" -" movq 96(%%edx), %%mm5\n\t" -" pswapd %%mm1, %%mm1\n\t" -" pswapd %%mm5, %%mm5\n\t" +" pshufw $78, 104(%%edx), %%mm1\n\t" +" pshufw $78, 96(%%edx), %%mm5\n\t" " pfadd %%mm1, %%mm0\n\t" " pfadd %%mm5, %%mm4\n\t" " movq %%mm0, 80(%%ecx)\n\t" @@ -208,10 +192,8 @@ void __attribute__ (( __stdcall__ )) dct64_MMX_3dnowex(real *a,real *b,real *c) " movq 8(%%ecx), %%mm4\n\t" " movq %%mm0, %%mm3\n\t" " movq %%mm4, %%mm7\n\t" -" movq 24(%%ecx), %%mm1\n\t" -" movq 16(%%ecx), %%mm5\n\t" -" pswapd %%mm1, %%mm1\n\t" -" pswapd %%mm5, %%mm5\n\t" +" pshufw $78, 24(%%ecx), %%mm1\n\t" +" pshufw $78, 16(%%ecx), %%mm5\n\t" " pfadd %%mm1, %%mm0\n\t" " pfadd %%mm5, %%mm4\n\t" " movq %%mm0, (%%edx)\n\t" @@ -229,10 +211,8 @@ void __attribute__ (( __stdcall__ )) dct64_MMX_3dnowex(real *a,real *b,real *c) " movq 40(%%ecx), %%mm4\n\t" " movq %%mm0, %%mm3\n\t" " movq %%mm4, %%mm7\n\t" -" movq 56(%%ecx), %%mm1\n\t" -" movq 48(%%ecx), %%mm5\n\t" -" pswapd %%mm1, %%mm1\n\t" -" pswapd %%mm5, %%mm5\n\t" +" pshufw $78, 56(%%ecx), %%mm1\n\t" +" pshufw $78, 48(%%ecx), %%mm5\n\t" " pfadd %%mm1, %%mm0\n\t" " pfadd %%mm5, %%mm4\n\t" " movq %%mm0, 32(%%edx)\n\t" @@ -250,10 +230,8 @@ void __attribute__ (( __stdcall__ )) dct64_MMX_3dnowex(real *a,real *b,real *c) " movq 72(%%ecx), %%mm4\n\t" " movq %%mm0, %%mm3\n\t" " movq %%mm4, %%mm7\n\t" -" movq 88(%%ecx), %%mm1\n\t" -" movq 80(%%ecx), %%mm5\n\t" -" pswapd %%mm1, %%mm1\n\t" -" pswapd %%mm5, %%mm5\n\t" +" pshufw $78, 88(%%ecx), %%mm1\n\t" +" pshufw $78, 80(%%ecx), %%mm5\n\t" " pfadd %%mm1, %%mm0\n\t" " pfadd %%mm5, %%mm4\n\t" " movq %%mm0, 64(%%edx)\n\t" @@ -271,10 +249,8 @@ void __attribute__ (( __stdcall__ )) dct64_MMX_3dnowex(real *a,real *b,real *c) " movq 104(%%ecx), %%mm4\n\t" " movq %%mm0, %%mm3\n\t" " movq %%mm4, %%mm7\n\t" -" movq 120(%%ecx), %%mm1\n\t" -" movq 112(%%ecx), %%mm5\n\t" -" pswapd %%mm1, %%mm1\n\t" -" pswapd %%mm5, %%mm5\n\t" +" pshufw $78, 120(%%ecx), %%mm1\n\t" +" pshufw $78, 112(%%ecx), %%mm5\n\t" " pfadd %%mm1, %%mm0\n\t" " pfadd %%mm5, %%mm4\n\t" " movq %%mm0, 96(%%edx)\n\t" @@ -296,10 +272,8 @@ void __attribute__ (( __stdcall__ )) dct64_MMX_3dnowex(real *a,real *b,real *c) " movq 16(%%edx), %%mm4\n\t" " movq %%mm0, %%mm3\n\t" " movq %%mm4, %%mm7\n\t" -" movq 8(%%edx), %%mm1\n\t" -" movq 24(%%edx), %%mm5\n\t" -" pswapd %%mm1, %%mm1\n\t" -" pswapd %%mm5, %%mm5\n\t" +" pshufw $78, 8(%%edx), %%mm1\n\t" +" pshufw $78, 24(%%edx), %%mm5\n\t" " pfadd %%mm1, %%mm0\n\t" " pfadd %%mm5, %%mm4\n\t" " movq %%mm0, (%%ecx)\n\t" @@ -317,10 +291,8 @@ void __attribute__ (( __stdcall__ )) dct64_MMX_3dnowex(real *a,real *b,real *c) " movq 48(%%edx), %%mm4\n\t" " movq %%mm0, %%mm3\n\t" " movq %%mm4, %%mm7\n\t" -" movq 40(%%edx), %%mm1\n\t" -" movq 56(%%edx), %%mm5\n\t" -" pswapd %%mm1, %%mm1\n\t" -" pswapd %%mm5, %%mm5\n\t" +" pshufw $78, 40(%%edx), %%mm1\n\t" +" pshufw $78, 56(%%edx), %%mm5\n\t" " pfadd %%mm1, %%mm0\n\t" " pfadd %%mm5, %%mm4\n\t" " movq %%mm0, 32(%%ecx)\n\t" @@ -338,10 +310,8 @@ void __attribute__ (( __stdcall__ )) dct64_MMX_3dnowex(real *a,real *b,real *c) " movq 80(%%edx), %%mm4\n\t" " movq %%mm0, %%mm3\n\t" " movq %%mm4, %%mm7\n\t" -" movq 72(%%edx), %%mm1\n\t" -" movq 88(%%edx), %%mm5\n\t" -" pswapd %%mm1, %%mm1\n\t" -" pswapd %%mm5, %%mm5\n\t" +" pshufw $78, 72(%%edx), %%mm1\n\t" +" pshufw $78, 88(%%edx), %%mm5\n\t" " pfadd %%mm1, %%mm0\n\t" " pfadd %%mm5, %%mm4\n\t" " movq %%mm0, 64(%%ecx)\n\t" @@ -359,10 +329,8 @@ void __attribute__ (( __stdcall__ )) dct64_MMX_3dnowex(real *a,real *b,real *c) " movq 112(%%edx), %%mm4\n\t" " movq %%mm0, %%mm3\n\t" " movq %%mm4, %%mm7\n\t" -" movq 104(%%edx), %%mm1\n\t" -" movq 120(%%edx), %%mm5\n\t" -" pswapd %%mm1, %%mm1\n\t" -" pswapd %%mm5, %%mm5\n\t" +" pshufw $78, 104(%%edx), %%mm1\n\t" +" pshufw $78, 120(%%edx), %%mm5\n\t" " pfadd %%mm1, %%mm0\n\t" " pfadd %%mm5, %%mm4\n\t" " movq %%mm0, 96(%%ecx)\n\t"