X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=dehuff.h;h=2669034554c25fb16362ace9879f5fa280be9592;hb=03497d9a2c6de19c6b8a0761b2703ca61b174e2a;hp=7621f6095e99791feb6138e81c2574ae9dda6bce;hpb=a4009687c73083dd0290285a065740a83e27e855;p=fjl diff --git a/dehuff.h b/dehuff.h index 7621f60..2669034 100644 --- a/dehuff.h +++ b/dehuff.h @@ -86,10 +86,9 @@ static inline unsigned extend(int val, unsigned bits) #if defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__)) // GCC should ideally be able to figure out that the conditional move is better, but // it doesn't for various reasons, and this is pretty important for speed, so we hardcode. - asm("cmp %2, %0 ; cmovl %3, %0" - : "=r" (val) - : "0" (val), - "g" (bit_thresholds[bits]), + asm("cmp %1, %0 ; cmovl %2, %0" + : "+r" (val) + : "g" (bit_thresholds[bits]), "r" (val + (-1 << bits) + 1) : "cc"); return val;