Mercurial > mplayer.hg
changeset 23360:57a99b0631b2
Remove hardcoded registers
author | zuxy |
---|---|
date | Wed, 23 May 2007 15:31:37 +0000 |
parents | 48004718b734 |
children | 705f72c9a0f6 |
files | mp3lib/decode_MMX.c |
diffstat | 1 files changed, 67 insertions(+), 67 deletions(-) [+] |
line wrap: on
line diff
--- a/mp3lib/decode_MMX.c Tue May 22 20:08:13 2007 +0000 +++ b/mp3lib/decode_MMX.c Wed May 23 15:31:37 2007 +0000 @@ -84,22 +84,22 @@ __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 @@ "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 @@ "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 @@ "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 @@ "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;