Skip to content

Commit

Permalink
Add SGX target
Browse files Browse the repository at this point in the history
  • Loading branch information
Jethro Beekman authored and gnzlbg committed Nov 19, 2018
1 parent 7fbd636 commit b90091e
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions coresimd/x86/cpuid.rs
Original file line number Diff line number Diff line change
Expand Up @@ -80,11 +80,15 @@ pub unsafe fn __cpuid(leaf: u32) -> CpuidResult {
/// Does the host support the `cpuid` instruction?
#[inline]
pub fn has_cpuid() -> bool {
#[cfg(target_arch = "x86_64")]
#[cfg(target_env = "sgx")]
{
false
}
#[cfg(all(not(target_env = "sgx"), target_arch = "x86_64"))]
{
true
}
#[cfg(target_arch = "x86")]
#[cfg(all(not(target_env = "sgx"), target_arch = "x86"))]
{
// Optimization for i586 and i686 Rust targets which SSE enabled
// and support cpuid:
Expand Down

0 comments on commit b90091e

Please sign in to comment.