Since ARM has no trailing zero count, you may even end up with following code for bsf32:
Code: Select all
static inline int BSF32(uint32 bb) {
#ifdef USE_ARM_ASM
return __builtin_clz(bb & -bb) ^ 31;
#else
[/quote]
Thanks, I will try that also. But I am unable to find such bit tricks by myself, and to understand that it works, I had to check with an example !
Pascal Georges