From 99d484f336ca5a2b4ab718c2180de142a4a082da Mon Sep 17 00:00:00 2001 From: Kaspar Schleiser <kaspar@schleiser.de> Date: Fri, 6 Oct 2017 23:46:08 +0200 Subject: [PATCH] cpu/cortexm_common: select bitarithm_lsb() by available instructions --- cpu/cortexm_common/include/cpu_conf_common.h | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/cpu/cortexm_common/include/cpu_conf_common.h b/cpu/cortexm_common/include/cpu_conf_common.h index 8d2d17744e..513d53da09 100644 --- a/cpu/cortexm_common/include/cpu_conf_common.h +++ b/cpu/cortexm_common/include/cpu_conf_common.h @@ -57,6 +57,17 @@ extern "C" { #endif /** @} */ +/** + * @brief Select fastest bitarithm_lsb implementation + * @{ + */ +#ifdef __ARM_FEATURE_CLZ +#define BITARITHM_LSB_BUILTIN +#else +#define BITARITHM_LSB_LOOKUP +#endif +/** @} */ + #ifdef __cplusplus } #endif -- GitLab