Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions crates/core_arch/src/x86/cpuid.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,10 @@ pub struct CpuidResult {
#[cfg_attr(test, assert_instr(cpuid))]
#[stable(feature = "simd_x86", since = "1.27.0")]
pub fn __cpuid_count(leaf: u32, sub_leaf: u32) -> CpuidResult {
if cfg!(target_env = "sgx") {
panic!("`__cpuid` cannot be used in SGX");
}

let eax;
let ebx;
let ecx;
Expand Down