From: Jens Remus Date: Mon, 27 Jan 2025 15:48:58 +0000 (+0100) Subject: s390: Additional tests for omitted base register operands X-Git-Tag: binutils-2_45~1831 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=9693d2fa7d6f08c4a23a7d851e98525091d43d92;p=thirdparty%2Fbinutils-gdb.git s390: Additional tests for omitted base register operands 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 --- diff --git a/gas/testsuite/gas/s390/zarch-warn-areg-zero.l b/gas/testsuite/gas/s390/zarch-warn-areg-zero.l index b820e4c77a1..daa23b002bd 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 15c792d776f..26174475e17 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