AFAIK, Google defines only two sets of ARM ABI for Android: ARMv5 and ARMv7a. On ARMv5 (older Android devices) you are guaranteed not to support FPU and NEON. On ARMv7a devices, support for FPU and NEON is optional. The market filters suitable devices on these two ABIs. You can build a "bold binary" that includes unique libraries of native codes for each ABI. In the case of FPU and NEON capabilities, you will need to check their presence at run time. Here is the code to find out if NEON instructions are available:
#include "cpu-features.h" bHasNEON = FALSE; if (android_getCpuFamily() == ANDROID_CPU_FAMILY_ARM && (android_getCpuFeatures() & ANDROID_CPU_ARM_FEATURE_NEON) != 0) {
You can also test ARMV7 support (ANDROID_CPU_ARM_FEATURE_ARMv7) and VFP support (ANDROID_CPU_ARM_FEATURE_VFPv3)
source share