Rockbox open source high quality audio player as a Music Player Daemon
mpris rockbox mpd libadwaita audio rust zig deno
2
fork

Configure Feed

Select the types of activity you want to include in your feed.

arm: use optimized find_first_set_bit() on Cortex-M

Use the optimized version based on __buitlin_ctz() which GCC
will compile to two instructions (rbit, ctz) on Cortex-M4/M7;
faster and smaller than the handcoded assembly version.

Change-Id: I33f69ff829b048f1e53fc7ead1bd6ac3c5bd7a4c

authored by

Aidan MacDonald and committed by
Solomon Peachy
20d31c11 4ceb9e22

+2 -1
+2 -1
firmware/export/system.h
··· 163 163 #endif 164 164 165 165 /* returns index of first set bit or 32 if no bits are set */ 166 - #if defined(CPU_ARM) && ARM_ARCH >= 5 && !defined(__thumb__) 166 + #if (defined(CPU_ARM) && ARM_ARCH >= 5 && !defined(__thumb__)) || \ 167 + defined(CPU_ARM_MICRO) 167 168 static inline int find_first_set_bit(uint32_t val) 168 169 { return LIKELY(val) ? __builtin_ctz(val) : 32; } 169 170 #else