This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: locking problem with mips atomicity


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~


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]