Android ARMv6/v7 and VFP/NEON

后端 未结 3 776
闹比i
闹比i 2021-01-31 19:44

I would like to understand more the CPU used on Android phones. The reason is that we are building the C library which has the certain CPU/math processor architecture flags we c

3条回答
  •  难免孤独
    2021-01-31 20:20

    1. That's correct. Currently there are two types - ARMv6 and ARMv7. Most likely in nearest future there will additionally x86 target. Newest NDK already supports builds for it.

    2. VFP is mandatory on ARMv7, but not on ARMv6. NEON is optional, and not all devices support it. Most distinct example is Nvidia Tegra 2. It is deployed on most high-end tablets and phones, but it doesn't support NEON. Nvidia Tegra 3 supports NEON.

    3. I think you should stick to ARMv6 with floating point emulation, ARMv7+VFP, ARMv7+NEON.

    4. Exactly - VFP is not supported on all ARMv6 devices. So simply don't use it there. By default NDK builds armeabi target that is intended for ARMv6 devices and doesn't use VFP. armeabi-v7a builds for ARMv7 and uses VFP.

提交回复
热议问题