Hi,
I'm trying to use cpufeatures to determine if neon is supported so I can use some optimized implementations at runtime.
As an intermediate stage, I'm using my runtime detection code but where APP_ABI is set to only armeabi and armeabi-v7a. I've installed this to the x86-based Hudl 2 tablet.
I understand some dynamic recompilation happens at install time to translate the armeabi-v7a binary to x86. As android_getCpuFamily is implemented with preprocessor defines, this actually returns ANDROID_CPU_FAMILY_ARM in this case. More surprising was that the check for if((android_getCpuFeatures() & ANDROID_CPU_ARM_FEATURE_NEON)) returns true as well.
As it turns out, the neon functions have been correctly translated anyway, and do in fact give a speedup over the C implementations, but I know the dynamic recompilation code sits in the device, and older devices might have more bugs around this feature. Therefore I think it would be sensible to avoid the neon code paths in this case. So, is there any way to tell if dynamic recompilation has happened?
Thanks,
Simon