如何在 Xcode 中启用 Neon 指令
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/2376317/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How to enable Neon instruction in Xcode
提问by Krav
I want to use Neon SIMD instruction for the iphone. I heard we have to put flags "-mfloat-abi=softfp -mfpu=neon" in the "Other C Flags" field of the Target inspector, but when building I get "error: unrecognized command line option "-mfpu=neon"" .
我想在 iPhone 上使用 Neon SIMD 指令。我听说我们必须在目标检查器的“其他 C 标志”字段中放置标志“-mfloat-abi=softfp -mfpu=neon”,但是在构建时我收到“错误:无法识别的命令行选项“-mfpu=neon” ”。
Is there anything else special that has to be done to allow this flag? (I have Xcode 3.2.1 and iphone sdk 3.1.3)
为了允许这个标志,还有什么特别的事情需要做吗?(我有 Xcode 3.2.1 和 iphone sdk 3.1.3)
Thanks !!
谢谢 !!
回答by Nick Toumpelis
The NEON set is an extension on the Cortex-A series, therefore not supported in iPhone 3G. You probably cannot specify this directly.
NEON 集是 Cortex-A 系列的扩展,因此 iPhone 3G 不支持。您可能无法直接指定这一点。
回答by Jake 'Alquimista' LEE
NEON is enabled by default.
默认情况下启用 NEON。
The target has to be ARMv7 for that. (3GS or later)
为此,目标必须是 ARMv7。(3GS 或更高版本)
In order to utilize NEON, the easiest way is writing assembly codes with NEON instructions.
为了利用 NEON,最简单的方法是使用 NEON 指令编写汇编代码。
It isn't that hard. ARM provides NEON guide in PDF on their homepage.
没那么难。ARM 在其主页上提供了 PDF 格式的 NEON 指南。