I looked at generated code in cases where it originally failed, and
generated code looks OK to me.
Thanks,
Petr Vandrovec
vandrove@vc.cvut.cz
diff -urdN linux/include/asm-i386/rwsem.h linux/include/asm-i386/rwsem.h
--- linux/include/asm-i386/rwsem.h Fri Apr 27 22:48:24 2001
+++ linux/include/asm-i386/rwsem.h Wed May 9 16:31:57 2001
@@ -148,9 +148,9 @@
*/
static inline void __up_read(struct rw_semaphore *sem)
{
- __s32 tmp = -RWSEM_ACTIVE_READ_BIAS;
__asm__ __volatile__(
"# beginning __up_read\n\t"
+ " movl %2,%%edx\n\t"
LOCK_PREFIX " xadd %%edx,(%%eax)\n\t" /* subtracts 1, returns the old value */
" js 2f\n\t" /* jump if the lock is being waited upon */
"1:\n\t"
@@ -164,9 +164,9 @@
" jmp 1b\n"
".previous\n"
"# ending __up_read\n"
- : "+m"(sem->count), "+d"(tmp)
- : "a"(sem)
- : "memory", "cc");
+ : "+m"(sem->count)
+ : "a"(sem), "i"(-RWSEM_ACTIVE_READ_BIAS)
+ : "memory", "cc", "edx");
}
/*
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/