summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/X86/X86IndirectBranchTracking.cpp
diff options
context:
space:
mode:
authorPeter Collingbourne <peter@pcc.me.uk>2019-07-31 20:14:19 +0000
committerPeter Collingbourne <peter@pcc.me.uk>2019-07-31 20:14:19 +0000
commit09f39967a2e8d145d4eb0635d735839e1dbf8611 (patch)
tree75f710181fe7c07ce6a9a83d727d1a62043c0b05 /llvm/lib/Target/X86/X86IndirectBranchTracking.cpp
parent33773d5cfcee03a0ae9abff4f03f1856def0f5d1 (diff)
downloadbcm5719-llvm-09f39967a2e8d145d4eb0635d735839e1dbf8611.tar.gz
bcm5719-llvm-09f39967a2e8d145d4eb0635d735839e1dbf8611.zip
AArch64: Add a tagged-globals backend feature.
This feature instructs the backend to allow locally defined global variable addresses to contain a pointer tag in bits 56-63 that will be ignored by the hardware (i.e. TBI), but may be used by an instrumentation pass such as HWASAN. It works by adding a MOVK instruction to the regular ADRP/ADD sequence that sets bits 48-63 to the corresponding bits of the global, with the linker bounds check disabled on the ADRP instruction to prevent the tag from causing a link failure. This implementation of the feature omits the MOVK when loading from or storing to a global, which is sufficient for TBI. If the same approach is extended to MTE, assuming that 0 is not configured as a catch-all tag, we will most likely also need the MOVK in this case in order to avoid a tag mismatch. Differential Revision: https://reviews.llvm.org/D65364 llvm-svn: 367475
Diffstat (limited to 'llvm/lib/Target/X86/X86IndirectBranchTracking.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud