Skip to content

Commit aae9a8b

Browse files
committed
Patch core_arch to tell programs that cpuid is not supported
1 parent 9f0fad0 commit aae9a8b

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed
+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
From 7403e2998345ef0650fd50628d7098d4d1e88e5c Mon Sep 17 00:00:00 2001
2+
From: bjorn3 <[email protected]>
3+
Date: Sat, 6 Apr 2019 12:16:21 +0200
4+
Subject: [PATCH] Remove usage of unsized locals
5+
6+
---
7+
src/stdarch/crates/core_arch/src/x86/cpuid.rs | 2 ++
8+
1 files changed, 2 insertions(+), 0 deletions(-)
9+
10+
diff --git a/src/stdarch/crates/core_arch/src/x86/cpuid.rs b/src/stdarch/crates/core_arch/src/x86/cpuid.rs
11+
index f313c42..ff952bc 100644
12+
--- a/src/stdarch/crates/core_arch/src/x86/cpuid.rs
13+
+++ b/src/stdarch/crates/core_arch/src/x86/cpuid.rs
14+
@@ -84,6 +84,9 @@ pub unsafe fn __cpuid(leaf: u32) -> CpuidResult {
15+
/// Does the host support the `cpuid` instruction?
16+
#[inline]
17+
pub fn has_cpuid() -> bool {
18+
+ // __cpuid intrinsic is not yet implemented
19+
+ return false;
20+
+
21+
#[cfg(target_env = "sgx")]
22+
{
23+
false
24+
--
25+
2.20.1 (Apple Git-117)

0 commit comments

Comments
 (0)