Unknown register name “q0” in asm (arm64)

风流意气都作罢 提交于 2019-11-28 09:24:41

问题


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

Unknown register name "q0" in asm.

Even if I write smth simple as this:

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

I thought arm64 supports NEON. Am i missing something ?


回答1:


“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 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.



来源:https://stackoverflow.com/questions/19984307/unknown-register-name-q0-in-asm-arm64

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!