" jmp 1b\n"
LOCK_SECTION_END
"# ending down_read\n\t"
- : "+m"(sem->count)
- : "a"(sem)
+ : "=m"(sem->count)
+ : "a"(sem), "m"(sem->count)
: "memory", "cc");
}
tmp = RWSEM_ACTIVE_WRITE_BIAS;
__asm__ __volatile__(
"# beginning down_write\n\t"
-LOCK_PREFIX " xadd %0,(%%eax)\n\t" /* subtract 0x0000ffff, returns the old value */
- " testl %0,%0\n\t" /* was the count 0 before? */
+LOCK_PREFIX " xadd %%edx,(%%eax)\n\t" /* subtract 0x0000ffff, returns the old value */
+ " testl %%edx,%%edx\n\t" /* was the count 0 before? */
" jnz 2f\n\t" /* jump if we weren't granted the lock */
"1:\n\t"
LOCK_SECTION_START("")
" jmp 1b\n"
LOCK_SECTION_END
"# ending down_write"
- : "+d"(tmp), "+m"(sem->count)
- : "a"(sem)
+ : "=m"(sem->count), "=d"(tmp)
+ : "a"(sem), "1"(tmp), "m"(sem->count)
: "memory", "cc");
}
" jmp 1b\n"
LOCK_SECTION_END
"# ending __up_read\n"
- : /*"+m"(sem->count),*/ "+d"(tmp)
- : "a"(sem)
+ : "=m"(sem->count), "=d"(tmp)
+ : "a"(sem), "1"(tmp), "m"(sem->count)
: "memory", "cc");
}
" jmp 1b\n"
LOCK_SECTION_END
"# ending __up_write\n"
- : "+m"(sem->count)
- : "a"(sem), "i"(-RWSEM_ACTIVE_WRITE_BIAS)
+ : "=m"(sem->count)
+ : "a"(sem), "i"(-RWSEM_ACTIVE_WRITE_BIAS), "m"(sem->count)
: "memory", "cc", "edx");
}
{
__asm__ __volatile__(
LOCK_PREFIX "addl %1,%0"
- :"=m"(sem->count)
- :"ir"(delta), "m"(sem->count));
+ : "=m"(sem->count)
+ : "ir"(delta), "m"(sem->count));
}
/*