llvm-project/llvm/unittests/tools
Joel Galenson 06e7e5798f [cfi-verify] Support AArch64.
This patch adds support for AArch64 to cfi-verify.

This required three changes to cfi-verify.  First, it generalizes checking if an instruction is a trap by adding a new isTrap flag to TableGen (and defining it for x86 and AArch64).  Second, the code that ensures that the operand register is not clobbered between the CFI check and the indirect call needs to allow a single dereference (in x86 this happens as part of the jump instruction).  Third, we needed to ensure that return instructions are not counted as indirect branches.  Technically, returns are indirect branches and can be covered by CFI, but LLVM's forward-edge CFI does not protect them, and x86 does not consider them, so we keep that behavior.

In addition, we had to improve AArch64's code to evaluate the branch target of a MCInst to handle calls where the destination is not the first operand (which it often is not).

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

llvm-svn: 337007
2018-07-13 15:19:33 +00:00
..
llvm-cfi-verify [cfi-verify] Support AArch64. 2018-07-13 15:19:33 +00:00
llvm-exegesis [llvm-exegesis] Adjust AArch64 unit test 2018-07-03 10:52:20 +00:00
CMakeLists.txt [llvm-exegesis] Run unit tests on more platforms. 2018-04-13 12:20:30 +00:00