aarch64: Move w12-w15 range check to libopcodes
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)
commit7da28504bf86cbdf93965c953979d276db3616d0
tree0df0f0e1b4635f6a850daf451e817337e43c9576
parent61dac77e931e254a3caeb4d924999e11875308d0
aarch64: Move w12-w15 range check to libopcodes

In SME, the vector select register had to be in the range
w12-w15, so it made sense to enforce that during parsing.
However, SME2 adds instructions for which the range is
w8-w11 instead.

This patch therefore moves the range check from the parsing
stage to the constraint-checking stage.

Also, the previous error used a capitalised range W12-W15,
whereas other register range errors used lowercase ranges
like p0-p7.  A quick internal poll showed a preference for
the lowercase form, so the patch uses that.

The patch uses "selection register" rather than "vector
select register" so that the terminology extends more
naturally to PSEL.
gas/config/tc-aarch64.c
gas/testsuite/gas/aarch64/sme-2-illegal.l
gas/testsuite/gas/aarch64/sme-5-illegal.l
gas/testsuite/gas/aarch64/sme-6-illegal.l
gas/testsuite/gas/aarch64/sme-7-illegal.l
gas/testsuite/gas/aarch64/sme-9-illegal.l
gas/testsuite/gas/aarch64/sme-9-illegal.s
opcodes/aarch64-opc.c