path: root/arch
diff options
authorRich Felker <>2019-07-15 15:33:12 -0400
committerRich Felker <>2019-07-15 15:33:12 -0400
commit980f80f79216c268c18fa36b7680c076c684dfa2 (patch)
tree8dfe2e59f3e0d4ca55fa65ff008eb30107159bf1 /arch
parent7829f42a2c8944555439380498ab8b924d0f2070 (diff)
fix build failure on arm building C code in thumb1 mode
a fully thumb1 build is not supported because some asm files are incompatible with thumb1, but apparently it works to compile the C code as thumb1 commit 06fbefd10046a0fae7e588b7c6d25fb51811b931 caused this regression but introducing use of the clz instruction, which is not supported in arm mode prior to v5, and not supported in thumb prior to thumb2 (v6t2). commit 1b9406b03c0a94ebe2076a8fc1746a8c45e78a83 fixed the issue only for arm mode pre-v5 but left thumb1 broken.
Diffstat (limited to 'arch')
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/arm/atomic_arch.h b/arch/arm/atomic_arch.h
index e427836a..9e3937cc 100644
--- a/arch/arm/atomic_arch.h
+++ b/arch/arm/atomic_arch.h
@@ -83,7 +83,7 @@ static inline void a_crash()
: : : "memory");
-#if __ARM_ARCH >= 5
+#if __ARM_ARCH >= 5 && (!__thumb__ || __thumb2__)
#define a_clz_32 a_clz_32
static inline int a_clz_32(uint32_t x)