Skip to content

Commit

Permalink
Auto merge of rust-lang#128528 - workingjubilee:you-dont-need-to-see-…
Browse files Browse the repository at this point in the history
…this-cpuid-move-along, r=Amanieu

Finish removing `has_cpuid`

The one use of it was guaranteed to be always true.

try-job: test-various
  • Loading branch information
bors committed Aug 3, 2024
2 parents e13d132 + db770c6 commit 0e4358d
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 12 deletions.
4 changes: 0 additions & 4 deletions std/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -269,10 +269,6 @@
#![cfg_attr(any(windows, target_os = "uefi"), feature(round_char_boundary))]
#![cfg_attr(target_family = "wasm", feature(stdarch_wasm_atomic_wait))]
#![cfg_attr(target_arch = "wasm64", feature(simd_wasm64))]
#![cfg_attr(
all(any(target_arch = "x86_64", target_arch = "x86"), target_os = "uefi"),
feature(stdarch_x86_has_cpuid)
)]
//
// Language features:
// tidy-alphabetical-start
Expand Down
8 changes: 0 additions & 8 deletions std/src/sys/pal/uefi/time.rs
Original file line number Diff line number Diff line change
Expand Up @@ -175,10 +175,6 @@ pub(crate) mod instant_internal {

#[cfg(target_arch = "x86_64")]
fn timestamp_rdtsc() -> Option<Duration> {
if !crate::arch::x86_64::has_cpuid() {
return None;
}

static FREQUENCY: crate::sync::OnceLock<u64> = crate::sync::OnceLock::new();

// Get Frequency in Mhz
Expand All @@ -200,10 +196,6 @@ pub(crate) mod instant_internal {

#[cfg(target_arch = "x86")]
fn timestamp_rdtsc() -> Option<Duration> {
if !crate::arch::x86::has_cpuid() {
return None;
}

static FREQUENCY: crate::sync::OnceLock<u64> = crate::sync::OnceLock::new();

let freq = FREQUENCY
Expand Down

0 comments on commit 0e4358d

Please sign in to comment.