[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 rL329701: [X86] Disable SGX for Skylake Server (authored by GBuella, committed by ).
Herald added a subscriber: llvm-commits.

Repository:
  rL LLVM

https://reviews.llvm.org/D45058

Files:
  cfe/trunk/lib/Basic/Targets/X86.cpp


Index: cfe/trunk/lib/Basic/Targets/X86.cpp
===================================================================
--- cfe/trunk/lib/Basic/Targets/X86.cpp
+++ cfe/trunk/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.141838.patch
Type: text/x-patch
Size: 686 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20180410/5e3a291d/attachment.bin>


More information about the cfe-commits mailing list