We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 441d109 commit 147cf9cCopy full SHA for 147cf9c
src/lib.rs
@@ -19,12 +19,14 @@ extern crate bitflags;
19
pub mod native_cpuid {
20
use super::CpuIdResult;
21
22
- #[cfg(target_arch = "x86")]
+ #[cfg(all(target_arch = "x86", not(target_env = "sgx"), target_feature = "sse"))]
23
use core::arch::x86 as arch;
24
- #[cfg(target_arch = "x86_64")]
+ #[cfg(all(target_arch = "x86_64", not(target_env = "sgx")))]
25
use core::arch::x86_64 as arch;
26
27
pub fn cpuid_count(a: u32, c: u32) -> CpuIdResult {
28
+ // Safety: CPUID is supported on all x86_64 CPUs and all x86 CPUs with
29
+ // SSE, but not by SGX.
30
let result = unsafe { self::arch::__cpuid_count(a, c) };
31
32
CpuIdResult {
0 commit comments