[1/4] s390: Additional tests for omitted base register operands

Message ID 20250124115209.3287742-2-jremus@linux.ibm.com
State Committed
Headers
Series [1/4] s390: Additional tests for omitted base register operands |

Checks

Context Check Description
linaro-tcwg-bot/tcwg_binutils_build--master-arm success Build passed
linaro-tcwg-bot/tcwg_binutils_build--master-aarch64 success Build passed
linaro-tcwg-bot/tcwg_binutils_check--master-aarch64 success Test passed
linaro-tcwg-bot/tcwg_binutils_check--master-arm success Test passed

Commit Message

Jens Remus Jan. 24, 2025, 11:52 a.m. UTC
  This complements commit aacf780bca29 ("s390: Allow to explicitly omit
base register operand in assembly").

gas/testsuite/
	* gas/s390/zarch-warn-areg-zero.l: Add tests for omitted base
	register operands.
	* gas/s390/zarch-warn-areg-zero.s: Likewise.

Signed-off-by: Jens Remus <jremus@linux.ibm.com>
---
 gas/testsuite/gas/s390/zarch-warn-areg-zero.l | 10 +++++
 gas/testsuite/gas/s390/zarch-warn-areg-zero.s | 38 +++++++++----------
 2 files changed, 29 insertions(+), 19 deletions(-)
  

Patch

diff --git a/gas/testsuite/gas/s390/zarch-warn-areg-zero.l b/gas/testsuite/gas/s390/zarch-warn-areg-zero.l
index b820e4c77a13..daa23b002bdb 100644
--- a/gas/testsuite/gas/s390/zarch-warn-areg-zero.l
+++ b/gas/testsuite/gas/s390/zarch-warn-areg-zero.l
@@ -9,10 +9,12 @@ 
 .*:22: Warning: operand 2: base register specified but zero
 .*:23: Warning: operand 2: index register specified but zero
 .*:23: Warning: operand 2: base register specified but zero
+.*:24: Warning: operand 2: index register specified but zero
 .*:25: Warning: operand 2: index register specified but zero
 .*:25: Warning: operand 2: base register specified but zero
 .*:26: Warning: operand 2: index register specified but zero
 .*:26: Warning: operand 2: base register specified but zero
+.*:27: Warning: operand 2: index register specified but zero
 .*:28: Warning: operand 2: index register specified but zero
 .*:28: Warning: operand 2: base register specified but zero
 .*:29: Warning: operand 2: base register specified but zero
@@ -31,6 +33,8 @@ 
 .*:53: Warning: operand 1: base register specified but zero
 .*:53: Warning: operand 2: base register specified but zero
 .*:55: Warning: operand 1: base register specified but zero
+.*:56: Warning: operand 2: base register specified but zero
+.*:57: Warning: operand 2: base register specified but zero
 .*:60: Warning: operand 2: base register specified but zero
 .*:61: Warning: operand 2: base register specified but zero
 .*:68: Warning: operand 1: base register specified but zero
@@ -41,12 +45,16 @@ 
 .*:76: Warning: operand 2: base register specified but zero
 .*:77: Warning: operand 1: base register specified but zero
 .*:77: Warning: operand 2: base register specified but zero
+.*:78: Warning: operand 1: base register specified but zero
 .*:79: Warning: operand 1: base register specified but zero
 .*:80: Warning: operand 1: base register specified but zero
 .*:80: Warning: operand 2: base register specified but zero
 .*:81: Warning: operand 1: base register specified but zero
 .*:81: Warning: operand 2: base register specified but zero
+.*:82: Warning: operand 1: base register specified but zero
 .*:83: Warning: operand 1: base register specified but zero
+.*:84: Warning: operand 2: base register specified but zero
+.*:85: Warning: operand 2: base register specified but zero
 .*:88: Warning: operand 2: base register specified but zero
 .*:89: Warning: operand 2: base register specified but zero
 .*:96: Warning: operand 2: index register specified but zero
@@ -57,9 +65,11 @@ 
 .*:103: Warning: operand 2: base register specified but zero
 .*:104: Warning: operand 2: index register specified but zero
 .*:104: Warning: operand 2: base register specified but zero
+.*:105: Warning: operand 2: index register specified but zero
 .*:106: Warning: operand 2: index register specified but zero
 .*:106: Warning: operand 2: base register specified but zero
 .*:107: Warning: operand 2: index register specified but zero
 .*:107: Warning: operand 2: base register specified but zero
+.*:108: Warning: operand 2: index register specified but zero
 .*:109: Warning: operand 2: base register specified but zero
 .*:110: Warning: operand 2: base register specified but zero
diff --git a/gas/testsuite/gas/s390/zarch-warn-areg-zero.s b/gas/testsuite/gas/s390/zarch-warn-areg-zero.s
index 15c792d776fa..26174475e17e 100644
--- a/gas/testsuite/gas/s390/zarch-warn-areg-zero.s
+++ b/gas/testsuite/gas/s390/zarch-warn-areg-zero.s
@@ -18,13 +18,13 @@  foo:
 	a	%r1,16(%r3)
 	a	%r1,16(%r2,%r0)
 	a	%r1,16(%r2,0)
-#	a	%r1,16(%r2,)		# syntax error: explicitly omitted base
+	a	%r1,16(%r2,)
 	a	%r1,16(%r0,%r0)
 	a	%r1,16(%r0,0)
-#	a	%r1,16(%r0,)		# syntax error: explicitly omitted base
+	a	%r1,16(%r0,)
 	a	%r1,16(0,%r0)
 	a	%r1,16(0,0)
-#	a	%r1,16(0,)		# syntax error: explicitly omitted base
+	a	%r1,16(0,)
 	a	%r1,16(0,%r0)
 	a	%r1,16(,%r0)
 	a	%r1,16(,0)
@@ -39,7 +39,7 @@  foo:
 	mvc	16(1,%r1),32(%r2)
 	mvc	16(1,%r0),32(%r2)
 	mvc	16(1,0),32(%r2)
-#	mvc	16(1,),32(%r2)		# syntax error: explicitly omitted base
+	mvc	16(1,),32(%r2)
 	mvc	16(1),32(%r2)
 	mvc	16(1,%r1),32(%r0)
 	mvc	16(1,%r1),32(0)
@@ -53,10 +53,10 @@  foo:
 	mvc	16(1,0),32(0)
 #	mvc	16(1,0),32()		# syntax error: empty parentheses
 	mvc	16(1,0),32
-#	mvc	16(1,),32(%r0)		# syntax error: explicitly omitted base
-#	mvc	16(1,),32(0)		# syntax error: explicitly omitted base
+	mvc	16(1,),32(%r0)
+	mvc	16(1,),32(0)
 #	mvc	16(1,),32()		# syntax error: explicitly omitted base & empty parentheses
-#	mvc	16(1,),32		# syntax error: explicitly omitted base
+	mvc	16(1,),32
 	mvc	16(1),32(%r0)
 	mvc	16(1),32(0)
 #	mvc	16(1),32()		# syntax error: empty parentheses
@@ -67,27 +67,27 @@  foo:
 	unpk	16(1,%r1),32(2,%r2)
 	unpk	16(1,%r0),32(2,%r2)
 	unpk	16(1,0),32(2,%r2)
-#	unpk	16(1,),32(2,%r2)	# syntax error: explicitly omitted base
+	unpk	16(1,),32(2,%r2)
 	unpk	16(1),32(2,%r2)
 	unpk	16(1,%r1),32(2,%r0)
 	unpk	16(1,%r1),32(2,0)
-#	unpk	16(1,%r1),32(2,)	# syntax error: explicitly omitted base
+	unpk	16(1,%r1),32(2,)
 	unpk	16(1,%r1),32(2)
 	unpk	16(1,%r0),32(2,%r0)
 	unpk	16(1,%r0),32(2,0)
-#	unpk	16(1,%r0),32(2,)	# syntax error: explicitly omitted base
+	unpk	16(1,%r0),32(2,)
 	unpk	16(1,%r0),32(2)
 	unpk	16(1,0),32(2,%r0)
 	unpk	16(1,0),32(2,0)
-#	unpk	16(1,0),32(2,)		# syntax error: explicitly omitted base
+	unpk	16(1,0),32(2,)
 	unpk	16(1,0),32(2)
-#	unpk	16(1,),32(2,%r0)	# syntax error: explicitly omitted base
-#	unpk	16(1,),32(2,0)		# syntax error: explicitly omitted base
-#	unpk	16(1,),32(2,)		# syntax error: explicitly omitted base
-#	unpk	16(1,),32(2)		# syntax error: explicitly omitted base
+	unpk	16(1,),32(2,%r0)
+	unpk	16(1,),32(2,0)
+	unpk	16(1,),32(2,)
+	unpk	16(1,),32(2)
 	unpk	16(1),32(2,%r0)
 	unpk	16(1),32(2,0)
-#	unpk	16(1),32(2,)		# syntax error: explicitly omitted base
+	unpk	16(1),32(2,)
 	unpk	16(1),32(2)
 	unpk	0(1),0(2)
 
@@ -99,13 +99,13 @@  foo:
 	vgef	%v1,16(%r3),0
 	vgef	%v1,16(%v2,%r0),0
 	vgef	%v1,16(%v2,0),0
-#	vgef	%v1,16(%v2,),0		# syntax error: explicitly omitted base
+	vgef	%v1,16(%v2,),0
 	vgef	%v1,16(%v0,%r0),0
 	vgef	%v1,16(%v0,0),0
-#	vgef	%v1,16(%v0,),0		# syntax error: explicitly omitted base
+	vgef	%v1,16(%v0,),0
 	vgef	%v1,16(0,%r0),0
 	vgef	%v1,16(0,0),0
-#	vgef	%v1,16(0,),0		# syntax error: explicitly omitted base
+	vgef	%v1,16(0,),0
 	vgef	%v1,16(,%r0),0
 	vgef	%v1,16(,0),0
 #	vgef	%v1,16(,),0		# syntax error: explicitly omitted index & base