[PATCH v2 08/47] s390: Position independent .insn test verification patterns

Jens Remus jremus@linux.ibm.com
Fri Nov 6 15:56:58 GMT 2026


This enables to insert new .insn pseudo-mnemonic tests in alphabetical
order.

While at it also test for an optional trailing padding nop.

gas/testsuite/
	* gas/s390/esa-operands.d: Use position independent test
	verification patterns.  Test for optional trailing padding nop.
	* gas/s390/zarch-operands.d: Likewise.

Signed-off-by: Jens Remus <jremus@linux.ibm.com>
---
 gas/testsuite/gas/s390/esa-operands.d   | 31 +++++++++++++------------
 gas/testsuite/gas/s390/zarch-operands.d | 13 ++++++-----
 2 files changed, 23 insertions(+), 21 deletions(-)

diff --git a/gas/testsuite/gas/s390/esa-operands.d b/gas/testsuite/gas/s390/esa-operands.d
index d1744086ba26..9de6a345e392 100644
--- a/gas/testsuite/gas/s390/esa-operands.d
+++ b/gas/testsuite/gas/s390/esa-operands.d
@@ -6,18 +6,19 @@
 Disassembly of section .text:
 
 .* <foo>:
-   0:	01 01 [ 	]*pr
-   2:	a7 1a 80 01 [ 	]*ahi	%r1,-32767
-   6:	18 12 [ 	]*lr	%r1,%r2
-   8:	b2 5e 00 12 [ 	]*srst	%r1,%r2
-   c:	b3 5b 93 12 [ 	]*didbr	%f1,%f9,%f2,3
-  10:	ba 12 40 03 [ 	]*cs	%r1,%r2,3\(%r4\)
-  14:	84 12 00 00 [ 	]*brxh	%r1,%r2,14 <foo\+0x14>
-[ 	]*16: R_390_PC16DBL	test_rsi\+0x2
-  18:	58 13 40 02 [ 	]*l	%r1,2\(%r3,%r4\)
-  1c:	ed 10 30 02 00 1a [ 	]*adb	%f1,2\(%r3\)
-  22:	ed 24 50 03 10 1e [ 	]*madb	%f1,%f2,3\(%r4,%r5\)
-  28:	b2 33 20 01 [ 	]*ssch	1\(%r2\)
-  2c:	92 03 20 01 [ 	]*mvi	1\(%r2\),3
-  30:	d2 26 30 01 50 04 [ 	]*mvc	1\(39,%r3\),4\(%r5\)
-  36:	e5 01 20 01 40 03 [ 	]*tprot	1\(%r2\),3\(%r4\)
+.*:	01 01 [	 ]*pr
+.*:	a7 1a 80 01 [	 ]*ahi	%r1,-32767
+.*:	18 12 [	 ]*lr	%r1,%r2
+.*:	b2 5e 00 12 [	 ]*srst	%r1,%r2
+.*:	b3 5b 93 12 [	 ]*didbr	%f1,%f9,%f2,3
+.*:	ba 12 40 03 [	 ]*cs	%r1,%r2,3\(%r4\)
+ *([\da-f]+):	84 12 00 00 [	 ]*brxh	%r1,%r2,\1 <foo\+0x\1>
+.*: R_390_PC16DBL	test_rsi\+0x2
+.*:	58 13 40 02 [	 ]*l	%r1,2\(%r3,%r4\)
+.*:	ed 10 30 02 00 1a [	 ]*adb	%f1,2\(%r3\)
+.*:	ed 24 50 03 10 1e [	 ]*madb	%f1,%f2,3\(%r4,%r5\)
+.*:	b2 33 20 01 [	 ]*ssch	1\(%r2\)
+.*:	92 03 20 01 [	 ]*mvi	1\(%r2\),3
+.*:	d2 26 30 01 50 04 [	 ]*mvc	1\(39,%r3\),4\(%r5\)
+.*:	e5 01 20 01 40 03 [	 ]*tprot	1\(%r2\),3\(%r4\)
+#?.*:	07 07 [	 ]*nopr	%r7
diff --git a/gas/testsuite/gas/s390/zarch-operands.d b/gas/testsuite/gas/s390/zarch-operands.d
index f92df79356ee..483781269d0d 100644
--- a/gas/testsuite/gas/s390/zarch-operands.d
+++ b/gas/testsuite/gas/s390/zarch-operands.d
@@ -6,9 +6,10 @@
 Disassembly of section .text:
 
 .* <foo>:
-   0:	ec 12 00 00 00 45 [ 	]*brxlg	%r1,%r2,0 <foo>
-[ 	]*2: R_390_PC16DBL	test_rie\+0x2
-   6:	c0 e5 00 00 00 00 [ 	]*brasl	%r14,6 <foo\+0x6>
-[ 	]*8: R_390_PC32DBL	test_ril\+0x2
-   c:	eb 12 40 03 00 0d [ 	]*sllg	%r1,%r2,3\(%r4\)
-  12:	c8 50 20 01 40 03 [ 	]*mvcos	1\(%r2\),3\(%r4\),%r5
+ *([\da-f]+):	ec 12 00 00 00 45 [	 ]*brxlg	%r1,%r2,\1 <foo>
+.*: R_390_PC16DBL	test_rie\+0x2
+ *([\da-f]+):	c0 e5 00 00 00 00 [	 ]*brasl	%r14,\1 <foo\+0x\1>
+.*: R_390_PC32DBL	test_ril\+0x2
+.*:	eb 12 40 03 00 0d [	 ]*sllg	%r1,%r2,3\(%r4\)
+.*:	c8 50 20 01 40 03 [	 ]*mvcos	1\(%r2\),3\(%r4\),%r5
+#?.*:	07 07 [	 ]*nopr	%r7
-- 
2.53.0



More information about the Binutils mailing list