summaryrefslogtreecommitdiff
path: root/firmware/export/system.h
diff options
context:
space:
mode:
authorMichael Sevakis <jethead71@rockbox.org>2014-08-05 21:19:07 -0400
committerMichael Sevakis <jethead71@rockbox.org>2014-08-05 21:32:13 -0400
commit29f5385263367ada481cb91fb5f44b6c1f90c59c (patch)
tree930f6d591bb6c4996cd16050fc232179d3d9b638 /firmware/export/system.h
parentbb7700928a05c42339be4f587b105659bc8dc2be (diff)
downloadrockbox-29f5385263367ada481cb91fb5f44b6c1f90c59c.tar.gz
rockbox-29f5385263367ada481cb91fb5f44b6c1f90c59c.zip
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
Diffstat (limited to 'firmware/export/system.h')
-rw-r--r--firmware/export/system.h5
1 files changed, 5 insertions, 0 deletions
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);
157 ((type *)((intptr_t)(memberptr) - OFFSETOF(type, membername))) 157 ((type *)((intptr_t)(memberptr) - OFFSETOF(type, membername)))
158 158
159/* returns index of first set bit or 32 if no bits are set */ 159/* returns index of first set bit or 32 if no bits are set */
160#if defined(CPU_ARM) && ARM_ARCH >= 5 && !defined(__thumb__)
161static inline int find_first_set_bit(uint32_t val)
162 { return LIKELY(val) ? __builtin_ctz(val) : 32; }
163#else
160int find_first_set_bit(uint32_t val); 164int find_first_set_bit(uint32_t val);
165#endif
161 166
162static inline __attribute__((always_inline)) 167static inline __attribute__((always_inline))
163uint32_t isolate_first_bit(uint32_t val) 168uint32_t isolate_first_bit(uint32_t val)