# HG changeset patch # User michael # Date 1161305464 0 # Node ID 61a4e7218a454ac39d1fdafebb2088f441f4e68d # Parent 8bbc695c9603702ba0be0511b56236dc675b8ab4 reordering instructions a little in decode_significance_x86() -> 2 instructions less / 1% faster decode_residual on P3 diff -r 8bbc695c9603 -r 61a4e7218a45 cabac.h --- a/cabac.h Fri Oct 20 00:35:54 2006 +0000 +++ b/cabac.h Fri Oct 20 00:51:04 2006 +0000 @@ -684,11 +684,13 @@ "2: \n\t" - BRANCHLESS_GET_CABAC("%0", "%3", "(%1)", "%%ebx", "%%bx", "%%esi", "%%edx", "%%dl") + BRANCHLESS_GET_CABAC("%%edx", "%3", "(%1)", "%%ebx", "%%bx", "%%esi", "%%eax", "%%al") - "test $1, %0 \n\t" + "test $1, %%edx \n\t" " jz 3f \n\t" + BRANCHLESS_GET_CABAC("%%edx", "%3", "61(%1)", "%%ebx", "%%bx", "%%esi", "%%eax", "%%al") + "movl %2, %%eax \n\t" "movl %4, %%ecx \n\t" "addl %1, %%ecx \n\t" @@ -696,9 +698,7 @@ "addl $4, %%eax \n\t" "movl %%eax, %2 \n\t" - BRANCHLESS_GET_CABAC("%0", "%3", "61(%1)", "%%ebx", "%%bx", "%%esi", "%%edx", "%%dl") - - "test $1, %%eax \n\t" + "test $1, %%edx \n\t" " jnz 4f \n\t" "3: \n\t" @@ -710,9 +710,7 @@ "addl %1, %%ecx \n\t" "movl %%ecx, (%%eax) \n\t" "addl $4, %%eax \n\t" - "movl %%eax, %2 \n\t" "4: \n\t" - "movl %2, %%eax \n\t" "addl %6, %%eax \n\t" "shr $2, %%eax \n\t"