From ff60bcbfbec4f88195ae5cee544c2a7c749169b0 Mon Sep 17 00:00:00 2001 From: Richard Sandiford Date: Thu, 30 Mar 2023 11:09:05 +0100 Subject: aarch64: Move ZA range checks to aarch64-opc.c This patch moves the range checks on ZA vector select offsets from gas to libopcodes. Doing the checks there means that the error messages contain the expected range. It also fits in better with the error severity scheme, which becomes important later. (This is because out-of-range indices are treated as more severe than syntax errors, on the basis that parsing must have succeeded if we get to the point of checking the completed opcode.) The patch also adds a new check_za_access function for checking ZA accesses. That's a bit over the top for one offset check, but the function becomes more complex with later patches. sme-9-illegal.s checked for an invalid .q suffix using: psel p1, p15, p3.q[w15] but this is doubly invalid because it misses the immediate part of the index. The patch keeps that test but adds another with a zero index, so that .q is the only thing wrong. The aarch64-tbl.h change includes neatening up the backslash positions. --- include/opcode/aarch64.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include') diff --git a/include/opcode/aarch64.h b/include/opcode/aarch64.h index aeb3d9a9721..cc0ddf08989 100644 --- a/include/opcode/aarch64.h +++ b/include/opcode/aarch64.h @@ -225,6 +225,7 @@ enum aarch64_operand_class AARCH64_OPND_CLASS_SIMD_REGLIST, AARCH64_OPND_CLASS_SVE_REG, AARCH64_OPND_CLASS_PRED_REG, + AARCH64_OPND_CLASS_ZA_ACCESS, AARCH64_OPND_CLASS_ADDRESS, AARCH64_OPND_CLASS_IMMEDIATE, AARCH64_OPND_CLASS_SYSTEM, -- cgit v1.2.1