locking problem with mips atomicity

Richard Henderson rth@redhat.com
Tue Mar 16 23:27:00 GMT 2004


On Tue, Mar 16, 2004 at 02:44:15PM -0800, Michael Eager wrote:
> Well, that's surprising.  I was able to get rid of all of the 
> other changes. 

Not ok.  It's not *required* that the compiler reduce all of the
addresses for you.  In particular, this is more likely to fail
without optimization.

> -       : "m" (*__mem), "r"(__val));
> +       : "m" (*__mem), "r"(__val), "r"(__mem));

In addition to just adding the new argument, you have to actually
use it in the assembly.


r~



More information about the Gcc mailing list