[llvm] [Sframe] Support cfi_escape directives compatibly with gnu-gas (PR #161927)
via llvm-commits
llvm-commits at lists.llvm.org
Wed Oct 8 12:25:11 PDT 2025
================
@@ -0,0 +1,46 @@
+# RUN: llvm-mc --filetype=obj --gsframe -triple x86_64 %s -o %t.o
+# RUN: llvm-readelf --sframe %t.o | FileCheck %s
+
+# Tests that .cfi_escape sequences that are are ok to pass through work.
+
+ .align 1024
+cfi_escape_ok:
+ .cfi_startproc
+ .long 0
+ .cfi_def_cfa_offset 16
+ # Uninteresting register
+# DW_CFA_expression,reg 0xc,length 2,DW_OP_breg6,SLEB(-8)
+ .cfi_escape 0x10,0xc,0x2,0x76,0x78
+# DW_CFA_nop
+ .cfi_escape 0x0
+ .cfi_escape 0x0,0x0,0x0,0x0
+ # Uninteresting register
+# DW_CFA_val_offset,reg 0xc,ULEB scaled offset
+ .cfi_escape 0x14,0xc,0x4
+ .long 0
+ .cfi_endproc
+
+cfi_escape_gnu_args_fp:
+ .cfi_startproc
+ .long 0
+# DW_CFA_GNU_args_size is OK arg size is zero
----------------
weiguozhi wrote:
if arg size is zero.
https://github.com/llvm/llvm-project/pull/161927
More information about the llvm-commits
mailing list