Add SGX target

This commit is contained in:
Jethro Beekman 2018-11-01 15:59:07 -07:00 committed by gnzlbg
parent 271faf05b8
commit 25c30821af

View file

@ -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: