And add tests for its interaction with -fcf-protection=branch
Unit tests: fail. 62040 tests passed, 2 failed and 783 were skipped.
failed: libc++.std/thread/thread_mutex/thread_mutex_requirements/thread_mutex_requirements_mutex/thread_mutex_class/try_lock.pass.cpp failed: libc++.std/thread/thread_mutex/thread_mutex_requirements/thread_mutex_requirements_mutex/thread_mutex_recursive/lock.pass.cpp
|2646 ↗||(On Diff #239212)|
See comments on D73070 about making nop emission generic.
Need to know where .Lfunc_end2 is placed, please add a CHECK for it.
Unit tests: fail. 62081 tests passed, 1 failed and 784 were skipped.
clang-format: fail. Please format your changes with clang-format by running git-clang-format HEAD^ or applying this patch.
Sorry, I made a typo.
It should be -fcf-protection=branch (https://gcc.gnu.org/onlinedocs/gcc/Instrumentation-Options.html)
This is the Intel technology which resembles to AArch64's IBT.
Yes, and I think the name of the test is still misspelled, I think.
Consider the test modified in https://reviews.llvm.org/D73070 named llvm/test/CodeGen/AArch64/patchable-function-entry-bti.ll, but this file is named llvm/test/CodeGen/X86/patchable-function-entry-ibt.ll. bti vs ibt. Not only is the order different, but bti is only (?) aarch64 specific, so maybe the filename of this test should have fcf, not bti (or ibt).
AArch64: Branch Target Identification (bti)
I think the filename is correct, but my comment above made a typo...