[llvm] a2695c3 - [DWARF] Support 'G' in dwarf parser

Florian Mayer via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 8 14:27:56 PDT 2022


Author: Florian Mayer
Date: 2022-06-08T14:27:51-07:00
New Revision: a2695c3fe1b7d78de9c15766a6751e919e139f53

URL: https://github.com/llvm/llvm-project/commit/a2695c3fe1b7d78de9c15766a6751e919e139f53
DIFF: https://github.com/llvm/llvm-project/commit/a2695c3fe1b7d78de9c15766a6751e919e139f53.diff

LOG: [DWARF] Support 'G' in dwarf parser

Reviewed By: MaskRay

Differential Revision: https://reviews.llvm.org/D127171

Added: 
    llvm/test/DebugInfo/AArch64/stack-tagging-cfi.s

Modified: 
    llvm/lib/DebugInfo/DWARF/DWARFDebugFrame.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/DebugInfo/DWARF/DWARFDebugFrame.cpp b/llvm/lib/DebugInfo/DWARF/DWARFDebugFrame.cpp
index 86b4a2fe270fc..9e5cbc601546f 100644
--- a/llvm/lib/DebugInfo/DWARF/DWARFDebugFrame.cpp
+++ b/llvm/lib/DebugInfo/DWARF/DWARFDebugFrame.cpp
@@ -1138,6 +1138,10 @@ Error DWARFDebugFrame::parse(DWARFDataExtractor Data) {
             // 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
index 0000000000000..d63cb1a90cea0
--- /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, at function
+WithUnwind:
+	.cfi_startproc
+	.cfi_mte_tagged_frame
+	ret
+.Lfunc_end0:
+	.size	WithUnwind, .Lfunc_end0-WithUnwind
+	.cfi_endproc


        


More information about the llvm-commits mailing list