[PATCH 0/4] s390: Correct handling of optional operands in (dis)assembler

Jens Remus jremus@linux.ibm.com
Wed Nov 27 10:26:26 GMT 2024


Some instructions are defined to have one or two optional last operands
(i.e. optparm or optparm2).  For these instructions the assembler
erroneously treated any number of operands as optional.  Additionally
both the assembler and disassembler treated addressing operand sequences
D(X,B), D(B), and D(L,B) as separate operands in this regard.

Patch 1 fixes the disassembly of optional addressing operand sequences,
specifically for "nop D1(X1,B1)".

Patches 2 and 3 correct the assembler and disassembler to treat
addressing operand sequences D(X,B), D(B), and D(L,B) as one with
regards to optional last operands.

Patch 4 simplifies the assembler parsing logic for omitted index
register operands.

Regards,
Jens

Jens Remus (4):
  s390: Fix disassembly of optional addressing operands
  s390: Treat addressing operand sequence as one in assembler
  s390: Treat addressing operand sequence as one in disassembler
  s390: Simplify parsing of omitted index register operand

 gas/config/tc-s390.c                   | 72 ++++++++++++---------
 gas/testsuite/gas/s390/zarch-optargs.d | 46 ++++++++++++--
 gas/testsuite/gas/s390/zarch-optargs.s | 46 ++++++++++++--
 opcodes/s390-dis.c                     | 86 +++++++++++++++++++++-----
 4 files changed, 198 insertions(+), 52 deletions(-)

-- 
2.45.2



More information about the Binutils mailing list