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 can set.
So far we have found that all Android devices CPUs are ARM design and are either ARMv6 (older devices, low ends, Huawei, ZTE, small SE) or ARMv7 (Honeycomb tablets and all more expensive devices, almost all with resolution WVGA and higher)I have checked ~20 devices and all have processor of that type. Is that correct? Are there some others?
Now when it comes to the multimedia and mathematical operations I think two units are important – the VFP for floating point arithmetic and the SIMD - NEON. After testing the above mentioned group of devices I have found that VFP support is in almost all devices, while NEON not. Any comments to that?
I do not know what exactly is the ARMv6 and ARMv7 difference (besides the speed in general). Now we are building a multimedia C library, which has couple of flags for building. My question is how to target the largest number of devices on one side and how to allow the users of the better devices to use their hardware. My proposal is to prepare 3 distinct builds: ARMv6/VFP, ARMv7/VFP and ARMv7/VFP/NEON. Other proposals?
The ARMv6/VFP I think should run on all configurations, except devices, which are missing the VFP (e.g. the old HTC Wildfire) – but those will remain unsupported.
Is this a good approach? Any comments are welcomed.
Regards, STeN
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.
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.
I think you should stick to ARMv6 with floating point emulation, ARMv7+VFP, ARMv7+NEON.
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.
I'd concentrate on v7.
There are hardly any new products shipping with v6, and by the time your library is production ready, v6 will be non-issue.
here are some info: - Neon ALWAYS includes VFP - Coretex A8 can feature either Neon or none - The VFP on A8's Neon is actually VFP-lite which is quite a lot slower. Much slower than V6's VFP. - Coretex A9 and above can feature Neon, VFP, or none. - V7 has many enhanced instructions well suited for mathematical operations beside the dual-issue capability. - The chip vendors can omit Neon and even VFP, but they pay the same license fee to ARM regardlessly. They'd only save very little in manufacturing costs. - Neon is extremely powerful in capable hands, but cannot do double precision. - Except for the ones with the neonless Tegra, no v7 based Android phone is known to me which doesn't feature Neon. (The reason is above) - Tegra3 does have Neon
It's true that most of the Android devices fall into these three categories:
1) ARMv6
2) ARMv7
3) ARMv7 + NEON
The NDK does not support this fully. There is no ARMv6 ABI build target, There are only two ARM build targets supported by the NDK:
1) ARMv5 (which will run on all Android ARM devices)
2) ARMv7 (with optional usage of VFP and NEON)
The limitations imposed by this are that if you want to use ARMv6 instructions (from C or ASM code), you need to target the ARMv7 ABI in the NDK.
来源:https://stackoverflow.com/questions/9397065/android-armv6-v7-and-vfp-neon