--- SDLcam-0.7.3/filter/Absdiff.c.orig Sun Aug 25 23:54:47 2002 +++ SDLcam-0.7.3/filter/Absdiff.c Wed Sep 3 14:29:03 2003 @@ -33,53 +33,52 @@ #ifdef MMX /* {{{ D = [A-B] OR [B-A] ; [] mean sturated to 0 */ if (len < 8) return 0; // image size must be at least 8 bytes - asm volatile (" - push %%ebx - push %%ecx - push %%esi - push %%edi - mov %3, %%ecx - mov %2, %%edi - mov %1, %%ebx - mov %0, %%esi - shr $5, %%ecx - .align 16 - .absdiff_MMX: - movq (%%esi), %%mm0 - movq 8(%%esi), %%mm1 - movq 16(%%esi), %%mm2 - movq 24(%%esi), %%mm3 - movq (%%ebx), %%mm4 - movq 8(%%ebx), %%mm5 - movq 16(%%ebx), %%mm6 - movq 24(%%ebx), %%mm7 - psubusb %%mm4 , %%mm0 - psubusb %%mm5 , %%mm1 - psubusb %%mm6 , %%mm2 - psubusb %%mm7 , %%mm3 - psubusb (%%esi), %%mm4 - psubusb 8(%%esi), %%mm5 - psubusb 16(%%esi), %%mm6 - psubusb 24(%%esi), %%mm7 - por %%mm4 , %%mm0 - por %%mm5 , %%mm1 - por %%mm6 , %%mm2 - por %%mm7 , %%mm3 - movq %%mm0, (%%edi) - movq %%mm1, 8(%%edi) - movq %%mm2, 16(%%edi) - movq %%mm3, 24(%%edi) - add $32, %%esi - add $32, %%edi - add $32, %%ebx - dec %%ecx - jnz .absdiff_MMX - emms - pop %%edi - pop %%esi - pop %%ecx - pop %%ebx - " + asm volatile ( +" push %%ebx\n" +" push %%ecx\n" +" push %%esi\n" +" push %%edi\n" +" mov %3, %%ecx\n" +" mov %2, %%edi\n" +" mov %1, %%ebx\n" +" mov %0, %%esi\n" +" shr $5, %%ecx\n" +" .align 16\n" +" .absdiff_MMX:\n" +" movq (%%esi), %%mm0\n" +" movq 8(%%esi), %%mm1\n" +" movq 16(%%esi), %%mm2\n" +" movq 24(%%esi), %%mm3\n" +" movq (%%ebx), %%mm4\n" +" movq 8(%%ebx), %%mm5\n" +" movq 16(%%ebx), %%mm6\n" +" movq 24(%%ebx), %%mm7\n" +" psubusb %%mm4 , %%mm0\n" +" psubusb %%mm5 , %%mm1\n" +" psubusb %%mm6 , %%mm2\n" +" psubusb %%mm7 , %%mm3\n" +" psubusb (%%esi), %%mm4\n" +" psubusb 8(%%esi), %%mm5\n" +" psubusb 16(%%esi), %%mm6\n" +" psubusb 24(%%esi), %%mm7\n" +" por %%mm4 , %%mm0\n" +" por %%mm5 , %%mm1\n" +" por %%mm6 , %%mm2\n" +" por %%mm7 , %%mm3\n" +" movq %%mm0, (%%edi)\n" +" movq %%mm1, 8(%%edi)\n" +" movq %%mm2, 16(%%edi)\n" +" movq %%mm3, 24(%%edi)\n" +" add $32, %%esi\n" +" add $32, %%edi\n" +" add $32, %%ebx\n" +" dec %%ecx\n" +" jnz .absdiff_MMX\n" +" emms\n" +" pop %%edi\n" +" pop %%esi\n" +" pop %%ecx\n" +" pop %%ebx" : "=m" (b) // %0 :"m" (a), // %1 "m" (dst), // %2