Rate This Document
Findability
Accuracy
Completeness
Readability

NEON Instructions Not Supported

Error Information

1
2
3
error: unknown register name 'q0' in asm 
        : "memory", "cc", "q0" 
                          ^

Problem

Clang does not allow NEON instructions to use Q registers.

Code Example

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
$ cat bar.c 
int foo(void) { 
    __asm__("":::"q0"); 
    return 0; 
} 
$  clang bar.c  
bar.c:2:16: error: unknown register name 'q0' in asm 
  __asm__("":::"q0"); 
               ^ 
1 error generated.

Solution

Change the qX register to the vX register.