NEON 程序集无法在 Xcode 4.3.2 中为 iOS 构建 [英] NEON assembly fail to build for iOS in Xcode 4.3.2

查看:29
本文介绍了NEON 程序集无法在 Xcode 4.3.2 中为 iOS 构建的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个代码库,可以在所有其他 NEON 编译器、ndk-build、RVDS 等中正常编译,但在 Xcode 下,我调用的每条 NEON 指令都会出现错误错误指令".基本上好像没有检测到 NEON.

我正在尝试构建一个静态库,我进入了新项目,选择了 Cocoa Touch 静态库,然后添加了我现有的文件.

我正在阅读的所有内容都表明 NEON 应该已经启用.我删除了对 armv6 的所有引用,并针对 iOS 5.1

此外,有问题的代码都包含在.s"文件中定义的例程——纯汇编.我没有使用内在方法调用.

似乎编译器正在对整个文件进行调试...

未知伪操作:.cpu

它列出了所有其他设置,如 .fpu 等

这是我当前的设置:


(来源:
(来源:
(来源:wasteonline.net)

解决方案

在我在上一个回答中提到的 as 工具也让我的语法窒息之后,我意识到一定还有其他事情发生.

>

我遵循了这篇文章底部的指导方针http://www.shervinemami.info/armAssembly.html#template

我需要做出的改变是:

  1. 将我的指令全部转换为小写
  2. 使用命名指令与 mach-o 兼容(解决链接器问题)

I have a code base which compiles fine in all other NEON compilers, ndk-build, RVDS, etc, but under Xcode I get the error "bad instruction" for every NEON instruction I call. It basically seems like NEON is not detected.

I am attempting to build a static library, I went to New Project, selected Cocoa Touch Static Library, then added my existing files.

Everything I'm reading indicates that NEON should be already enabled. I removed all references to armv6, and am targeting iOS 5.1

Also the code in question is all contained as routines defined in ".s" files -- pure assembly. I am not using the intrinsics method calls.

It seems like the compiler is barfing on the whole file...

Unknown pseudo-op: .cpu

It lists all of the other settings, like .fpu, etc

Here are my current settings:


(source: wasteonline.net)


(source: wasteonline.net)


(source: wasteonline.net)

解决方案

After the as tool I mentioned in my last answer turned out to be choking on my syntax as well, I realized there must be something else going on.

I followed the guidelines on the bottom of this post http://www.shervinemami.info/armAssembly.html#template

The changes I needed to make were:

  1. converted my instructions to all lower case
  2. use the naming directives to be compatible with mach-o (solved linker problems)

这篇关于NEON 程序集无法在 Xcode 4.3.2 中为 iOS 构建的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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