Cleanups, returned zero size checking

This commit is contained in:
Jaroslav Kysela 2004-03-12 12:41:06 +00:00
parent dcc1bcc115
commit 795a7f9f0b

View file

@ -52,7 +52,9 @@ static void MIX_AREAS1(unsigned int size,
"\tmovl %1, %%edi\n" "\tmovl %1, %%edi\n"
"\tmovl %2, %%esi\n" "\tmovl %2, %%esi\n"
"\tmovl %3, %%ebx\n" "\tmovl %3, %%ebx\n"
"\tjmp 2f\n" "\tcmpl $0, %0\n"
"\tjnz 2f\n"
"\tjmp 7f\n"
/* /*
@ -73,9 +75,8 @@ static void MIX_AREAS1(unsigned int size,
*/ */
"2:" "2:"
"\txor %%ax, %%ax\n" "\tmovw $0, %%ax\n"
"\tmovw %%ax, %%cx\n" "\tmovw $1, %%cx\n"
"\tincw %%cx\n"
"\tmovl (%%ebx), %%edx\n" "\tmovl (%%ebx), %%edx\n"
"\t" LOCK_PREFIX "cmpxchgw %%cx, (%%edi)\n" "\t" LOCK_PREFIX "cmpxchgw %%cx, (%%edi)\n"
"\tmovswl (%%esi), %%ecx\n" "\tmovswl (%%esi), %%ecx\n"
@ -106,8 +107,8 @@ static void MIX_AREAS1(unsigned int size,
* while (size-- > 0) * while (size-- > 0)
*/ */
"\tdecl %0\n" "\tdecl %0\n"
"\tjz 7f\n" "\tjnz 1b\n"
"\tjmp 1b\n" "\tjmp 7f\n"
/* /*
* sample > 0x7fff * sample > 0x7fff
@ -171,7 +172,9 @@ static void MIX_AREAS1_MMX(unsigned int size,
"\tmovl %1, %%edi\n" "\tmovl %1, %%edi\n"
"\tmovl %2, %%esi\n" "\tmovl %2, %%esi\n"
"\tmovl %3, %%ebx\n" "\tmovl %3, %%ebx\n"
"\tjmp 2f\n" "\tcmpl $0, %0\n"
"\tjnz 2f\n"
"\tjmp 5f\n"
"\t.p2align 4,,15\n" "\t.p2align 4,,15\n"
"1:" "1:"
@ -187,9 +190,8 @@ static void MIX_AREAS1_MMX(unsigned int size,
* sample -= sum_sample; * sample -= sum_sample;
* xadd(*sum, sample); * xadd(*sum, sample);
*/ */
"\txor %%ax, %%ax\n" "\tmovw $0, %%ax\n"
"\tmovw %%ax, %%cx\n" "\tmovw $1, %%cx\n"
"\tincw %%cx\n"
"\tmovl (%%ebx), %%edx\n" "\tmovl (%%ebx), %%edx\n"
"\t" LOCK_PREFIX "cmpxchgw %%cx, (%%edi)\n" "\t" LOCK_PREFIX "cmpxchgw %%cx, (%%edi)\n"
"\tmovswl (%%esi), %%ecx\n" "\tmovswl (%%esi), %%ecx\n"
@ -221,6 +223,7 @@ static void MIX_AREAS1_MMX(unsigned int size,
"\tdecl %0\n" "\tdecl %0\n"
"\tjnz 1b\n" "\tjnz 1b\n"
"\temms\n" "\temms\n"
"5:"
"\tpop %%ebx\n" /* ebx is GOT pointer (-fPIC) */ "\tpop %%ebx\n" /* ebx is GOT pointer (-fPIC) */
: /* no output regs */ : /* no output regs */
@ -255,6 +258,9 @@ static void MIX_AREAS2(unsigned int size,
"\tmovl %1, %%edi\n" "\tmovl %1, %%edi\n"
"\tmovl %2, %%esi\n" "\tmovl %2, %%esi\n"
"\tmovl %3, %%ebx\n" "\tmovl %3, %%ebx\n"
"\tcmpl $0, %0\n"
"\tjnz 2f\n"
"\tjmp 6f\n"
"\t.p2align 4,,15\n" "\t.p2align 4,,15\n"