Add SGX target
This commit is contained in:
parent
271faf05b8
commit
25c30821af
1 changed files with 6 additions and 2 deletions
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue