Skip to content

Commit 6ac95f9

Browse files
committed
1 parent 7564a33 commit 6ac95f9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/cpucounter.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#![feature(llvm_asm)]
12
use super::timestamp::*;
23
pub(crate) struct CPUCounter;
34

@@ -10,14 +11,13 @@ unsafe fn cpucounter() -> u64 {
1011
(high << 32) | low
1112
}
1213

13-
1414
// https://github.com/google/benchmark/blob/v1.1.0/src/cycleclock.h#L116
1515
#[cfg(asm)]
1616
#[inline]
1717
#[cfg(any(target_arch = "aarch64"))]
1818
unsafe fn cpucounter() -> u64 {
1919
let (vtm): (u64);
20-
asm!("mrs %0, cntvct_el0" : "=r"(vtm));
20+
llvm_asm!("mrs %0, cntvct_el0" : "=r"(vtm));
2121
vtm
2222
}
2323

0 commit comments

Comments
 (0)