Module Name: src
Committed By: christos
Date: Sun Jan 19 20:20:31 UTC 2025
Modified Files:
src/external/lgpl2/userspace-rcu/dist/include/urcu/uatomic: sparc64.h
Log Message:
Actually it is better to let gcc doit.
To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 \
src/external/lgpl2/userspace-rcu/dist/include/urcu/uatomic/sparc64.h
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/external/lgpl2/userspace-rcu/dist/include/urcu/uatomic/sparc64.h
diff -u src/external/lgpl2/userspace-rcu/dist/include/urcu/uatomic/sparc64.h:1.2 src/external/lgpl2/userspace-rcu/dist/include/urcu/uatomic/sparc64.h:1.3
--- src/external/lgpl2/userspace-rcu/dist/include/urcu/uatomic/sparc64.h:1.2 Sun Jan 19 15:15:12 2025
+++ src/external/lgpl2/userspace-rcu/dist/include/urcu/uatomic/sparc64.h Sun Jan 19 15:20:31 2025
@@ -20,6 +20,7 @@
extern "C" {
#endif
+#ifdef __sparc_v9__
/* cmpxchg */
static inline __attribute__((always_inline))
@@ -29,7 +30,6 @@ unsigned long _uatomic_cmpxchg(void *add
switch (len) {
case 4:
{
-#ifdef __sparc_v9__
__asm__ __volatile__ (
"membar #StoreLoad | #LoadLoad\n\t"
"cas [%1],%2,%0\n\t"
@@ -37,20 +37,6 @@ unsigned long _uatomic_cmpxchg(void *add
: "+&r" (_new)
: "r" (addr), "r" (old)
: "memory");
-#else
- __asm__ __volatile__ (
- "ldstub [%%sp-1], %%g0\n\t"
- "ld [%1], %%g1\n\t"
- "cmp %%g1, %2\n\t"
- "bne,a 1f\n\t"
- " mov %2, %0\n\t"
- "st %0, [%1]\n\t"
- "stbar\n\t"
- "1:\n\t"
- : "+&r" (_new)
- : "r" (addr), "r" (old)
- : "memory", "%g1");
-#endif
return _new;
}
@@ -79,11 +65,11 @@ unsigned long _uatomic_cmpxchg(void *add
caa_cast_long_keep_sign(old), \
caa_cast_long_keep_sign(_new), \
sizeof(*(addr))))
-
+#endif
#ifdef __cplusplus
}
#endif
#include <urcu/uatomic/generic.h>
-#endif /* _URCU_ARCH_UATOMIC_PPC_H */
+#endif /* _URCU_ARCH_UATOMIC_SPARC64_H */