Skip to content

Commit

Permalink
Fix aarch64 read_time_counter() (#849)
Browse files Browse the repository at this point in the history
* Revert #790 Changes

* fmt

* fix?
  • Loading branch information
tokatoka committed Oct 21, 2022
1 parent cedcee0 commit 64ec5c3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions libafl/src/bolts/cpu.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@ pub fn read_time_counter() -> u64 {
#[cfg(target_arch = "aarch64")]
#[must_use]
pub fn read_time_counter() -> u64 {
let v: u64 = 0;
let mut v: u64 = 0;
unsafe {
// TODO pushing a change in core::arch::aarch64 ?
asm!("mrs {v}, cntvct_el0", v = out(reg) _);
asm!("mrs {v}, cntvct_el0", v = out(reg) v);
}
v
}
Expand Down

0 comments on commit 64ec5c3

Please sign in to comment.