All pastes #82716 Raw Edit

Something

public text v1 · immutable
·published 2006-07-08 21:29 UTC
rendered paste body
        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
                "
                : "=m"  (b)         // %0
                :"m"    (a),        // %1
                 "m"    (dst),          // %2
                 "m"    (len)           // %3
                ");