Android ARMv6/v7 和 VFP/NEON [英] Android ARMv6/v7 and VFP/NEON

查看:28
本文介绍了Android ARMv6/v7 和 VFP/NEON的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想更多地了解 Android 手机上使用的 CPU.原因是我们正在构建具有我们可以设置的特定 CPU/数学处理器架构标志的 C 库.

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.

  1. 到目前为止,我们发现所有 Android 设备的 CPU 都是 ARM 设计的,要么是 ARMv6(旧设备、低端、华为、中兴、小 SE),要么是 ARMv7(Honeycomb 平板电脑和所有更昂贵的设备,几乎都具有 WVGA 和更高的分辨率)我已经检查了大约 20 台设备,并且都具有该类型的处理器.那是对的吗?还有其他的吗?

  1. 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?

现在说到多媒体和数学运算,我认为有两个单元很重要 - 用于浮点运算的 VFP 和 SIMD - NEON.在测试上述设备组后,我发现几乎所有设备都支持 VFP,而 NEON 则不支持.对此有何评论?

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?

我不知道 ARMv6 和 ARMv7 的区别到底是什么(除了一般的速度).现在我们正在构建一个多媒体 C 库,它有几个构建标志.我的问题是如何在一侧定位最多数量的设备,以及如何让更好设备的用户使用他们的硬件.我的建议是准备 3 个不同的构建:ARMv6/VFP、ARMv7/VFP 和 ARMv7/VFP/NEON.其他提案?

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?

ARMv6/VFP 我认为应该可以在所有配置上运行,除了缺少 VFP 的设备(例如旧的 HTC Wildfire)——但这些设备仍然不受支持.

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.

问候,斯腾

推荐答案

  1. 没错.目前有两种类型 - ARMv6 和 ARMv7.很可能在最近的将来还会有 x86 目标.最新的 NDK 已经支持构建.

  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.

VFP 在 ARMv7 上是强制性的,但在 ARMv6 上不是.NEON 是可选的,并非所有设备都支持它.最明显的例子是 Nvidia Tegra 2.它部署在大多数高端平板电脑和手机上,但不支持 NEON.Nvidia Tegra 3 支持 NEON.

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.

我认为您应该坚持使用带有浮点仿真的 ARMv6、ARMv7+VFP、ARMv7+NEON.

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

确实如此 - 并非所有 ARMv6 设备都支持 VFP.所以根本不要在那里使用它.默认情况下,NDK 构建面向 ARMv6 设备且不使用 VFP 的 armeabi 目标.armeabi-v7a 为 ARMv7 构建并使用 VFP.

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.

这篇关于Android ARMv6/v7 和 VFP/NEON的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆