[llvm-bugs] [Bug 44307] New: [AArch64] __builtin_readcyclecounter() lead to illegal hardware instruction
via llvm-bugs
llvm-bugs at lists.llvm.org
Sun Dec 15 12:15:54 PST 2019
https://bugs.llvm.org/show_bug.cgi?id=44307
Bug ID: 44307
Summary: [AArch64] __builtin_readcyclecounter() lead to illegal
hardware instruction
Product: new-bugs
Version: 9.0
Hardware: Other
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: new bugs
Assignee: unassignedbugs at nondot.org
Reporter: jaron at kent-dobias.com
CC: htmldeveloper at gmail.com, llvm-bugs at lists.llvm.org
On my AArch64 machine (Pinebook) running Archlinux ARM, clang compiles
__builtin_readycyclecounter() but the resulting binaries crash with an illegal
hardware instruction. I'm using the version of clang packaged by Archlinux ARM.
Information on the Pinebook processor:
https://www.arm.com/products/processors/cortex-a/cortex-a53-processor.php
Steps to reproduce:
% cat buildcyclecounter.c
int main(int argc, char* argv[]) {
#if __has_builtin(__builtin_readcyclecounter)
return __builtin_readcyclecounter();
#else
# error "__builtin_readcyclecounter not available"
#endif
}
% clang buildcyclecounter.c
% ./a.out
[1] 19966 illegal hardware instruction (core dumped) ./a.out
System information:
% uname -a :(
Linux HAL 5.4.3-1-ARCH #1 SMP Sat Dec 14 22:09:49 EST 2019 aarch64 GNU/Linux
% clang -v
clang version 9.0.0 (tags/RELEASE_900/final)
Target: aarch64-unknown-linux-gnu
Thread model: posix
InstalledDir: /usr/bin
Found candidate GCC installation:
/usr/bin/../lib/gcc/aarch64-unknown-linux-gnu/8.3.0
Found candidate GCC installation: /usr/lib/gcc/aarch64-unknown-linux-gnu/8.3.0
Selected GCC installation: /usr/bin/../lib/gcc/aarch64-unknown-linux-gnu/8.3.0
Candidate multilib: .;@m64
Selected multilib: .;@m64
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20191215/38984edd/attachment.html>
More information about the llvm-bugs
mailing list