aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2018-10-31 12:00:02 -0700
committerChris Robinson <[email protected]>2018-10-31 12:00:02 -0700
commit4d422dfb24ac4668050ad7266198966788fac9f1 (patch)
treeb73b260fe7828bd3e8f60cfb61de0750a4130d3f
parent624bc1c839ff892759e4432bfcf39f2d3343a1ee (diff)
Fix some backup atomic macros
-rw-r--r--common/atomic.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/common/atomic.h b/common/atomic.h
index d28298f2..17e616bb 100644
--- a/common/atomic.h
+++ b/common/atomic.h
@@ -163,26 +163,26 @@ enum almemory_order {
#elif defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__))
#define WRAP_ADD(S, ret, dest, incr) __asm__ __volatile__( \
- "lock; xadd"S" %0,(%1)" \
+ "lock; xadd" S " %0,(%1)" \
: "=r" (ret) \
: "r" (dest), "0" (incr) \
: "memory" \
)
#define WRAP_SUB(S, ret, dest, decr) __asm__ __volatile__( \
- "lock; xadd"S" %0,(%1)" \
+ "lock; xadd" S " %0,(%1)" \
: "=r" (ret) \
: "r" (dest), "0" (-(decr)) \
: "memory" \
)
#define WRAP_XCHG(S, ret, dest, newval) __asm__ __volatile__( \
- "lock; xchg"S" %0,(%1)" \
+ "lock; xchg" S " %0,(%1)" \
: "=r" (ret) \
: "r" (dest), "0" (newval) \
: "memory" \
)
#define WRAP_CMPXCHG(S, ret, dest, oldval, newval) __asm__ __volatile__( \
- "lock; cmpxchg"S" %2,(%1)" \
+ "lock; cmpxchg" S " %2,(%1)" \
: "=a" (ret) \
: "r" (dest), "r" (newval), "0" (oldval) \
: "memory" \