s390: Treat addressing operand sequence as one in assembler

The assembler erroneously treated any number of operands as optional,
if the instruction was flagged to have one or two optional operands
(i.e. optparm or optparm2).

Only treat the exact specified number of operands as optional while
treating addressing operand sequences D(X,B), D(B), and D(L,B) as one
operand.

gas/
	* config/tc-s390.c (operand_count): New helper to count the
	remaining operands, treating D(X,B), D(B), and D(L,B) as one.
	(skip_optargs_p): Use new helper operand_count to treat
	D(X,B), D(B), and D(L,B) as one operand.
	(md_gather_operands): Use skip_optargs_p to skip only the
	optional last operands.

Signed-off-by: Jens Remus <jremus@linux.ibm.com>
1 file changed