s390: Improve coding of .insn pseudo-mnemonics without operands
When all operands of an .insn pseudo-mnemonic are optional and none
are provided, allow omitting the otherwise trailing comma that
separates the opcode constant from the omitted operand list. For
example:
Previously omitting all optional operands required a trailing comma:
.insn INSN-FMT,OPCODE,
This can now be expressed more naturally:
.insn INSN-FMT,OPCODE
This is a prerequisite for making all operands optional in .insn
pseudo-mnemonics rre and s, so that they align to specification. [1]
While at it generalize the logic for .insn pseudo-mnemonics without any
operands, that was previously hardcoded to .insn e.
[1]: IBM z/Architecture Principles of Operation, SA22-7832-14, IBM z17,
https://www.ibm.com/docs/en/module_1678991624569/pdf/SA22-7832-14.pdf
gas/
* config/tc-s390.c (s390_insn): Allow omitting trailing comma
when all operands are optional or there are none.
Signed-off-by: Jens Remus <jremus@linux.ibm.com>
1 file changed