[cfi-verify] Validate there are no register clobbers between CFI-check and instructio...
authorMitch Phillips <mitchphillips@outlook.com>
Wed, 15 Nov 2017 00:35:26 +0000 (00:35 +0000)
committerMitch Phillips <mitchphillips@outlook.com>
Wed, 15 Nov 2017 00:35:26 +0000 (00:35 +0000)
commit2e7be2a65af2ffdd7ce378b54d16b9e3859ff3b5
tree81b21cf2d236a2e280911bfab0de1ca6dbbb7443
parentbf6495fbcbc29527c799d320d1f36a256798a095
[cfi-verify] Validate there are no register clobbers between CFI-check and instruction execution.

Summary:
This patch adds another failure mode for `validateCFIProtection(..)`, wherein any register that affects the indirect control flow instruction is clobbered to between the CFI-check and the instruction's execution.

Also includes a modification to make MCInstrDesc::hasDefOfPhysReg public.

Reviewers: vlad.tsyrklevich

Reviewed By: vlad.tsyrklevich

Subscribers: llvm-commits, pcc, kcc

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

llvm-svn: 318238
llvm/include/llvm/MC/MCInstrDesc.h
llvm/tools/llvm-cfi-verify/lib/FileAnalysis.cpp
llvm/tools/llvm-cfi-verify/lib/FileAnalysis.h
llvm/tools/llvm-cfi-verify/lib/GraphBuilder.cpp
llvm/tools/llvm-cfi-verify/lib/GraphBuilder.h
llvm/unittests/tools/llvm-cfi-verify/FileAnalysis.cpp