summaryrefslogtreecommitdiff
path: root/test/Preprocessor
diff options
context:
space:
mode:
authorOren Ben Simhon <oren.ben.simhon@intel.com>2017-11-26 12:34:54 +0000
committerOren Ben Simhon <oren.ben.simhon@intel.com>2017-11-26 12:34:54 +0000
commit30a844e21fc426ee4b4de22a142babe3705a63fe (patch)
treea936331c71021727e6d5bf8bc4b0dd93ede55195 /test/Preprocessor
parent24008b27d5f4c12c43f88e6f4037f16ec43a8bc3 (diff)
Control-Flow Enforcement Technology - Shadow Stack and Indirect Branch Tracking support (Clang side)
Shadow stack solution introduces a new stack for return addresses only. The stack has a Shadow Stack Pointer (SSP) that points to the last address to which we expect to return. If we return to a different address an exception is triggered. This patch includes shadow stack intrinsics as well as the corresponding CET header. It includes CET clang flags for shadow stack and Indirect Branch Tracking. 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/D40224 Change-Id: I79ad0925a028bbc94c8ecad75f6daa2f214171f1 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@318995 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Preprocessor')
-rw-r--r--test/Preprocessor/x86_target_features.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/Preprocessor/x86_target_features.c b/test/Preprocessor/x86_target_features.c
index ce3835f91f..e2d0e39a03 100644
--- a/test/Preprocessor/x86_target_features.c
+++ b/test/Preprocessor/x86_target_features.c
@@ -333,6 +333,10 @@
// ADX: #define __ADX__ 1
+// RUN: %clang -target i386-unknown-unknown -mshstk -x c -E -dM -o - %s | FileCheck -match-full-lines --check-prefix=CETSS %s
+
+// CETSS: #define __SHSTK__ 1
+
// RUN: %clang -target i386-unknown-unknown -march=atom -mrdseed -x c -E -dM -o - %s | FileCheck -match-full-lines --check-prefix=RDSEED %s
// RDSEED: #define __RDSEED__ 1