Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/Unity-Technologies/libatomic_ops.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIvan Maidanski <ivmai@mail.ru>2013-03-13 22:46:24 +0400
committerIvan Maidanski <ivmai@mail.ru>2013-03-13 22:47:34 +0400
commita965c42c90e5d5faf84d57cefae27bb2c5fce30a (patch)
tree39a956e6eac55e99dcc7426f9fb19bcd3e88ea64
parentfc0db46e8679904365df8a464061c144d515160d (diff)
Fix asm constraint of CAS memory operand for gcc/alpha
* src/atomic_ops/sysdeps/gcc/alpha.h (AO_compare_and_swap): Use "+m" asm constraint for *addr instead of "=m" (because the value pointed by addr is read and written by the code).
-rw-r--r--src/atomic_ops/sysdeps/gcc/alpha.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/atomic_ops/sysdeps/gcc/alpha.h b/src/atomic_ops/sysdeps/gcc/alpha.h
index 8ce67a0..3b98bec 100644
--- a/src/atomic_ops/sysdeps/gcc/alpha.h
+++ b/src/atomic_ops/sysdeps/gcc/alpha.h
@@ -57,7 +57,7 @@ AO_compare_and_swap(volatile AO_t *addr,
" stq_c %0,%1\n"
" beq %0,1b\n"
"2:\n"
- :"=&r" (temp), "=m" (*addr), "=&r" (was_equal)
+ : "=&r" (temp), "+m" (*addr), "=&r" (was_equal)
: "r" (new_val), "Ir" (old)
:"memory");
return (int)was_equal;