On Thursday 21 March 2002 07:56 am, David Howells wrote:
> > This doesn't help. It still fails the same way compiling
> > jfs_imap.c.
>
> Try splitting the "+m" too.
I tried something else first, and it seems to work. I got rid of the
tmp variable altogether and implemented to look more like up_write:
--- include/asm-i386/rwsem.h.orig Mon Feb 25 14:59:07 2002
+++ include/asm-i386/rwsem.h Thu Mar 21 07:53:43 2002
@@ -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"
LOCK_SECTION_END
"# 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");
}
/*
_______________________________________________
Jfs-discussion mailing list
[EMAIL PROTECTED]
http://www-124.ibm.com/developerworks/oss/mailman/listinfo/jfs-discussion