[MPlayer-cvslog] r23378 - trunk/mp3lib/decode_MMX.c

zuxy subversion at mplayerhq.hu
Wed May 23 17:31:37 CEST 2007


Author: zuxy
Date: Wed May 23 17:31:37 2007
New Revision: 23378

Log:
Remove hardcoded registers


Modified:
   trunk/mp3lib/decode_MMX.c

Modified: trunk/mp3lib/decode_MMX.c
==============================================================================
--- trunk/mp3lib/decode_MMX.c	(original)
+++ trunk/mp3lib/decode_MMX.c	Wed May 23 17:31:37 2007
@@ -84,22 +84,22 @@ int synth_1to1_MMX(real *bandPtr, int ch
 __asm __volatile(
 ASMALIGN(4)
 ".L03:\n\t"
-        "movq  (%%edx),%%mm0\n\t"
-        "movq  64(%%edx),%%mm4\n\t"
-        "pmaddwd (%%esi),%%mm0\n\t"
-        "pmaddwd 32(%%esi),%%mm4\n\t"
-        "movq  8(%%edx),%%mm1\n\t"
-        "movq  72(%%edx),%%mm5\n\t"
-        "pmaddwd 8(%%esi),%%mm1\n\t"
-        "pmaddwd 40(%%esi),%%mm5\n\t"
-        "movq  16(%%edx),%%mm2\n\t"
-        "movq  80(%%edx),%%mm6\n\t"
-        "pmaddwd 16(%%esi),%%mm2\n\t"
-        "pmaddwd 48(%%esi),%%mm6\n\t"
-        "movq  24(%%edx),%%mm3\n\t"
-        "movq  88(%%edx),%%mm7\n\t"
-        "pmaddwd 24(%%esi),%%mm3\n\t"
-        "pmaddwd 56(%%esi),%%mm7\n\t"
+        "movq  (%1),%%mm0\n\t"
+        "movq  64(%1),%%mm4\n\t"
+        "pmaddwd (%2),%%mm0\n\t"
+        "pmaddwd 32(%2),%%mm4\n\t"
+        "movq  8(%1),%%mm1\n\t"
+        "movq  72(%1),%%mm5\n\t"
+        "pmaddwd 8(%2),%%mm1\n\t"
+        "pmaddwd 40(%2),%%mm5\n\t"
+        "movq  16(%1),%%mm2\n\t"
+        "movq  80(%1),%%mm6\n\t"
+        "pmaddwd 16(%2),%%mm2\n\t"
+        "pmaddwd 48(%2),%%mm6\n\t"
+        "movq  24(%1),%%mm3\n\t"
+        "movq  88(%1),%%mm7\n\t"
+        "pmaddwd 24(%2),%%mm3\n\t"
+        "pmaddwd 56(%2),%%mm7\n\t"
         "paddd %%mm1,%%mm0\n\t"
         "paddd %%mm5,%%mm4\n\t"
         "paddd %%mm2,%%mm0\n\t"
@@ -117,28 +117,28 @@ ASMALIGN(4)
         "packssdw %%mm0,%%mm0\n\t"
         "packssdw %%mm4,%%mm4\n\t"
 
-	"movq	(%%edi), %%mm1\n\t"
+	"movq	(%3), %%mm1\n\t"
 	"punpckldq %%mm4, %%mm0\n\t"
 	"pand   "MANGLE(one_null)", %%mm1\n\t"
 	"pand   "MANGLE(null_one)", %%mm0\n\t"
 	"por    %%mm0, %%mm1\n\t"
-	"movq   %%mm1,(%%edi)\n\t"
+	"movq   %%mm1,(%3)\n\t"
 
-        "add $64,%%esi\n\t"
-        "add $128,%%edx\n\t"
-        "add $8,%%edi\n\t"
+        "add $64,%2\n\t"
+        "add $128,%1\n\t"
+        "add $8,%3\n\t"
 
-	"decl %%ecx\n\t"
+	"decl %0\n\t"
         "jnz  .L03\n\t"
 
-        "movq  (%%edx),%%mm0\n\t"
-        "pmaddwd (%%esi),%%mm0\n\t"
-        "movq  8(%%edx),%%mm1\n\t"
-        "pmaddwd 8(%%esi),%%mm1\n\t"
-        "movq  16(%%edx),%%mm2\n\t"
-        "pmaddwd 16(%%esi),%%mm2\n\t"
-        "movq  24(%%edx),%%mm3\n\t"
-        "pmaddwd 24(%%esi),%%mm3\n\t"
+        "movq  (%1),%%mm0\n\t"
+        "pmaddwd (%2),%%mm0\n\t"
+        "movq  8(%1),%%mm1\n\t"
+        "pmaddwd 8(%2),%%mm1\n\t"
+        "movq  16(%1),%%mm2\n\t"
+        "pmaddwd 16(%2),%%mm2\n\t"
+        "movq  24(%1),%%mm3\n\t"
+        "pmaddwd 24(%2),%%mm3\n\t"
         "paddd %%mm1,%%mm0\n\t"
         "paddd %%mm2,%%mm0\n\t"
         "paddd %%mm3,%%mm0\n\t"
@@ -148,30 +148,30 @@ ASMALIGN(4)
         "psrad $13,%%mm0\n\t"
         "packssdw %%mm0,%%mm0\n\t"
         "movd %%mm0,%%eax\n\t"
-	"movw %%ax, (%%edi)\n\t"
-        "sub $32,%%esi\n\t"
-        "add $64,%%edx\n\t"
-        "add $4,%%edi\n\t"               
+	"movw %%ax, (%3)\n\t"
+        "sub $32,%2\n\t"
+        "add $64,%1\n\t"
+        "add $4,%3\n\t"
 
-        "movl $7,%%ecx\n\t"
+        "movl $7,%0\n\t"
 ASMALIGN(4)
 ".L04:\n\t"
-        "movq  (%%edx),%%mm0\n\t"
-        "movq  64(%%edx),%%mm4\n\t"
-        "pmaddwd (%%esi),%%mm0\n\t"
-        "pmaddwd -32(%%esi),%%mm4\n\t"
-        "movq  8(%%edx),%%mm1\n\t"
-        "movq  72(%%edx),%%mm5\n\t"
-        "pmaddwd 8(%%esi),%%mm1\n\t"
-        "pmaddwd -24(%%esi),%%mm5\n\t"
-        "movq  16(%%edx),%%mm2\n\t"
-        "movq  80(%%edx),%%mm6\n\t"
-        "pmaddwd 16(%%esi),%%mm2\n\t"
-        "pmaddwd -16(%%esi),%%mm6\n\t"
-        "movq  24(%%edx),%%mm3\n\t"
-        "movq  88(%%edx),%%mm7\n\t"
-        "pmaddwd 24(%%esi),%%mm3\n\t"
-        "pmaddwd -8(%%esi),%%mm7\n\t"
+        "movq  (%1),%%mm0\n\t"
+        "movq  64(%1),%%mm4\n\t"
+        "pmaddwd (%2),%%mm0\n\t"
+        "pmaddwd -32(%2),%%mm4\n\t"
+        "movq  8(%1),%%mm1\n\t"
+        "movq  72(%1),%%mm5\n\t"
+        "pmaddwd 8(%2),%%mm1\n\t"
+        "pmaddwd -24(%2),%%mm5\n\t"
+        "movq  16(%1),%%mm2\n\t"
+        "movq  80(%1),%%mm6\n\t"
+        "pmaddwd 16(%2),%%mm2\n\t"
+        "pmaddwd -16(%2),%%mm6\n\t"
+        "movq  24(%1),%%mm3\n\t"
+        "movq  88(%1),%%mm7\n\t"
+        "pmaddwd 24(%2),%%mm3\n\t"
+        "pmaddwd -8(%2),%%mm7\n\t"
         "paddd %%mm1,%%mm0\n\t"
         "paddd %%mm5,%%mm4\n\t"
         "paddd %%mm2,%%mm0\n\t"
@@ -193,27 +193,27 @@ ASMALIGN(4)
         "psubsw %%mm1,%%mm0\n\t"
         "psubsw %%mm5,%%mm4\n\t"
 
-	"movq	(%%edi), %%mm1\n\t"
+	"movq	(%3), %%mm1\n\t"
 	"punpckldq %%mm4, %%mm0\n\t"
 	"pand   "MANGLE(one_null)", %%mm1\n\t"
 	"pand   "MANGLE(null_one)", %%mm0\n\t"
 	"por    %%mm0, %%mm1\n\t"
-	"movq   %%mm1,(%%edi)\n\t"
+	"movq   %%mm1,(%3)\n\t"
 
-        "sub $64,%%esi\n\t"
-        "add $128,%%edx\n\t"
-        "add $8,%%edi\n\t"
-        "decl %%ecx\n\t"
+        "sub $64,%2\n\t"
+        "add $128,%1\n\t"
+        "add $8,%3\n\t"
+        "decl %0\n\t"
 	"jnz  .L04\n\t"
 
-        "movq  (%%edx),%%mm0\n\t"
-        "pmaddwd (%%esi),%%mm0\n\t"
-        "movq  8(%%edx),%%mm1\n\t"
-        "pmaddwd 8(%%esi),%%mm1\n\t"
-        "movq  16(%%edx),%%mm2\n\t"
-        "pmaddwd 16(%%esi),%%mm2\n\t"
-        "movq  24(%%edx),%%mm3\n\t"
-        "pmaddwd 24(%%esi),%%mm3\n\t"
+        "movq  (%1),%%mm0\n\t"
+        "pmaddwd (%2),%%mm0\n\t"
+        "movq  8(%1),%%mm1\n\t"
+        "pmaddwd 8(%2),%%mm1\n\t"
+        "movq  16(%1),%%mm2\n\t"
+        "pmaddwd 16(%2),%%mm2\n\t"
+        "movq  24(%1),%%mm3\n\t"
+        "pmaddwd 24(%2),%%mm3\n\t"
         "paddd %%mm1,%%mm0\n\t"
         "paddd %%mm2,%%mm0\n\t"
         "paddd %%mm3,%%mm0\n\t"
@@ -225,9 +225,9 @@ ASMALIGN(4)
         "psubd %%mm0,%%mm0\n\t"
         "psubsw %%mm1,%%mm0\n\t"
         "movd %%mm0,%%eax\n\t"
-	"movw %%ax,(%%edi)\n\t"
+	"movw %%ax,(%3)\n\t"
 	"emms\n\t"
-	:"+c"(i), "+d"(window), "+S"(b0), "+D"(samples)
+	:"+r"(i), "+r"(window), "+r"(b0), "+r"(samples)
 	:
 	:"memory", "%eax");
     return 0;



More information about the MPlayer-cvslog mailing list