]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
s390: Treat addressing operand sequence as one in assembler
authorJens Remus <jremus@linux.ibm.com>
Fri, 29 Nov 2024 14:37:19 +0000 (15:37 +0100)
committerJens Remus <jremus@linux.ibm.com>
Fri, 29 Nov 2024 14:37:19 +0000 (15:37 +0100)
commit453f481aabf6b552dc83dc63c4f62ed2a6b41ded
tree628941e82694f48f883f286bf9db3fbfa8de2ca0
parent7507fe37980edcd85b5811c2ec2859bdaf93107e
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>
gas/config/tc-s390.c