]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit - gas/config/tc-aarch64.c
aarch64: Treat ZA as a register
authorRichard Sandiford <richard.sandiford@arm.com>
Thu, 30 Mar 2023 10:09:04 +0000 (11:09 +0100)
committerRichard Sandiford <richard.sandiford@arm.com>
Thu, 30 Mar 2023 10:09:04 +0000 (11:09 +0100)
commite9e1ddbb9894bc9eb4d091f3406e5f77c78cd7b8
tree5436eae9fa8f389f817433c7e3d81375f7c9d0f8
parent8cde0b988a9062c0d0e8d32ab3865ea9750c56e9
aarch64: Treat ZA as a register

We already treat the ZA tiles ZA0-ZA15 as registers.  This patch
does the same for ZA itself.  parse_sme_zero_mask can then parse
ZA tiles and ZA in the same way, through parsed_type_reg.

One important effect of going through parsed_type_reg (in general)
is that it allows ZA to take qualifiers.  This is necessary for many
SME2 instructions.

However, to support existing unqualified uses of ZA, parse_reg_with_qual
needs to treat the qualiier as optional.  Hopefully the net effect is
to give better error messages, since now that SME2 makes "za.<T>"
valid in some contexts, it might be natural to use it (incorrectly)
in ZERO too.

While there, the patch also tweaks the error messages for invalid
ZA tiles, to try to make some cases more specific.

For now, parse_sme_za_array just uses parse_reg, rather than
parse_typed_reg/parse_reg_with_qual.  A later patch consolidates
the parsing further.
gas/config/tc-aarch64.c
gas/testsuite/gas/aarch64/sme-4-illegal.l
gas/testsuite/gas/aarch64/sme-4-illegal.s
opcodes/aarch64-opc-2.c
opcodes/aarch64-tbl.h