ios - asm 中未知的寄存器名称 "q0"(arm64)

标签 ios llvm xcode5 neon arm64

我目前正在尝试为新的arm64架构编译我的库。我有一堆 NEON 组件,对于所有组件我都收到错误

Unknown register name "q0" in asm.

即使我写得像这样简单:

asm (
     ""
     :
     :
     : "q0", "q1", "q2", "q3"
     );

我以为arm64支持NEON。我错过了什么吗?

最佳答案

“v0”:

scanon$ cat bar.c
int foo(void) {
  __asm__("":::"q0");
  return 0;
}
scanon$ xcrun -sdk iphoneos clang bar.c -arch arm64 -c
bar.c:2:16: error: unknown register name 'q0' in asm
  __asm__("":::"q0");
               ^
1 error generated.
scanon$ cat foo.c
int foo(void) {
  __asm__("":::"v0");
  return 0;
}
scanon$ xcrun -sdk iphoneos clang foo.c -arch arm64 -c
scanon$

arm64 是一种新的 ISA。实际的 NEON 指令和寄存器布局是全新的。您将需要为新架构重新编写或调整汇编代码。

关于ios - asm 中未知的寄存器名称 "q0"(arm64),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19984307/

相关文章:

ios - 无法在非开发 IOS 设备上安装 flutter IOS 应用

dependencies - 使用 LLVM 进行数据和循环依赖分析

linker - LLVM 的 lld 的命令行选项文档在哪里?

c++ - 当我尝试发出目标代码时,为什么 LLVM 会出现段错误?

ios - Xcode 5关闭图标光泽效果的方法

ios - 从 didFinishLaunchingWithOptions 终止应用程序

ios - FBAudienceNetwork : setting FBNativeAd into FBMediaView stacks the UI

ios - xcode 5 : code signing identity list not complete

ios - 如何将 AfNetworking 响应对象 (JSON) 映射到自定义类?

iphone - 多个 UIPickerView