r329701 - [X86] Disable SGX for Skylake Server

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


Author: gbuella
Date: Tue Apr 10 07:04:21 2018
New Revision: 329701

URL: http://llvm.org/viewvc/llvm-project?rev=329701&view=rev
Log:
[X86] Disable SGX for Skylake Server

Reviewers: craig.topper, zvi, echristo

Reviewed By: craig.topper

Differential Revision: https://reviews.llvm.org/D45058


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

Modified: cfe/trunk/lib/Basic/Targets/X86.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Basic/Targets/X86.cpp?rev=329701&r1=329700&r2=329701&view=diff
==============================================================================
--- cfe/trunk/lib/Basic/Targets/X86.cpp (original)
+++ cfe/trunk/lib/Basic/Targets/X86.cpp Tue Apr 10 07:04:21 2018
@@ -182,7 +182,8 @@ bool X86TargetInfo::initFeatureMap(
     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;




More information about the cfe-commits mailing list