aarch64: Consolidate ZA slice parsing
authorRichard Sandiford <richard.sandiford@arm.com>
Thu, 30 Mar 2023 10:09:05 +0000 (11:09 +0100)
committerRichard Sandiford <richard.sandiford@arm.com>
Thu, 30 Mar 2023 10:09:05 +0000 (11:09 +0100)
commit9d862382668651a1bc44f6072c1ccc3c92ab906d
treeeb1a5544086cbef0ea518bf4429828898c0608db
parentff60bcbfbec4f88195ae5cee544c2a7c749169b0
aarch64: Consolidate ZA slice parsing

Now that parse_typed_reg checks the range of tile register numbers
and libopcodes checks the range of vector select offsets, there's
very little difference between the parsing of ZA tile indices,
ZA array indices, and PSEL indices.  The main one is that ZA
array indices don't currently allow "za" to be qualified,
but we need to remove that restriction for SME2.

This patch therefore consolidates all three parsers into a single
routine, parameterised by the type of register that they expect.
gas/config/tc-aarch64.c
gas/testsuite/gas/aarch64/sme-7-illegal.l
gas/testsuite/gas/aarch64/sme-7-illegal.s
gas/testsuite/gas/aarch64/sme-9-illegal.l
gas/testsuite/gas/aarch64/sme-9-illegal.s