未知的注册名称“q0”在asm(arm64) [英] Unknown register name "q0" in asm (arm64)
本文介绍了未知的注册名称“q0”在asm(arm64)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试为新的arm64 arch编译我的lib。我有一堆NEON程序集,对于所有这些我收到错误
I'm currently trying to compile my lib for the new arm64 arch. I have a bunch of NEON assembly and for all of them I receive an error
asm中未知的寄存器名称q0。
Unknown register name "q0" in asm.
即使我简单地写smth:
Even if I write smth simple as this:
asm (
""
:
:
: "q0", "q1", "q2", "q3"
);
我认为arm64支持NEON。我错过了什么吗?
I thought arm64 supports NEON. Am i missing something ?
推荐答案
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指令和寄存器布局是全新的。您需要重新编写或修改新架构的汇编代码。
arm64 is a new ISA. The actual NEON instructions and register layout are entirely new. You will need to re-write or adapt assembly code for the new architecture.
这篇关于未知的注册名称“q0”在asm(arm64)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文