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,23 @@ +# REQUIRES: aarch64 + +# RUN: llvm-mc -filetype=obj -triple aarch64-generic-linux -mattr=+mte %s -o %t.o +# RUN: llvm-objdump -s --dwarf=frames %t.o | FileCheck %s + +# CHECK: Augmentation: "zRG" + + .text + .globl WithUnwind // -- Begin function WithUnwind + .p2align 2 + .type WithUnwind,@function +WithUnwind: // @WithUnwind + .cfi_startproc +// %bb.0: // %entry + .cfi_mte_tagged_frame + ret +.Lfunc_end0: + .size WithUnwind, .Lfunc_end0-WithUnwind + .cfi_endproc + // -- End function + .globl NoUnwind // -- Begin function NoUnwind + .p2align 2 + .type NoUnwind,@function