s390: Align optional operand definition to specs
commitfca086d928a940dc5aa3b5c0586bc5ed37d6b374
authorJens Remus <jremus@linux.ibm.com>
Thu, 23 Nov 2023 14:46:46 +0000 (23 15:46 +0100)
committerAndreas Krebbel <krebbel@linux.ibm.com>
Thu, 23 Nov 2023 14:51:03 +0000 (23 15:51 +0100)
tree629d559bd90354cd93c7716c236c2273023548f4
parenteeafc61979c6f8399bb5ce770e46a00823a5cfae
s390: Align optional operand definition to specs

The IBM z/Architecture Principle of Operation [1] specifies the last
operand(s) of some (extended) mnemonics to be optional. Align the
mnemonic definitions in the opcode table according to specification.

This changes the last operand of the following (extended) mnemonics to
be optional:
risbg, risbgz, risbgn, risbgnz, risbhg, risblg, rnsbg, rosbg, rxsbg

Note that efpc and sfpc actually have only one operand, but had
erroneously been defined to have two. For backwards compatibility the
wrong RR register format must be retained. Since the superfluous second
operand is defined as optional the instruction can still be coded as
specified.

[1]: IBM z/Architecture Principles of Operation, SA22-7832-13, IBM z16,
     https://publibfp.dhe.ibm.com/epubs/pdf/a227832d.pdf

opcodes/
* s390-opc.txt: Align optional operand definition to
specification.

testsuite/
* zarch-z10.s: Add test cases for risbg, risbgz, rnsbg, rosbg,
  and rxsbg.
* zarch-z10.d: Likewise.
* zarch-z196.s: Add test cases for risbhg and risblg.
* zarch-z196.d: Likewise.
* zarch-zEC12.s: Add test cases for risbgn and risbgnz.
* zarch-zEC12.d: Likewise.

Signed-off-by: Jens Remus <jremus@linux.ibm.com>
Reviewed-by: Andreas Krebbel <krebbel@linux.ibm.com>
gas/testsuite/gas/s390/zarch-z10.d
gas/testsuite/gas/s390/zarch-z10.s
gas/testsuite/gas/s390/zarch-z196.d
gas/testsuite/gas/s390/zarch-z196.s
gas/testsuite/gas/s390/zarch-zEC12.d
gas/testsuite/gas/s390/zarch-zEC12.s
opcodes/s390-opc.txt