comparison cabac.h @ 3982:af16271634c2 libavcodec

moving another bit&1 out, this is as fast as with it in there, but it makes more sense with it outside of the loop
author michael
date Tue, 10 Oct 2006 06:56:51 +0000
parents 9854f686ba79
children bb186452e7da
comparison
equal deleted inserted replaced
3981:9854f686ba79 3982:af16271634c2
439 "shll %%cl , %%esi \n\t" 439 "shll %%cl , %%esi \n\t"
440 "addl %%esi, %%ebx \n\t" 440 "addl %%esi, %%ebx \n\t"
441 "2: \n\t" 441 "2: \n\t"
442 "movl %%edx, "RANGE "(%2) \n\t" 442 "movl %%edx, "RANGE "(%2) \n\t"
443 "movl %%ebx, "LOW "(%2) \n\t" 443 "movl %%ebx, "LOW "(%2) \n\t"
444 "andl $1, %%eax \n\t"
445
446 :"=&a"(bit) //FIXME this is fragile gcc either runs out of registers or misscompiles it (for example if "+a"(bit) or "+m"(*state) is used 444 :"=&a"(bit) //FIXME this is fragile gcc either runs out of registers or misscompiles it (for example if "+a"(bit) or "+m"(*state) is used
447 :"r"(state), "r"(c) 445 :"r"(state), "r"(c)
448 : "%ecx", "%ebx", "%edx", "%esi" 446 : "%ecx", "%ebx", "%edx", "%esi"
449 ); 447 );
448 bit&=1;
450 #else 449 #else
451 asm volatile( 450 asm volatile(
452 "movzbl (%1), %%eax \n\t" 451 "movzbl (%1), %%eax \n\t"
453 "movl "RANGE "(%2), %%ebx \n\t" 452 "movl "RANGE "(%2), %%ebx \n\t"
454 "movl "RANGE "(%2), %%edx \n\t" 453 "movl "RANGE "(%2), %%edx \n\t"