Re: [Jfs-discussion] Re: rwsems, jfs, kernel 2.5.6
Brought to you by:
blaschke-oss,
shaggyk
From: David H. <dho...@re...> - 2002-03-21 10:33:59
|
> As "tmp" is not referenced after the assembly, I removed it from the > output list and added it to the input list. This appears to fix it. Do > you see anything wrong with removing tmp from the output list? Yes. You've told the compiler that the value in tmp hasn't changed and so it is free to re-use it. The way to do it is just to use the "=" constraint and split the "d" register value: "# ending __up_read\n" - : "+m"(sem->count), "+d"(tmp) - : "a"(sem) + : "+m"(sem->count), "=d"(tmp) + : "a"(sem), "1"(tmp) : "memory", "cc"); However, if I remember rightly, this has some other adverse side effects on the compiler:-( But it is the only other way to do it. David |