Commit a51c4097 by Andrew Pinski Committed by Andrew Pinski

re PR libstdc++/13480 (bits/atomicity.h:56: warning: read-write constraint does…

re PR libstdc++/13480 (bits/atomicity.h:56: warning: read-write constraint does not allow a register)

2003-12-24  Andrew Pinski  <pinskia@physics.uc.edu>

        PR libstdc++/13480
        * config/cpu/i486/atomicity.h: Split up read-write memory operand.

From-SVN: r75016
parent 015fde0a
2003-12-24 Andrew Pinski <pinskia@physics.uc.edu>
PR libstdc++/13480
* config/cpu/i486/atomicity.h: Split up read-write memory operand.
2003-12-23 Benjamin Kosnik <bkoz@redhat.com> 2003-12-23 Benjamin Kosnik <bkoz@redhat.com>
* include/ext/new_allocator.h (new_allocator): Proper allocator class. * include/ext/new_allocator.h (new_allocator): Proper allocator class.
......
...@@ -52,8 +52,9 @@ __exchange_and_add(volatile _Atomic_word* __mem, int __val) ...@@ -52,8 +52,9 @@ __exchange_and_add(volatile _Atomic_word* __mem, int __val)
/* obtain the atomic exchange/add spin lock */ /* obtain the atomic exchange/add spin lock */
do { do {
__asm__ __volatile__ ("xchg{l} {%0,%1|%1,%0}" __asm__ __volatile__ ("xchg{l} {%0,%1|%1,%0}"
: "+m" (__Atomicity_lock<0>::_S_atomicity_lock), : "m" (__Atomicity_lock<0>::_S_atomicity_lock),
"+r" (__tmp)); "+r" (__tmp)
: "m" (__Atomicity_lock<0>::_S_atomicity_lock));
} while (__tmp); } while (__tmp);
__result = *__mem; __result = *__mem;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment