Openwall GNU/*/Linux - a small security-enhanced Linux distro for servers
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date: Tue, 27 Feb 2018 16:03:19 -0800
From: "Zhao, Weiming" <weimingz@...eaurora.org>
To: musl@...ts.openwall.com
Subject: clz instruction is unavailable for Thumb1

In arch/arm/atomic_arch.h, it checks for __ARM_ARCH >= 5, which is not 
sufficient.

for example, for armv6-m, it only support Thumb1, which doesn't include clz.

Suggest to check if it's building for thumb1:

diff --git a/arch/arm/atomic_arch.h b/arch/arm/atomic_arch.h
index c5c56f8..e3cb66a 100644
--- a/arch/arm/atomic_arch.h
+++ b/arch/arm/atomic_arch.h
@@ -82,7 +82,7 @@ static inline void a_crash()
                 : : : "memory");
  }

-#if __ARM_ARCH >= 5
+#if __ARM_ARCH >= 5 && !(defined(__thumb__) && !defined(__thumb2))



-- 
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation

Powered by blists - more mailing lists

Your e-mail address:

Powered by Openwall GNU/*/Linux - Powered by OpenVZ