Commit 079c384c by Franz Sirl Committed by Franz Sirl

atomicity.h (__exchange_and_add): Add __volatile__ to asm.

	2000-11-27  Franz Sirl  <Franz.Sirl-kernel@lauterbach.com>
	* config/cpu/arm/bits/atomicity.h (__exchange_and_add): Add
	__volatile__ to asm.
	(__atomic_add): Likewise.
	(__compare_and_swap): Likewise.
	(__always_swap): Likewise.
	(__test_and_set): Likewise.

From-SVN: r37805
parent 6a6b1628
2000-11-27 Franz Sirl <Franz.Sirl-kernel@lauterbach.com> 2000-11-27 Franz Sirl <Franz.Sirl-kernel@lauterbach.com>
* config/cpu/arm/bits/atomicity.h (__exchange_and_add): Add
__volatile__ to asm.
(__atomic_add): Likewise.
(__compare_and_swap): Likewise.
(__always_swap): Likewise.
(__test_and_set): Likewise.
* config/cpu/powerpc/bits/atomicity.h: Replace '__ATOMICITY_INLINE' * config/cpu/powerpc/bits/atomicity.h: Replace '__ATOMICITY_INLINE'
with 'inline'. with 'inline'.
(__ex__atomic_add): Add __volatile__ to asm. (__exchange_and_add): Add __volatile__ to asm.
(__atomic_add): Likewise. (__atomic_add): Likewise.
(__compare_and_swap): Likewise. (__compare_and_swap): Likewise.
(__always_swap): Likewise. (__always_swap): Likewise.
......
...@@ -27,7 +27,7 @@ __attribute__ ((__unused__)) ...@@ -27,7 +27,7 @@ __attribute__ ((__unused__))
__exchange_and_add (volatile _Atomic_word* __mem, int __val) __exchange_and_add (volatile _Atomic_word* __mem, int __val)
{ {
_Atomic_word __tmp, __tmp2, __result; _Atomic_word __tmp, __tmp2, __result;
__asm__ ("\ __asm__ __volatile__ ("\
0: ldr %0,[%3] 0: ldr %0,[%3]
add %1,%0,%4 add %1,%0,%4
swp %2,%1,[%3] swp %2,%1,[%3]
...@@ -45,7 +45,7 @@ __attribute__ ((__unused__)) ...@@ -45,7 +45,7 @@ __attribute__ ((__unused__))
__atomic_add (volatile _Atomic_word *__mem, int __val) __atomic_add (volatile _Atomic_word *__mem, int __val)
{ {
_Atomic_word __tmp, __tmp2, __tmp3; _Atomic_word __tmp, __tmp2, __tmp3;
__asm__ ("\ __asm__ __volatile__ ("\
0: ldr %0,[%3] 0: ldr %0,[%3]
add %1,%0,%4 add %1,%0,%4
swp %2,%1,[%3] swp %2,%1,[%3]
...@@ -63,7 +63,7 @@ __compare_and_swap (volatile long *__p, long __oldval, long __newval) ...@@ -63,7 +63,7 @@ __compare_and_swap (volatile long *__p, long __oldval, long __newval)
{ {
int __result; int __result;
long __tmp; long __tmp;
__asm__ ("\ __asm__ __volatile__ ("\
0: ldr %1,[%2] 0: ldr %1,[%2]
mov %0,#0 mov %0,#0
cmp %1,%4 cmp %1,%4
...@@ -85,7 +85,7 @@ __attribute__ ((__unused__)) ...@@ -85,7 +85,7 @@ __attribute__ ((__unused__))
__always_swap (volatile long *__p, long __newval) __always_swap (volatile long *__p, long __newval)
{ {
long __result; long __result;
__asm__ ("\ __asm__ __volatile__ ("\
swp %0,%2,[%1] swp %0,%2,[%1]
" : "=&r"(__result) : "r"(__p), "r"(__newval) : "memory"); " : "=&r"(__result) : "r"(__p), "r"(__newval) : "memory");
return __result; return __result;
...@@ -97,7 +97,7 @@ __test_and_set (volatile long *__p, long __newval) ...@@ -97,7 +97,7 @@ __test_and_set (volatile long *__p, long __newval)
{ {
int __result; int __result;
long __tmp; long __tmp;
__asm__ ("\ __asm__ __volatile__ ("\
0: ldr %0,[%2] 0: ldr %0,[%2]
cmp %0,#0 cmp %0,#0
bne 1f bne 1f
......
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