From: Jaroslav Kysela Date: Tue, 16 Jun 2009 18:10:19 +0000 (+0200) Subject: pcm dmix plugin: fix MIX_AREAS_24 routine for i386 & x86_64 platforms X-Git-Tag: v1.0.21~32^2~2 X-Git-Url: https://git.alsa-project.org/?a=commitdiff_plain;h=e94f3cfdf951034693a9b9fc1f8b7190317779ad;p=alsa-lib.git pcm dmix plugin: fix MIX_AREAS_24 routine for i386 & x86_64 platforms The code was copied from ALSA bug#4577 from CannibalZerg. Signed-off-by: Jaroslav Kysela --- diff --git a/src/pcm/pcm_dmix_i386.h b/src/pcm/pcm_dmix_i386.h index 9ea155d9..462371a5 100644 --- a/src/pcm/pcm_dmix_i386.h +++ b/src/pcm/pcm_dmix_i386.h @@ -400,8 +400,8 @@ static void MIX_AREAS_24(unsigned int size, "\tmovzwl (%%esi), %%ecx\n" "\tmovl (%%ebx), %%edx\n" "\tsall $16, %%eax\n" + "\torl %%eax, %%ecx\n" "\t" LOCK_PREFIX "btsw $0, (%%edi)\n" - "\tleal (%%ecx,%%eax,1), %%ecx\n" "\tjc 2f\n" "\t" XSUB " %%edx, %%ecx\n" "2:" diff --git a/src/pcm/pcm_dmix_x86_64.h b/src/pcm/pcm_dmix_x86_64.h index b4d0a412..ab40f50a 100644 --- a/src/pcm/pcm_dmix_x86_64.h +++ b/src/pcm/pcm_dmix_x86_64.h @@ -284,11 +284,11 @@ static void MIX_AREAS_24(unsigned int size, * *sum += sample; */ "\tmovsbl 2(%%rsi), %%eax\n" - "\tmovswl (%%rsi), %%ecx\n" + "\tmovzwl (%%rsi), %%ecx\n" "\tmovl (%%rbx), %%edx\n" "\tsall $16, %%eax\n" + "\torl %%eax, %%ecx\n" "\t" LOCK_PREFIX "btsw $0, (%%rdi)\n" - "\t.byte 0x67, 0x8d, 0x0c, 0x01\n" "\tjc 2f\n" "\t" XSUB " %%edx, %%ecx\n" "2:"