aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJens Remus <jremus@linux.ibm.com>2025-07-11 10:29:40 +0200
committerJens Remus <jremus@linux.ibm.com>2025-07-11 10:29:40 +0200
commite2dfd75e00b0d7cd65b5829872dd18c33f0f3089 (patch)
treec3f1f1fda43dd4b860d1ae78d24972f6b7c95498
parent95847aaba18107b59081d1a800a5910bebd7f75d (diff)
downloadbinutils-e2dfd75e00b0d7cd65b5829872dd18c33f0f3089.zip
binutils-e2dfd75e00b0d7cd65b5829872dd18c33f0f3089.tar.gz
binutils-e2dfd75e00b0d7cd65b5829872dd18c33f0f3089.tar.bz2
s390: sframe: Test handling of .cfi_def_cfa_register
Port x86-64 test for handling of .cfi_def_cfa_register from commit 3602da6fa285 ("gas: sframe: fix handling of .cfi_def_cfa_register") to s390x. gas/testsuite/ PR gas/32879 * gas/cfi-sframe/cfi-sframe.exp: Add new test for handling of .cfi_def_cfa_register on s390x. * gas/cfi-sframe/cfi-sframe-s390x-3.d: Likewise. * gas/cfi-sframe/cfi-sframe-s390x-3.s: Likewise. Bug: https://sourceware.org/PR32879 Signed-off-by: Jens Remus <jremus@linux.ibm.com>
-rw-r--r--gas/testsuite/gas/cfi-sframe/cfi-sframe-s390x-3.d19
-rw-r--r--gas/testsuite/gas/cfi-sframe/cfi-sframe-s390x-3.s4
-rw-r--r--gas/testsuite/gas/cfi-sframe/cfi-sframe.exp1
3 files changed, 24 insertions, 0 deletions
diff --git a/gas/testsuite/gas/cfi-sframe/cfi-sframe-s390x-3.d b/gas/testsuite/gas/cfi-sframe/cfi-sframe-s390x-3.d
new file mode 100644
index 0000000..f775fe5
--- /dev/null
+++ b/gas/testsuite/gas/cfi-sframe/cfi-sframe-s390x-3.d
@@ -0,0 +1,19 @@
+#name: SFrame generation on s390x - .cfi_def_cfa_register with no previous offset
+#as: --gsframe
+#objdump: --sframe=.sframe
+#...
+Contents of the SFrame section .sframe:
+
+ Header :
+
+ Version: SFRAME_VERSION_2
+ Flags: SFRAME_F_FDE_FUNC_START_PCREL
+ Num FDEs: 1
+ Num FREs: 1
+
+ Function Index :
+
+ func idx \[0\]: pc = 0x0, size = 0 bytes
+ STARTPC +CFA +FP +RA +
+ 0+0000 +fp\+160 +u +u +
+#pass
diff --git a/gas/testsuite/gas/cfi-sframe/cfi-sframe-s390x-3.s b/gas/testsuite/gas/cfi-sframe/cfi-sframe-s390x-3.s
new file mode 100644
index 0000000..ea8c9e1
--- /dev/null
+++ b/gas/testsuite/gas/cfi-sframe/cfi-sframe-s390x-3.s
@@ -0,0 +1,4 @@
+# Although not a useful construct by itself, ensure graceful handling.
+ .cfi_startproc
+ .cfi_def_cfa_register 11
+ .cfi_endproc
diff --git a/gas/testsuite/gas/cfi-sframe/cfi-sframe.exp b/gas/testsuite/gas/cfi-sframe/cfi-sframe.exp
index b26ce60..9c5a16f 100644
--- a/gas/testsuite/gas/cfi-sframe/cfi-sframe.exp
+++ b/gas/testsuite/gas/cfi-sframe/cfi-sframe.exp
@@ -115,6 +115,7 @@ if { [istarget "aarch64*-*-*"] && [gas_sframe_check] } then {
if { [istarget "s390x*-*-*"] && [gas_sframe_check] } then {
run_dump_test "cfi-sframe-s390x-1"
run_dump_test "cfi-sframe-s390x-2"
+ run_dump_test "cfi-sframe-s390x-3"
run_dump_test "cfi-sframe-s390x-err-1"
run_dump_test "cfi-sframe-s390x-err-2"
run_dump_test "cfi-sframe-s390x-err-3"