]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
s390: Additional tests for omitted base register operands
authorJens Remus <jremus@linux.ibm.com>
Mon, 27 Jan 2025 15:48:58 +0000 (16:48 +0100)
committerJens Remus <jremus@linux.ibm.com>
Mon, 27 Jan 2025 15:48:58 +0000 (16:48 +0100)
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
gas/testsuite/gas/s390/zarch-warn-areg-zero.s

index b820e4c77a132c11f7ce03540ce92efc519f5c47..daa23b002bdb528102a2473146d8fce03d8340cb 100644 (file)
@@ -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
 .*: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
 .*: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
index 15c792d776fadf6eeaa71d6c1e4a1d7b8375f313..26174475e17e49cc95431a152e9822926bf196d2 100644 (file)
@@ -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