From 29f5385263367ada481cb91fb5f44b6c1f90c59c Mon Sep 17 00:00:00 2001 From: Michael Sevakis Date: Tue, 5 Aug 2014 21:19:07 -0400 Subject: Fix up some more red find_first_set_bit() becomes a small inline on ARMv5+ and checkwps now gets made with -std=gnu99 (it eats all the GCCOPTS) like the rest of things. Change-Id: Ie6039b17fec057a3dcb0f453d8fd5efac984df89 --- firmware/export/system.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'firmware/export/system.h') diff --git a/firmware/export/system.h b/firmware/export/system.h index f6d441ef2a..0a13ec2208 100644 --- a/firmware/export/system.h +++ b/firmware/export/system.h @@ -157,7 +157,12 @@ int get_cpu_boost_counter(void); ((type *)((intptr_t)(memberptr) - OFFSETOF(type, membername))) /* returns index of first set bit or 32 if no bits are set */ +#if defined(CPU_ARM) && ARM_ARCH >= 5 && !defined(__thumb__) +static inline int find_first_set_bit(uint32_t val) + { return LIKELY(val) ? __builtin_ctz(val) : 32; } +#else int find_first_set_bit(uint32_t val); +#endif static inline __attribute__((always_inline)) uint32_t isolate_first_bit(uint32_t val) -- cgit v1.2.3