From: Andi Kleen Date: Wed, 27 Sep 2006 19:38:56 +0000 (+0200) Subject: [PATCH] i386: Use early clobbers for semaphores now X-Git-Tag: v2.6.19-rc1~900 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=00463c1633b6d6a2178d2dc794c0a70ac2f9ce6b;p=linux-2.6-omap-h63xx.git [PATCH] i386: Use early clobbers for semaphores now The new code does clobber the result early, so make sure to tell gcc to not put it into the same register as a input argument Signed-off-by: Andi Kleen Cc: Andrew Morton Acked-by: Kyle McMartin Signed-off-by: Linus Torvalds --- diff --git a/include/asm-i386/semaphore.h b/include/asm-i386/semaphore.h index e63b6a68f04..4e34a468c38 100644 --- a/include/asm-i386/semaphore.h +++ b/include/asm-i386/semaphore.h @@ -126,7 +126,7 @@ static inline int down_interruptible(struct semaphore * sem) "lea %1,%%eax\n\t" "call __down_failed_interruptible\n" "2:" - :"=a" (result), "+m" (sem->count) + :"=&a" (result), "+m" (sem->count) : :"memory"); return result; @@ -148,7 +148,7 @@ static inline int down_trylock(struct semaphore * sem) "lea %1,%%eax\n\t" "call __down_failed_trylock\n\t" "2:\n" - :"=a" (result), "+m" (sem->count) + :"=&a" (result), "+m" (sem->count) : :"memory"); return result;