diff --git a/llvm/lib/DebugInfo/DWARF/DWARFDebugFrame.cpp b/llvm/lib/DebugInfo/DWARF/DWARFDebugFrame.cpp --- a/llvm/lib/DebugInfo/DWARF/DWARFDebugFrame.cpp +++ b/llvm/lib/DebugInfo/DWARF/DWARFDebugFrame.cpp @@ -1138,6 +1138,10 @@ // B-Key is used for signing functions associated with this // augmentation string break; + // This stack frame contains MTE tagged data, so needs to be + // untagged on unwind. + case 'G': + break; } } diff --git a/llvm/test/DebugInfo/AArch64/stack-tagging-cfi.s b/llvm/test/DebugInfo/AArch64/stack-tagging-cfi.s new file mode 100644 --- /dev/null +++ b/llvm/test/DebugInfo/AArch64/stack-tagging-cfi.s @@ -0,0 +1,18 @@ +# REQUIRES: aarch64-registered-target + +# RUN: llvm-mc -filetype=obj -triple aarch64-elfs -mattr=+mte %s -o %t.o +# RUN: llvm-dwarfdump --eh-frame %t.o | FileCheck %s + +# CHECK: Augmentation: "zRG" + + .text + .globl WithUnwind + .p2align 2 + .type WithUnwind,@function +WithUnwind: + .cfi_startproc + .cfi_mte_tagged_frame + ret +.Lfunc_end0: + .size WithUnwind, .Lfunc_end0-WithUnwind + .cfi_endproc