Is your compiler reasonably current? This shouldn’t happen after
LLVM d4e7b000b2eb, which is in Clang 11 (2020-10-12) and later.
mark@arm-and-hammer zsh% cat t.c
long StripPACBits(long address) {
#if 0
address = ptrauth_strip(address, ptrauth_key_function_pointer);
#elif 1
// Strip any pointer authentication bits that are assigned to the address.
register long x30 __asm("x30") = address;
asm("xpaclri" : "+r"(x30));
address = x30;
#endif
return address;
}
mark@arm-and-hammer zsh% clang-10 --target=arm64-linux-gnu -c t.c -o t.o && echo ok
t.c:7:9: error: instruction requires: pa