OSDN Git Service

Instrument Control Flow For Indirect Branch Tracking
authorOren Ben Simhon <oren.ben.simhon@intel.com>
Tue, 9 Jan 2018 08:51:18 +0000 (08:51 +0000)
committerOren Ben Simhon <oren.ben.simhon@intel.com>
Tue, 9 Jan 2018 08:51:18 +0000 (08:51 +0000)
commitb89275f988f79055a6d6f553a47772a0dedd6759
tree9f1e65bd90ce2ec0a23c3f75d4ed90f20c8d3e0b
parentcb3923fb1cfe9fd73e3275bd70dce1c0ba4c44c2
Instrument Control Flow For Indirect Branch Tracking

CET (Control-Flow Enforcement Technology) introduces a new mechanism called IBT (Indirect Branch Tracking).
According to IBT, each Indirect branch should land on dedicated ENDBR instruction (End Branch).
The new pass adds ENDBR instructions for every indirect jmp/call (including jumps using jump tables / switches).
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/D40482

Change-Id: Icb754489faf483a95248f96982a4e8b1009eb709

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@322062 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/X86/CMakeLists.txt
lib/Target/X86/X86.h
lib/Target/X86/X86IndirectBranchTracking.cpp [new file with mode: 0644]
lib/Target/X86/X86InstrSystem.td
lib/Target/X86/X86TargetMachine.cpp
test/CodeGen/X86/O0-pipeline.ll
test/CodeGen/X86/indirect-branch-tracking.ll [new file with mode: 0644]
test/MC/X86/cet-encoding.s