[PATCH] D27499: CFI-icall on Thumb
Evgeniy Stepanov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Dec 6 18:37:44 PST 2016
eugenis created this revision.
eugenis added a reviewer: pcc.
eugenis added a subscriber: llvm-commits.
eugenis set the repository for this revision to rL LLVM.
Herald added subscribers: rengolin, aemerson.
Replace @progbits in the section directive with %progbits, because "@" starts a comment on arm/thumb.
Use b.w branch instruction.
Use .thumb_function and .thumb_set for proper arm/thumb interwork. This way jumptable entry addresses on thumb have bit 0 set (correctly). This does not affect CFI check math, because the address of the jumptable start also has that bit set.
This does not work on thumbv5, because it does not support b.w, and the linker would not insert a veneer (trampoline?) to extend the range of b.n. We may need to do full-range plt-style jumptables on thumbv54, which are 12 bytes per entry. Another option is "push lr; bl; pop pc" (4 bytes) but that needs unwinding instructions, etc.
Repository:
rL LLVM
https://reviews.llvm.org/D27499
Files:
lib/Transforms/IPO/LowerTypeTests.cpp
test/Transforms/LowerTypeTests/function.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D27499.80528.patch
Type: text/x-patch
Size: 7336 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20161207/466075f7/attachment-0001.bin>
More information about the llvm-commits
mailing list