diff options
author | Richard Sandiford <richard.sandiford@arm.com> | 2023-03-30 11:09:06 +0100 |
---|---|---|
committer | Richard Sandiford <richard.sandiford@arm.com> | 2023-03-30 11:09:06 +0100 |
commit | b9ca389690810dd03e96a6d11470539f923d03b9 (patch) | |
tree | cb2a4c5a7e5c510bd46fb870b0e915ef911cc90f /Makefile.in | |
parent | 30ba1d7e2fe36f6bcddb2aa0693f198c96c735b7 (diff) | |
download | gdb-b9ca389690810dd03e96a6d11470539f923d03b9.zip gdb-b9ca389690810dd03e96a6d11470539f923d03b9.tar.gz gdb-b9ca389690810dd03e96a6d11470539f923d03b9.tar.bz2 |
aarch64: Improve errors for malformed register lists
parse_typed_reg is used for parsing both bare registers and
registers that occur in lists. If it doesn't see a register,
or sees an unexpected kind of register, it queues a default
error to report the problem. These default errors have the form
"operand N must be an X", where X comes from the operand table.
If there are multiple opcode entries that report default errors,
GAS tries to pick the most appropriate one, using the opcode
table order as a tiebreaker. But this can lead to cases where
a syntax error in a register list is reported against an opcode
that doesn't accept register lists. For example, the unlikely
error:
ext z0.b,{,},#0
is reported as:
operand 2 must be an SVE vector register -- `ext z0.b,{,},#0'
even though operand 2 can be a register list.
If we've parsed the opening '{' of a register list, and then see
something that isn't remotely register-like, it seems better to
report that directly as a syntax error, rather than rely on the
default error. The operand won't be a valid list of anything,
so there's no need to pick a specific Y in "operand N must be
a list of Y".
Diffstat (limited to 'Makefile.in')
0 files changed, 0 insertions, 0 deletions