summaryrefslogtreecommitdiff
path: root/lib/Target/X86/X86.td
diff options
context:
space:
mode:
authorOren Ben Simhon <oren.ben.simhon@intel.com>2017-11-26 13:02:45 +0000
committerOren Ben Simhon <oren.ben.simhon@intel.com>2017-11-26 13:02:45 +0000
commit40090f420c5f77f0bdfafbab4596a1605b767f4b (patch)
tree6717fc3acc581e03b9586ef3b752e7147e8e13db /lib/Target/X86/X86.td
parenta897faafb78649a4c5ad32911f2a7e7174f9cc93 (diff)
Control-Flow Enforcement Technology - Shadow Stack support (LLVM side)
Shadow stack solution introduces a new stack for return addresses only. The HW has a Shadow Stack Pointer (SSP) that points to the next return address. If we return to a different address, an exception is triggered. The shadow stack is managed using a series of intrinsics that are introduced in this patch as well as the new register (SSP). The intrinsics are mapped to new instruction set that implements CET mechanism. The patch also includes initial infrastructure support for IBT. For more information, please see the following: https://software.intel.com/sites/default/files/managed/4d/2a/control-flow-enforcement-technology-preview.pdf Differential Revision: https://reviews.llvm.org/D40223 Change-Id: I4daa1f27e88176be79a4ac3b4cd26a459e88fed4 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318996 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/X86/X86.td')
-rw-r--r--lib/Target/X86/X86.td4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/Target/X86/X86.td b/lib/Target/X86/X86.td
index 8c1136341de..f1e57091b0d 100644
--- a/lib/Target/X86/X86.td
+++ b/lib/Target/X86/X86.td
@@ -213,6 +213,10 @@ def FeatureADX : SubtargetFeature<"adx", "HasADX", "true",
def FeatureSHA : SubtargetFeature<"sha", "HasSHA", "true",
"Enable SHA instructions",
[FeatureSSE2]>;
+def FeatureSHSTK : SubtargetFeature<"shstk", "HasSHSTK", "true",
+ "Support CET Shadow-Stack instructions">;
+def FeatureIBT : SubtargetFeature<"ibt", "HasIBT", "true",
+ "Support CET Indirect-Branch-Tracking instructions">;
def FeaturePRFCHW : SubtargetFeature<"prfchw", "HasPRFCHW", "true",
"Support PRFCHW instructions">;
def FeatureRDSEED : SubtargetFeature<"rdseed", "HasRDSEED", "true",