]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Make mutex hints gcc-only, improve a type in __arch_compare_and_exchange_bool_32_acq
authorStan Shebs <stanshebs@google.com>
Wed, 26 Sep 2018 20:50:57 +0000 (13:50 -0700)
committerFangrui Song <i@maskray.me>
Sat, 28 Aug 2021 00:23:14 +0000 (17:23 -0700)
sysdeps/powerpc/powerpc64/atomic-machine.h

index 1f09c52bd272bd5115fd03772c4a5e9fb569ccff..a2c78480bccb881066802314ec9678d5effc7732 100644 (file)
@@ -25,7 +25,7 @@
     adjacent to the lock word after the Store Conditional and the hint
     should be false.  */
 
-#if defined _ARCH_PWR6 || defined _ARCH_PWR6X
+#if (defined _ARCH_PWR6 || defined _ARCH_PWR6X) && !defined __clang__
 # define MUTEX_HINT_ACQ        ",1"
 # define MUTEX_HINT_REL        ",0"
 #else
@@ -45,7 +45,7 @@
    value as unsigned.  So we explicitly clear the high 32 bits in oldval.  */
 #define __arch_compare_and_exchange_bool_32_acq(mem, newval, oldval) \
 ({                                                                           \
-  unsigned int __tmp, __tmp2;                                                \
+  unsigned int __tmp; unsigned long __tmp2;                                            \
   __asm __volatile ("   clrldi  %1,%1,32\n"                                  \
                    "1: lwarx   %0,0,%2" MUTEX_HINT_ACQ "\n"                  \
                    "   subf.   %0,%1,%0\n"                                   \