[PATCH] D81251: [AArch64] Add BTI to CFI jumptables.
Evgenii Stepanov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 5 11:45:22 PDT 2020
eugenis added inline comments.
================
Comment at: llvm/lib/Transforms/IPO/LowerTypeTests.cpp:1211
+ if (M.getModuleFlag("branch-target-enforcement"))
+ return 4 + kARMJumpTableEntrySize; // bti c; b label;
return kARMJumpTableEntrySize;
----------------
I'd rather this was a named constant.
================
Comment at: llvm/lib/Transforms/IPO/LowerTypeTests.cpp:1233
+ } else if (JumpTableArch == Triple::aarch64) {
+ if (Dest->getParent()->getModuleFlag("branch-target-enforcement"))
+ AsmOS << "hint #34\n"; // BTI C
----------------
Do we need to check the function attribute here as well? What happens if a function opts out of BTI?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D81251/new/
https://reviews.llvm.org/D81251
More information about the llvm-commits
mailing list