I’m trying to compile the PAPI file validation_tests/instructions_testcode.c using the command
nvc -m64 -tp=native -fpic -noswitcherror -I/usr/local/include -DPOTENTIALLY_UNUSED='' -D__USE_GNU -DPAPI_NUM_COMP=1 -D__aarch64__ -fasm -DUSE_PTHREAD_MUTEXES -DPAPI_NUM_COMP=3 -O1 -D__aarch64__ -I/usr/local/include -c -o ../validation_tests/instructions_testcode.o ../validation_tests/instructions_testcode.c
but get this error-message:
nvc-Warning-Unknown switch: -fasm
"../validation_tests/instructions_testcode.c", line 85: warning: statement is unreachable [code_is_unreachable]
return CODE_UNIMPLEMENTED;
^
Remark: individual warnings can be suppressed with "--diag_suppress <warning-name>"
NVC++-F-0040-Illegal use of symbol, (../validation_tests/instructions_testcode.c: 87)
NVC++/arm Linux 26.5-0: compilation aborted
make[1]: [<builtin>: ../validation_tests/instructions_testcode.o] Error 2 (ignored)
The particular code-snippet is this
8 int instructions_million(void) {
9
10 #if defined(__i386__) || (defined __x86_64__)
.......
72 #elif defined(__aarch64__)
73 asm( " ldr x2,=333332 // set count\n"
74 "55:\n"
75 " add x2,x2,#-1\n"
76 " cmp x2,#0\n"
77 " bne 55b // repeat till zero\n"
78 : /* no output registers */
79 : /* no inputs */
80 : "cc", "r2" /* clobbered */
81 );
82 return 0;
83 #endif
84
85 return CODE_UNIMPLEMENTED;
86
87 }
so I can’t tell how to interpret the “illegal use of symbol” since line 87 only closes the statement.