We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7564a33 commit f7945d5Copy full SHA for f7945d5
src/cpucounter.rs
@@ -10,14 +10,13 @@ unsafe fn cpucounter() -> u64 {
10
(high << 32) | low
11
}
12
13
-
14
// https://github.com/google/benchmark/blob/v1.1.0/src/cycleclock.h#L116
15
#[cfg(asm)]
16
#[inline]
17
#[cfg(any(target_arch = "aarch64"))]
18
unsafe fn cpucounter() -> u64 {
19
let (vtm): (u64);
20
- asm!("mrs %0, cntvct_el0" : "=r"(vtm));
+ llvm_asm!("mrs %0, cntvct_el0" : "=r"(vtm));
21
vtm
22
23
src/lib.rs
@@ -1,4 +1,5 @@
1
#![cfg_attr(asm, feature(asm))]
2
+#![feature(llvm_asm)]
3
4
//! Precision is a simple crate to perform measurements using hardware counters.
5
//!
0 commit comments