[PATCH] D45058: [X86] Disable SGX for Skylake Server

Gabor Buella via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Apr 10 07:10:14 PDT 2018


This revision was automatically updated to reflect the committed changes.
Closed by commit rC329701: [X86] Disable SGX for Skylake Server (authored by GBuella, committed by ).

Changed prior to commit:
  https://reviews.llvm.org/D45058?vs=140302&id=141839#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D45058

Files:
  lib/Basic/Targets/X86.cpp


Index: lib/Basic/Targets/X86.cpp
===================================================================
--- lib/Basic/Targets/X86.cpp
+++ lib/Basic/Targets/X86.cpp
@@ -182,7 +182,8 @@
     setFeatureEnabledImpl(Features, "xsavec", true);
     setFeatureEnabledImpl(Features, "xsaves", true);
     setFeatureEnabledImpl(Features, "mpx", true);
-    setFeatureEnabledImpl(Features, "sgx", true);
+    if (Kind != CK_SkylakeServer) // SKX inherits all SKL features, except SGX
+      setFeatureEnabledImpl(Features, "sgx", true);
     setFeatureEnabledImpl(Features, "clflushopt", true);
     setFeatureEnabledImpl(Features, "rtm", true);
     LLVM_FALLTHROUGH;


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D45058.141839.patch
Type: text/x-patch
Size: 656 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20180410/3fda2492/attachment.bin>


More information about the cfe-commits mailing list