Unknown register name “q0” in asm (arm64)

Solutions Collect From Internet About “Unknown register name “q0” in asm (arm64)”

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