[PATCH] s390: sframe: test case PR gas/33756

Jens Remus jremus@linux.ibm.com
Wed Jan 7 13:08:30 GMT 2026


s390 64-bit (s390x) test case for PR gas/33756.

gas/testsuite/
	* gas/cfi-sframe/cfi-sframe.exp (cfi-sframe-s390x-pr33756): Run.
	* gas/cfi-sframe/cfi-sframe-s390x-pr33756.d: New test case.
	* gas/cfi-sframe/cfi-sframe-s390x-pr33756.s: Likewise.

Signed-off-by: Jens Remus <jremus@linux.ibm.com>
---
 .../gas/cfi-sframe/cfi-sframe-s390x-pr33756.d | 23 +++++++++++++++++++
 .../gas/cfi-sframe/cfi-sframe-s390x-pr33756.s | 23 +++++++++++++++++++
 gas/testsuite/gas/cfi-sframe/cfi-sframe.exp   |  1 +
 3 files changed, 47 insertions(+)
 create mode 100644 gas/testsuite/gas/cfi-sframe/cfi-sframe-s390x-pr33756.d
 create mode 100644 gas/testsuite/gas/cfi-sframe/cfi-sframe-s390x-pr33756.s

diff --git a/gas/testsuite/gas/cfi-sframe/cfi-sframe-s390x-pr33756.d b/gas/testsuite/gas/cfi-sframe/cfi-sframe-s390x-pr33756.d
new file mode 100644
index 000000000000..e572592a06b4
--- /dev/null
+++ b/gas/testsuite/gas/cfi-sframe/cfi-sframe-s390x-pr33756.d
@@ -0,0 +1,23 @@
+#as: --gsframe
+#objdump: --sframe=.sframe
+#name: SFrame generation on s390x - .cfi_remember_state after .cfi_startproc PR gas/33756
+#...
+Contents of the SFrame section .sframe:
+
+  Header :
+
+    Version: SFRAME_VERSION_2
+    Flags: SFRAME_F_FDE_FUNC_START_PCREL
+    Num FDEs: 1
+    Num FREs: 4
+
+  Function Index :
+
+    func idx \[0\]: pc = 0x0, size = 20 bytes
+    STARTPC +CFA +FP +RA +
+    0+0000 +sp\+160 +u +u +
+    0+0006 +sp\+160 +c-72 +c-48 +
+    0+000c +sp\+320 +c-72 +c-48 +
+    0+0012 +sp\+160 +u +u +
+
+#pass
diff --git a/gas/testsuite/gas/cfi-sframe/cfi-sframe-s390x-pr33756.s b/gas/testsuite/gas/cfi-sframe/cfi-sframe-s390x-pr33756.s
new file mode 100644
index 000000000000..7126d30284e3
--- /dev/null
+++ b/gas/testsuite/gas/cfi-sframe/cfi-sframe-s390x-pr33756.s
@@ -0,0 +1,23 @@
+	.text
+	.type foo, @function
+foo:
+	.cfi_startproc
+	.cfi_remember_state
+	stmg	%r6,%r15,48(%r15)
+	.cfi_rel_offset 6, 48
+	.cfi_rel_offset 7, 56
+	.cfi_rel_offset 8, 64
+	.cfi_rel_offset 9, 72
+	.cfi_rel_offset 10, 80
+	.cfi_rel_offset 11, 88
+	.cfi_rel_offset 12, 96
+	.cfi_rel_offset 13, 104
+	.cfi_rel_offset 14, 112
+	.cfi_rel_offset 15, 120
+	lay	%r15,-160(%r15)
+	.cfi_adjust_cfa_offset 160
+	lmg	%r6,%r15,160+48(%r15)
+	.cfi_restore_state
+	br	%r14
+	.cfi_endproc
+	.size foo, .-foo
diff --git a/gas/testsuite/gas/cfi-sframe/cfi-sframe.exp b/gas/testsuite/gas/cfi-sframe/cfi-sframe.exp
index 3e5d8967b402..4dbe69bc097f 100644
--- a/gas/testsuite/gas/cfi-sframe/cfi-sframe.exp
+++ b/gas/testsuite/gas/cfi-sframe/cfi-sframe.exp
@@ -95,4 +95,5 @@ if { [istarget "s390x*-*-*"] && [gas_sframe_check] } then {
     run_dump_test "cfi-sframe-s390x-fpra-register-1"
     run_dump_test "cfi-sframe-s390x-fpra-register-2"
     run_dump_test "cfi-sframe-s390x-ra-undefined-1"
+    run_dump_test "cfi-sframe-s390x-pr33756"
 }
-- 
2.51.0



More information about the Binutils mailing list