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>
--- /dev/null
+#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
--- /dev/null
+# Although not a useful construct by itself, ensure graceful handling.
+ .cfi_startproc
+ .cfi_def_cfa_register 11
+ .cfi_endproc
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"