[MC] Add 'G' to augmentation string for MTE instrumented functions
authorFlorian Mayer <fmayer@google.com>
Fri, 3 Jun 2022 01:05:02 +0000 (18:05 -0700)
committerFlorian Mayer <fmayer@google.com>
Wed, 8 Jun 2022 19:36:32 +0000 (12:36 -0700)
commit0593ce5f0bbb7b9aebc5f15f60876b0bc7aad652
tree4751cdef76588ecbc6b1d1b6b4553b76b6fbd5c2
parent56eb8dcf1e00efca01cd6b41c7a85ab2c39b71eb
[MC] Add 'G' to augmentation string for MTE instrumented functions

This was agreed on in
https://lists.llvm.org/pipermail/llvm-dev/2020-May/141345.html

The thread proposed two options
* add a character to augmentation string and handle in libuwind
* use a separate personality function.

It was determined that this is the simpler and better option.

This is part of ARM's Aarch64 ABI:
https://github.com/ARM-software/abi-aa/blob/main/aadwarf64/aadwarf64.rst#id22

The next step after this is teaching libunwind to untag when this
augmentation character is set.

Reviewed By: MaskRay, eugenis

Differential Revision: https://reviews.llvm.org/D127007
13 files changed:
llvm/include/llvm/MC/MCDwarf.h
llvm/include/llvm/MC/MCStreamer.h
llvm/lib/MC/MCAsmStreamer.cpp
llvm/lib/MC/MCDwarf.cpp
llvm/lib/MC/MCParser/AsmParser.cpp
llvm/lib/MC/MCStreamer.cpp
llvm/lib/Target/AArch64/AArch64AsmPrinter.cpp
llvm/lib/Target/AArch64/AArch64FrameLowering.cpp
llvm/lib/Target/AArch64/AArch64InstrInfo.td
llvm/lib/Target/AArch64/AArch64MachineFunctionInfo.cpp
llvm/lib/Target/AArch64/AArch64MachineFunctionInfo.h
llvm/lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp
llvm/test/CodeGen/AArch64/stack-tagging-cfi.ll [new file with mode: 0644]