aboutsummaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2017-10-25 11:54:16 -0400
committerRich Felker <dalias@aerifal.cx>2017-10-25 11:54:16 -0400
commit1b9406b03c0a94ebe2076a8fc1746a8c45e78a83 (patch)
tree8d43d52b66eeffb1f2f887a06b0bb41d385c9861 /arch
parentec04d122f1182aeb91f39b0e80ae40c68e4d9605 (diff)
downloadmusl-1b9406b03c0a94ebe2076a8fc1746a8c45e78a83.zip
musl-1b9406b03c0a94ebe2076a8fc1746a8c45e78a83.tar.gz
musl-1b9406b03c0a94ebe2076a8fc1746a8c45e78a83.tar.bz2
fix build regression on ARM for ISA levels less than v5
commit 06fbefd10046a0fae7e588b7c6d25fb51811b931 (first included in release 1.1.17) introduced this regression. patch by Adrian Bunk. it fixes the regression in all cases, but spuriously prevents use of the clz instruction on very old compiler versions that don't define __ARM_ARCH. this may be fixed in a more general way at some point in the future. it also omits thumb1 logic since building as thumb1 code is currently not supported.
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/atomic_arch.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/arm/atomic_arch.h b/arch/arm/atomic_arch.h
index a121010..c5c56f8 100644
--- a/arch/arm/atomic_arch.h
+++ b/arch/arm/atomic_arch.h
@@ -82,9 +82,13 @@ static inline void a_crash()
: : : "memory");
}
+#if __ARM_ARCH >= 5
+
#define a_clz_32 a_clz_32
static inline int a_clz_32(uint32_t x)
{
__asm__ ("clz %0, %1" : "=r"(x) : "r"(x));
return x;
}
+
+#endif