Skip to content

Commit f7945d5

Browse files
committed
1 parent 7564a33 commit f7945d5

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/cpucounter.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,13 @@ unsafe fn cpucounter() -> u64 {
1010
(high << 32) | low
1111
}
1212

13-
1413
// https://github.com/google/benchmark/blob/v1.1.0/src/cycleclock.h#L116
1514
#[cfg(asm)]
1615
#[inline]
1716
#[cfg(any(target_arch = "aarch64"))]
1817
unsafe fn cpucounter() -> u64 {
1918
let (vtm): (u64);
20-
asm!("mrs %0, cntvct_el0" : "=r"(vtm));
19+
llvm_asm!("mrs %0, cntvct_el0" : "=r"(vtm));
2120
vtm
2221
}
2322

src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#![cfg_attr(asm, feature(asm))]
2+
#![feature(llvm_asm)]
23

34
//! Precision is a simple crate to perform measurements using hardware counters.
45
//!

0 commit comments

Comments
 (0)