What I want to do (high-level): use qsort_r on Android.
There is no default implementation. So I've grabbed one from BSD. Unfortunately it needs fls functions which is also unavailable on Android. So I've grabbed Apple Open Source Libc library and copied ARM implementation into an inline assembly. Now I'm getting this:
Assembler messages:
Error: selected processor does not support Thumb mode `clz r3,r0'
Error: cannot honor width suffix -- `rsb r0,r3,#32'
AFAIR ARM-6 doesn't support it in Thumb mode. So how can I force non-Thumb mode for this one file, or is pure C implementation available for fls?
(and God, why do I have to play such low-level just to have qsort_r...)