@@ -70,10 +70,10 @@ static inline bool opal_atomic_compare_exchange_strong_32(opal_atomic_int32_t *a
70
70
int32_t prev , tmp ;
71
71
bool ret ;
72
72
73
- __asm__ __volatile__("1: ldaxr %w0, [%2] \n"
73
+ __asm__ __volatile__("1: ldaxr %w0, [%2] \n"
74
74
" cmp %w0, %w3 \n"
75
75
" bne 2f \n"
76
- " stxr %w1, %w4, [%2] \n"
76
+ " stlxr %w1, %w4, [%2] \n"
77
77
" cbnz %w1, 1b \n"
78
78
"2: \n"
79
79
: "=&r" (prev ), "=&r" (tmp )
@@ -99,7 +99,7 @@ static inline bool opal_atomic_compare_exchange_strong_acq_32(opal_atomic_int32_
99
99
__asm__ __volatile__("1: ldaxr %w0, [%2] \n"
100
100
" cmp %w0, %w3 \n"
101
101
" bne 2f \n"
102
- " stxr %w1, %w4, [%2] \n"
102
+ " stlxr %w1, %w4, [%2] \n"
103
103
" cbnz %w1, 1b \n"
104
104
"2: \n"
105
105
: "=&r" (prev ), "=&r" (tmp )
@@ -117,7 +117,7 @@ static inline bool opal_atomic_compare_exchange_strong_rel_32(opal_atomic_int32_
117
117
int32_t prev , tmp ;
118
118
bool ret ;
119
119
120
- __asm__ __volatile__("1: ldxr %w0, [%2] \n"
120
+ __asm__ __volatile__("1: ldaxr %w0, [%2] \n"
121
121
" cmp %w0, %w3 \n"
122
122
" bne 2f \n"
123
123
" stlxr %w1, %w4, [%2] \n"
@@ -139,10 +139,10 @@ static inline bool opal_atomic_compare_exchange_strong_64(opal_atomic_int64_t *a
139
139
int tmp ;
140
140
bool ret ;
141
141
142
- __asm__ __volatile__("1: ldaxr %0, [%2] \n"
142
+ __asm__ __volatile__("1: ldaxr %0, [%2] \n"
143
143
" cmp %0, %3 \n"
144
144
" bne 2f \n"
145
- " stxr %w1, %4, [%2] \n"
145
+ " stlxr %w1, %4, [%2] \n"
146
146
" cbnz %w1, 1b \n"
147
147
"2: \n"
148
148
: "=&r" (prev ), "=&r" (tmp )
@@ -169,7 +169,7 @@ static inline bool opal_atomic_compare_exchange_strong_acq_64(opal_atomic_int64_
169
169
__asm__ __volatile__("1: ldaxr %0, [%2] \n"
170
170
" cmp %0, %3 \n"
171
171
" bne 2f \n"
172
- " stxr %w1, %4, [%2] \n"
172
+ " stlxr %w1, %4, [%2] \n"
173
173
" cbnz %w1, 1b \n"
174
174
"2: \n"
175
175
: "=&r" (prev ), "=&r" (tmp )
@@ -188,7 +188,7 @@ static inline bool opal_atomic_compare_exchange_strong_rel_64(opal_atomic_int64_
188
188
int tmp ;
189
189
bool ret ;
190
190
191
- __asm__ __volatile__("1: ldxr %0, [%2] \n"
191
+ __asm__ __volatile__("1: ldaxr %0, [%2] \n"
192
192
" cmp %0, %3 \n"
193
193
" bne 2f \n"
194
194
" stlxr %w1, %4, [%2] \n"
@@ -266,9 +266,9 @@ static inline int64_t opal_atomic_swap_64(opal_atomic_int64_t *addr, int64_t new
266
266
type newval, old; \
267
267
int32_t tmp; \
268
268
\
269
- __asm__ __volatile__("1: ldxr %" reg "1, [%3] \n" \
269
+ __asm__ __volatile__("1: ldaxr %" reg "1, [%3] \n" \
270
270
" " inst " %" reg "0, %" reg "1, %" reg "4 \n" \
271
- " stxr %w2, %" reg "0, [%3] \n" \
271
+ " stlxr %w2, %" reg "0, [%3] \n" \
272
272
" cbnz %w2, 1b \n" \
273
273
: "=&r"(newval), "=&r"(old), "=&r"(tmp) \
274
274
: "r"(addr), "r"(value) \
@@ -282,9 +282,9 @@ static inline int64_t opal_atomic_swap_64(opal_atomic_int64_t *addr, int64_t new
282
282
type newval, old; \
283
283
int32_t tmp; \
284
284
\
285
- __asm__ __volatile__("1: ldxr %" reg "1, [%3] \n" \
285
+ __asm__ __volatile__("1: ldaxr %" reg "1, [%3] \n" \
286
286
" " inst " %" reg "0, %" reg "1, %" reg "4 \n" \
287
- " stxr %w2, %" reg "0, [%3] \n" \
287
+ " stlxr %w2, %" reg "0, [%3] \n" \
288
288
" cbnz %w2, 1b \n" \
289
289
: "=&r"(newval), "=&r"(old), "=&r"(tmp) \
290
290
: "r"(addr), "r"(value) \
0 commit comments