diff options
author | Alexander Ivchenko <alexander.ivchenko@intel.com> | 2018-05-18 11:58:25 +0000 |
---|---|---|
committer | Alexander Ivchenko <alexander.ivchenko@intel.com> | 2018-05-18 11:58:25 +0000 |
commit | 5c54742da4685ca0db0556454bfdd2b14e1bfc36 (patch) | |
tree | e097559d478a876939a05cc81d7e0f4d02999271 /llvm/lib/Target/X86/X86IndirectBranchTracking.cpp | |
parent | 0fb8c877c4a3f4fd74e1d3141b09cd22041f0291 (diff) | |
download | bcm5719-llvm-5c54742da4685ca0db0556454bfdd2b14e1bfc36.tar.gz bcm5719-llvm-5c54742da4685ca0db0556454bfdd2b14e1bfc36.zip |
[X86][CET] Changing -fcf-protection behavior to comply with gcc (LLVM part)
This patch aims to match the changes introduced in gcc by
https://gcc.gnu.org/ml/gcc-cvs/2018-04/msg00534.html. The
IBT feature definition is removed, with the IBT instructions
being freely available on all X86 targets. The shadow stack
instructions are also being made freely available, and the
use of all these CET instructions is controlled by the module
flags derived from the -fcf-protection clang option. The hasSHSTK
option remains since clang uses it to determine availability of
shadow stack instruction intrinsics, but it is no longer directly used.
Comes with a clang patch (D46881).
Patch by mike.dvoretsky
Differential Revision: https://reviews.llvm.org/D46882
llvm-svn: 332705
Diffstat (limited to 'llvm/lib/Target/X86/X86IndirectBranchTracking.cpp')
-rw-r--r-- | llvm/lib/Target/X86/X86IndirectBranchTracking.cpp | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/llvm/lib/Target/X86/X86IndirectBranchTracking.cpp b/llvm/lib/Target/X86/X86IndirectBranchTracking.cpp index ab401fa0258..7c00c9260d1 100644 --- a/llvm/lib/Target/X86/X86IndirectBranchTracking.cpp +++ b/llvm/lib/Target/X86/X86IndirectBranchTracking.cpp @@ -89,10 +89,6 @@ bool X86IndirectBranchTrackingPass::addENDBR(MachineBasicBlock &MBB) const { bool X86IndirectBranchTrackingPass::runOnMachineFunction(MachineFunction &MF) { const X86Subtarget &SubTarget = MF.getSubtarget<X86Subtarget>(); - // Make sure that the target supports IBT instruction. - if (!SubTarget.hasIBT()) - return false; - // Check that the cf-protection-branch is enabled. Metadata *isCFProtectionSupported = MF.getMMI().getModule()->getModuleFlag("cf-protection-branch"); |