> include/asm/rwsem.h: In function `diFree': > include/asm/rwsem.h:169: inconsistent operand constraints in an `asm' > > seems that sem->count is not referenced in the asm. > > This: > > --- linux-2.5.6/include/asm-i386/rwsem.h Tue Feb 19 18:11:01 2002 > +++ 25/include/asm-i386/rwsem.h Sat Mar 9 14:37:35 2002 > @@ -164,7 +164,7 @@ LOCK_PREFIX " xadd %%edx,(%%eax)\n > " jmp 1b\n" > LOCK_SECTION_END > "# ending __up_read\n" > - : "+m"(sem->count), "+d"(tmp) > + : /*"+m"(sem->count),*/ "+d"(tmp) > : "a"(sem) > : "memory", "cc"); > } > > made it compile. Haven't tested it yet though....
It _is_ referenced in the asm. In the "xadd", the "(%%eax)" is sem->count, and also the slow-path function (rwsem_wake) may modify it, so you must not remove this constraint. What version of the compiler are you using? It may be having a problem because there are two "+" constraints in the output list. Having consulted one of our gcc guys, I require both the "+m" constraint _and_ the "memory" constraint. You might try splitting the contraint into a "=" version in the o/p list and a reference to it in the i/p list, but beware, this may modify the behaviour of the compiler unexpectedly (I know it shouldn't). You can replace the (%%eax) with %0, I suppose, and %%edx with %1, but I found that it was harder to follow the ASM just by looking at it when I did that:-/ David _______________________________________________ Jfs-discussion mailing list [EMAIL PROTECTED] http://www-124.ibm.com/developerworks/oss/mailman/listinfo/jfs-discussion
