diff options
author | George Koehler <kernigh@gmail.com> | 2020-08-24 21:31:13 +0000 |
---|---|---|
committer | Ivan Maidanski <ivmai@mail.ru> | 2021-09-09 13:05:03 +0300 |
commit | 22b5604f9af0f307fae797a0b8204314e26f88a1 (patch) | |
tree | 99ed1d8f24c024ff26288c9ca8f46c7a7767dabc | |
parent | 8f9680c5bd2db59dd1d4c6ab95297c90b9fff653 (diff) | |
download | libatomic_ops-22b5604f9af0f307fae797a0b8204314e26f88a1.tar.gz |
Fix size of local variable passed to cas[x] (gcc/sparc)
Use the same type for input and output inline asm operands in
AO_compare_and_swap_full().
* src/atomic_ops/sysdeps/gcc/sparc.h [!AO_NO_SPARC_V9
&& !AO_GENERALIZE_ASM_BOOL_CAS] (AO_compare_and_swap_full): Change type
of ret local variable from char to AO_t.
-rw-r--r-- | src/atomic_ops/sysdeps/gcc/sparc.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/atomic_ops/sysdeps/gcc/sparc.h b/src/atomic_ops/sysdeps/gcc/sparc.h index 41bc2f5..27ef50f 100644 --- a/src/atomic_ops/sysdeps/gcc/sparc.h +++ b/src/atomic_ops/sysdeps/gcc/sparc.h @@ -42,7 +42,7 @@ AO_test_and_set_full(volatile AO_TS_t *addr) { /* Returns nonzero if the comparison succeeded. */ AO_INLINE int AO_compare_and_swap_full(volatile AO_t *addr, AO_t old, AO_t new_val) { - char ret; + AO_t ret; __asm__ __volatile__ ("membar #StoreLoad | #LoadLoad\n\t" # if defined(__arch64__) "casx [%2],%0,%1\n\t" |