From 4095eac9f21a794cff1f986221eb79dd3c851f15 Mon Sep 17 00:00:00 2001 From: Benjamin Valentin Date: Thu, 1 Oct 2020 00:13:13 +0200 Subject: [PATCH] cpu: mips32r2_common: set BITARITHM_HAS_CLZ The MIPS ISA implements CLZ: https://ti.tuwien.ac.at/cps/teaching/courses/cavo/files/MIPS32-IS.pdf For `tests/periph_gpio` this shaves off 20 bytes on `6lowpan-clicker`. --- cpu/mips32r2_common/include/cpu.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/cpu/mips32r2_common/include/cpu.h b/cpu/mips32r2_common/include/cpu.h index 08708b7def..9904991052 100644 --- a/cpu/mips32r2_common/include/cpu.h +++ b/cpu/mips32r2_common/include/cpu.h @@ -32,6 +32,14 @@ extern "C" { #endif +/** + * @brief Select fastest bitarithm_lsb implementation + * @{ + */ +#define BITARITHM_LSB_BUILTIN +#define BITARITHM_HAS_CLZ +/** @} */ + /** * @brief Print the last instruction's address *