From 19a58db08afd149a862506936093423db756a2dc Mon Sep 17 00:00:00 2001 From: "Steinar H. Gunderson" Date: Mon, 1 Jun 2009 11:39:16 +0200 Subject: [PATCH] Some asm() correction. --- dehuff.h | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) 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; -- 2.39.2