about summary refs log tree commit diff
path: root/arch/mips64/atomic_arch.h
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2016-03-11 00:02:10 -0500
committerRich Felker <dalias@aerifal.cx>2016-03-11 00:02:10 -0500
commit27bf42cd9d85e242f1ffac8d99330da120c8dfdb (patch)
tree97836980a45452977ac57788dc16b5470819c31a /arch/mips64/atomic_arch.h
parent636a4799dd5bf11a1fcd209906c088ed948b821c (diff)
downloadmusl-27bf42cd9d85e242f1ffac8d99330da120c8dfdb.tar.gz
musl-27bf42cd9d85e242f1ffac8d99330da120c8dfdb.tar.xz
musl-27bf42cd9d85e242f1ffac8d99330da120c8dfdb.zip
make mips64 a_sc_p atomic primitive's asm constraints work with clang
apparently clang does not accept matching-register input and output
constraints that differ in size (32-bit vs 64-bit).

based on patch by Jaydeep Patil.
Diffstat (limited to 'arch/mips64/atomic_arch.h')
-rw-r--r--arch/mips64/atomic_arch.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/mips64/atomic_arch.h b/arch/mips64/atomic_arch.h
index 49d9884a..8664e11c 100644
--- a/arch/mips64/atomic_arch.h
+++ b/arch/mips64/atomic_arch.h
@@ -31,7 +31,7 @@ static inline void *a_ll_p(volatile long *p)
 #define a_sc_p a_sc_p
 static inline int a_sc_p(volatile long *p, void *v)
 {
-	int r;
+	long r;
 	__asm__ __volatile__ (
 		"scd %0, %1"
 		: "=r"(r), "=m"(*p) : "0"(v) : "memory");