Skip to content

Commit

Permalink
Revert #790 Changes
Browse files Browse the repository at this point in the history
  • Loading branch information
tokatoka committed Oct 21, 2022
1 parent cedcee0 commit 376c9b6
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions libafl/src/bolts/cpu.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
//! Architecture agnostic processor features

/*
#[cfg(target_arch = "aarch64")]
use core::arch::asm;
*/

#[cfg(not(any(target_arch = "x86_64", target_arch = "x86", target_arch = "aarch64")))]
#[cfg(not(any(target_arch = "x86_64", target_arch = "x86")))]
use crate::bolts::current_nanos;

// TODO: Add more architectures, using C code, see
Expand All @@ -29,6 +31,8 @@ pub fn read_time_counter() -> u64 {
}
}


/*
/// Read a timestamp for measurements
///
/// Fetches the counter-virtual count register
Expand All @@ -43,14 +47,15 @@ pub fn read_time_counter() -> u64 {
}
v
}
*/

/// Read a timestamp for measurements.
///
/// This function is a wrapper around different ways to get a timestamp, fast.
/// In this way, an experiment only has to
/// change this implementation rather than every instead of [`read_time_counter`]
/// On unsupported architectures, it's falling back to normal system time, in millis.
#[cfg(not(any(target_arch = "x86_64", target_arch = "x86", target_arch = "aarch64")))]
#[cfg(not(any(target_arch = "x86_64", target_arch = "x86")))]
#[must_use]
pub fn read_time_counter() -> u64 {
current_nanos()
Expand Down

0 comments on commit 376c9b6

Please sign in to comment.