diff options
author | Richard Sandiford <richard.sandiford@arm.com> | 2023-03-30 11:09:04 +0100 |
---|---|---|
committer | Richard Sandiford <richard.sandiford@arm.com> | 2023-03-30 11:09:04 +0100 |
commit | 8cde0b988a9062c0d0e8d32ab3865ea9750c56e9 (patch) | |
tree | 8bab872a15e1aea341625f5977c02c3b9aa6173c | |
parent | c211f26867e758633380c04b20e6693084154cb3 (diff) | |
download | binutils-8cde0b988a9062c0d0e8d32ab3865ea9750c56e9.zip binutils-8cde0b988a9062c0d0e8d32ab3865ea9750c56e9.tar.gz binutils-8cde0b988a9062c0d0e8d32ab3865ea9750c56e9.tar.bz2 |
aarch64: Consolidate ZA tile range checks
Now that all parsing of ZA tile names goes through parse_typed_reg,
we can check there for out-of-range tile numbers. The other check
performed by parse_sme_zada_operand was to reject .q, but that can
now be done via F_STRICT instead. (.q tiles are valid in other
contexts, so they shouldn't be rejected in parse_typed_reg.)
-rw-r--r-- | gas/config/tc-aarch64.c | 106 | ||||
-rw-r--r-- | gas/testsuite/gas/aarch64/sme-2-illegal.l | 8 | ||||
-rw-r--r-- | gas/testsuite/gas/aarch64/sme-3-illegal.l | 8 | ||||
-rw-r--r-- | gas/testsuite/gas/aarch64/sme-5-illegal.l | 30 | ||||
-rw-r--r-- | gas/testsuite/gas/aarch64/sme-6-illegal.l | 30 | ||||
-rw-r--r-- | gas/testsuite/gas/aarch64/sme-illegal.l | 108 |
6 files changed, 127 insertions, 163 deletions
diff --git a/gas/config/tc-aarch64.c b/gas/config/tc-aarch64.c index f9e85b3..5fb88f7 100644 --- a/gas/config/tc-aarch64.c +++ b/gas/config/tc-aarch64.c @@ -134,6 +134,7 @@ struct vector_type_el { enum vector_el_type type; unsigned char defined; + unsigned element_size; unsigned width; int64_t index; }; @@ -966,6 +967,7 @@ parse_vector_type_for_operand (aarch64_reg_type reg_type, parsed_type->type = type; parsed_type->width = width; + parsed_type->element_size = element_size; *str = ptr; @@ -1056,6 +1058,7 @@ parse_typed_reg (char **ccp, aarch64_reg_type type, atype.defined = 0; atype.type = NT_invtype; atype.width = -1; + atype.element_size = 0; atype.index = 0; if (reg == NULL) @@ -1080,6 +1083,14 @@ parse_typed_reg (char **ccp, aarch64_reg_type type, { if (!parse_vector_type_for_operand (type, &parsetype, &str)) return NULL; + if ((reg->type == REG_TYPE_ZAT + || reg->type == REG_TYPE_ZATH + || reg->type == REG_TYPE_ZATV) + && reg->number * 8 >= parsetype.element_size) + { + set_syntax_error (_("ZA tile number out of range")); + return NULL; + } } else { @@ -1182,10 +1193,11 @@ aarch64_reg_parse (char **ccp, aarch64_reg_type type, static inline bool eq_vector_type_el (struct vector_type_el e1, struct vector_type_el e2) { - return - e1.type == e2.type - && e1.defined == e2.defined - && e1.width == e2.width && e1.index == e2.index; + return (e1.type == e2.type + && e1.defined == e2.defined + && e1.width == e2.width + && e1.element_size == e2.element_size + && e1.index == e2.index); } /* This function parses a list of vector registers of type TYPE. @@ -1234,6 +1246,7 @@ parse_vector_reg_list (char **ccp, aarch64_reg_type type, typeinfo_first.defined = 0; typeinfo_first.type = NT_invtype; typeinfo_first.width = -1; + typeinfo_first.element_size = 0; typeinfo_first.index = 0; ret_val = 0; val = -1; @@ -4343,63 +4356,6 @@ parse_reg_with_qual (char **str, aarch64_reg_type reg_type, return reg; } -/* Parse SME ZA tile encoded in <ZAda> assembler symbol. - Function return tile QUALIFIER on success. - - Tiles are in example format: za[0-9]\.[bhsd] - - Function returns <ZAda> register number or PARSE_FAIL. -*/ -static int -parse_sme_zada_operand (char **str, aarch64_opnd_qualifier_t *qualifier) -{ - int regno; - const reg_entry *reg = parse_reg_with_qual (str, REG_TYPE_ZAT, qualifier); - - if (reg == NULL) - return PARSE_FAIL; - regno = reg->number; - - switch (*qualifier) - { - case AARCH64_OPND_QLF_S_B: - if (regno != 0x00) - { - set_syntax_error (_("invalid ZA tile register number, expected za0")); - return PARSE_FAIL; - } - break; - case AARCH64_OPND_QLF_S_H: - if (regno > 0x01) - { - set_syntax_error (_("invalid ZA tile register number, expected za0-za1")); - return PARSE_FAIL; - } - break; - case AARCH64_OPND_QLF_S_S: - if (regno > 0x03) - { - /* For the 32-bit variant: is the name of the ZA tile ZA0-ZA3. */ - set_syntax_error (_("invalid ZA tile register number, expected za0-za3")); - return PARSE_FAIL; - } - break; - case AARCH64_OPND_QLF_S_D: - if (regno > 0x07) - { - /* For the 64-bit variant: is the name of the ZA tile ZA0-ZA7 */ - set_syntax_error (_("invalid ZA tile register number, expected za0-za7")); - return PARSE_FAIL; - } - break; - default: - set_syntax_error (_("invalid ZA tile element size, allowed b, h, s and d")); - return PARSE_FAIL; - } - - return regno; -} - /* Parse STR for unsigned, immediate (1-2 digits) in format: #<imm> @@ -4498,7 +4454,6 @@ parse_sme_za_hv_tiles_operand (char **str, aarch64_opnd_qualifier_t *qualifier) { int regno; - int regno_limit; int64_t imm_limit; int64_t imm_value; const reg_entry *reg; @@ -4515,23 +4470,18 @@ parse_sme_za_hv_tiles_operand (char **str, switch (*qualifier) { case AARCH64_OPND_QLF_S_B: - regno_limit = 0; imm_limit = 15; break; case AARCH64_OPND_QLF_S_H: - regno_limit = 1; imm_limit = 7; break; case AARCH64_OPND_QLF_S_S: - regno_limit = 3; imm_limit = 3; break; case AARCH64_OPND_QLF_S_D: - regno_limit = 7; imm_limit = 1; break; case AARCH64_OPND_QLF_S_Q: - regno_limit = 15; imm_limit = 0; break; default: @@ -4539,14 +4489,6 @@ parse_sme_za_hv_tiles_operand (char **str, return PARSE_FAIL; } - /* Check if destination register ZA tile vector is in range for given - instruction variant. */ - if (regno < 0 || regno > regno_limit) - { - set_syntax_error (_("ZA tile vector out of range")); - return PARSE_FAIL; - } - if (!parse_sme_za_hv_tiles_operand_index (str, vector_select_register, &imm_value)) return PARSE_FAIL; @@ -4621,16 +4563,16 @@ parse_sme_zero_mask(char **str) if (reg) { int regno = reg->number; - if (qualifier == AARCH64_OPND_QLF_S_B && regno == 0) + if (qualifier == AARCH64_OPND_QLF_S_B) { /* { ZA0.B } is assembled as all-ones immediate. */ mask = 0xff; } - else if (qualifier == AARCH64_OPND_QLF_S_H && regno < 2) + else if (qualifier == AARCH64_OPND_QLF_S_H) mask |= 0x55 << regno; - else if (qualifier == AARCH64_OPND_QLF_S_S && regno < 4) + else if (qualifier == AARCH64_OPND_QLF_S_S) mask |= 0x11 << regno; - else if (qualifier == AARCH64_OPND_QLF_S_D && regno < 8) + else if (qualifier == AARCH64_OPND_QLF_S_D) mask |= 0x01 << regno; else { @@ -7546,10 +7488,10 @@ parse_operands (char *str, const aarch64_opcode *opcode) case AARCH64_OPND_SME_ZAda_2b: case AARCH64_OPND_SME_ZAda_3b: - val = parse_sme_zada_operand (&str, &qualifier); - if (val == PARSE_FAIL) + reg = parse_reg_with_qual (&str, REG_TYPE_ZAT, &qualifier); + if (!reg) goto failure; - info->reg.regno = val; + info->reg.regno = reg->number; info->qualifier = qualifier; break; diff --git a/gas/testsuite/gas/aarch64/sme-2-illegal.l b/gas/testsuite/gas/aarch64/sme-2-illegal.l index d364561..994c6f1 100644 --- a/gas/testsuite/gas/aarch64/sme-2-illegal.l +++ b/gas/testsuite/gas/aarch64/sme-2-illegal.l @@ -1,8 +1,8 @@ [^:]*: Assembler messages: -[^:]*:[0-9]+: Error: ZA tile vector out of range at operand 3 -- `mova z0\.b,p0/m,za1h\.b\[w12,#0\]' -[^:]*:[0-9]+: Error: ZA tile vector out of range at operand 3 -- `mova z0\.h,p0/m,za2h\.h\[w12,#0\]' -[^:]*:[0-9]+: Error: ZA tile vector out of range at operand 3 -- `mova z0\.s,p0/m,za4h\.s\[w12,#0\]' -[^:]*:[0-9]+: Error: ZA tile vector out of range at operand 3 -- `mova z0\.d,p0/m,za8h\.d\[w12,#0\]' +[^:]*:[0-9]+: Error: ZA tile number out of range at operand 3 -- `mova z0\.b,p0/m,za1h\.b\[w12,#0\]' +[^:]*:[0-9]+: Error: ZA tile number out of range at operand 3 -- `mova z0\.h,p0/m,za2h\.h\[w12,#0\]' +[^:]*:[0-9]+: Error: ZA tile number out of range at operand 3 -- `mova z0\.s,p0/m,za4h\.s\[w12,#0\]' +[^:]*:[0-9]+: Error: ZA tile number out of range at operand 3 -- `mova z0\.d,p0/m,za8h\.d\[w12,#0\]' [^:]*:[0-9]+: Error: operand 3 must be an SME horizontal or vertical vector access register -- `mova z0\.q,p0/m,za16h.q\[w12\]' [^:]*:[0-9]+: Error: index offset out of range at operand 3 -- `mova z31\.b,p7/m,za0v\.b\[w15,#16\]' [^:]*:[0-9]+: Error: index offset out of range at operand 3 -- `mova z31\.h,p7/m,za1v\.h\[w15,#8\]' diff --git a/gas/testsuite/gas/aarch64/sme-3-illegal.l b/gas/testsuite/gas/aarch64/sme-3-illegal.l index 8babf4c..6b2791d 100644 --- a/gas/testsuite/gas/aarch64/sme-3-illegal.l +++ b/gas/testsuite/gas/aarch64/sme-3-illegal.l @@ -1,8 +1,8 @@ [^:]*: Assembler messages: -[^:]*:[0-9]+: Error: ZA tile vector out of range at operand 1 -- `mova za1v\.b\[w12,#0\],p0/m,z0.b' -[^:]*:[0-9]+: Error: ZA tile vector out of range at operand 1 -- `mova za2v\.h\[w12,#0\],p0/m,z0.h' -[^:]*:[0-9]+: Error: ZA tile vector out of range at operand 1 -- `mova za4v\.s\[w12,#0\],p0/m,z0.s' -[^:]*:[0-9]+: Error: ZA tile vector out of range at operand 1 -- `mova za8v\.d\[w12,#0\],p0/m,z0.d' +[^:]*:[0-9]+: Error: ZA tile number out of range at operand 1 -- `mova za1v\.b\[w12,#0\],p0/m,z0.b' +[^:]*:[0-9]+: Error: ZA tile number out of range at operand 1 -- `mova za2v\.h\[w12,#0\],p0/m,z0.h' +[^:]*:[0-9]+: Error: ZA tile number out of range at operand 1 -- `mova za4v\.s\[w12,#0\],p0/m,z0.s' +[^:]*:[0-9]+: Error: ZA tile number out of range at operand 1 -- `mova za8v\.d\[w12,#0\],p0/m,z0.d' [^:]*:[0-9]+: Error: operand 1 must be an SME horizontal or vertical vector access register -- `mova za16v\.q\[w12\],p0/m,z0.q' [^:]*:[0-9]+: Error: index offset out of range at operand 1 -- `mova za0v\.b\[w15,#16\],p7/m,z31.b' [^:]*:[0-9]+: Error: index offset out of range at operand 1 -- `mova za1v\.h\[w15,#8\],p7/m,z31.h' diff --git a/gas/testsuite/gas/aarch64/sme-5-illegal.l b/gas/testsuite/gas/aarch64/sme-5-illegal.l index c2f8bc9..ec1e989 100644 --- a/gas/testsuite/gas/aarch64/sme-5-illegal.l +++ b/gas/testsuite/gas/aarch64/sme-5-illegal.l @@ -5,32 +5,32 @@ [^:]*:[0-9]+: Error: '\]' expected at operand 3 -- `ld1w {za3v.s\[w15,3\]},p7/z,\[sp,lsl#2\]' [^:]*:[0-9]+: Error: invalid addressing mode at operand 3 -- `ld1d {za0h.d\[w12,0\]},p0/z,\[sp,x0,lsl#12\]' [^:]*:[0-9]+: Error: expected ',' at operand 1 -- `ld1q {za0v.q\[w12\]},p0/z,\[x0,x0,lsl#2\]' -[^:]*:[0-9]+: Error: ZA tile vector out of range at operand 1 -- `ld1b {za1h.b\[w12,0\]},p0/z,\[x0\]' -[^:]*:[0-9]+: Error: ZA tile vector out of range at operand 1 -- `ld1b {za1v.b\[w12,0\]},p0/z,\[sp\]' -[^:]*:[0-9]+: Error: ZA tile vector out of range at operand 1 -- `ld1b {za1h.b\[w12,0\]},p0/z,\[sp,x0\]' +[^:]*:[0-9]+: Error: ZA tile number out of range at operand 1 -- `ld1b {za1h.b\[w12,0\]},p0/z,\[x0\]' +[^:]*:[0-9]+: Error: ZA tile number out of range at operand 1 -- `ld1b {za1v.b\[w12,0\]},p0/z,\[sp\]' +[^:]*:[0-9]+: Error: ZA tile number out of range at operand 1 -- `ld1b {za1h.b\[w12,0\]},p0/z,\[sp,x0\]' [^:]*:[0-9]+: Error: index offset out of range at operand 1 -- `ld1b {za0v.b\[w15,16\]},p7/z,\[x17\]' [^:]*:[0-9]+: Error: index offset out of range at operand 1 -- `ld1b {za0h.b\[w15,16\]},p7/z,\[sp\]' [^:]*:[0-9]+: Error: index offset out of range at operand 1 -- `ld1b {za0v.b\[w15,16\]},p7/z,\[sp,x17\]' -[^:]*:[0-9]+: Error: ZA tile vector out of range at operand 1 -- `ld1h {za2v.h\[w12,0\]},p0/z,\[x0\]' -[^:]*:[0-9]+: Error: ZA tile vector out of range at operand 1 -- `ld1h {za2h.h\[w12,0\]},p0/z,\[sp\]' -[^:]*:[0-9]+: Error: ZA tile vector out of range at operand 1 -- `ld1h {za2v.h\[w12,0\]},p0/z,\[x0,x0,lsl#1\]' -[^:]*:[0-9]+: Error: ZA tile vector out of range at operand 1 -- `ld1h {za2h.h\[w12,0\]},p0/z,\[sp,x0,lsl#1\]' +[^:]*:[0-9]+: Error: ZA tile number out of range at operand 1 -- `ld1h {za2v.h\[w12,0\]},p0/z,\[x0\]' +[^:]*:[0-9]+: Error: ZA tile number out of range at operand 1 -- `ld1h {za2h.h\[w12,0\]},p0/z,\[sp\]' +[^:]*:[0-9]+: Error: ZA tile number out of range at operand 1 -- `ld1h {za2v.h\[w12,0\]},p0/z,\[x0,x0,lsl#1\]' +[^:]*:[0-9]+: Error: ZA tile number out of range at operand 1 -- `ld1h {za2h.h\[w12,0\]},p0/z,\[sp,x0,lsl#1\]' [^:]*:[0-9]+: Error: index offset out of range at operand 1 -- `ld1h {za1v.h\[w15,8\]},p7/z,\[x17\]' [^:]*:[0-9]+: Error: index offset out of range at operand 1 -- `ld1h {za1h.h\[w15,8\]},p7/z,\[sp\]' [^:]*:[0-9]+: Error: index offset out of range at operand 1 -- `ld1h {za1v.h\[w15,8\]},p7/z,\[x0,x17,lsl#1\]' [^:]*:[0-9]+: Error: index offset out of range at operand 1 -- `ld1h {za1h.h\[w15,8\]},p7/z,\[sp,x17,lsl#1\]' -[^:]*:[0-9]+: Error: ZA tile vector out of range at operand 1 -- `ld1w {za4h.s\[w12,0\]},p0/z,\[x0\]' -[^:]*:[0-9]+: Error: ZA tile vector out of range at operand 1 -- `ld1w {za4v.s\[w12,0\]},p0/z,\[sp\]' -[^:]*:[0-9]+: Error: ZA tile vector out of range at operand 1 -- `ld1w {za4h.s\[w12,0\]},p0/z,\[x0,x0,lsl#2\]' -[^:]*:[0-9]+: Error: ZA tile vector out of range at operand 1 -- `ld1w {za4v.s\[w12,0\]},p0/z,\[sp,x0,lsl#2\]' +[^:]*:[0-9]+: Error: ZA tile number out of range at operand 1 -- `ld1w {za4h.s\[w12,0\]},p0/z,\[x0\]' +[^:]*:[0-9]+: Error: ZA tile number out of range at operand 1 -- `ld1w {za4v.s\[w12,0\]},p0/z,\[sp\]' +[^:]*:[0-9]+: Error: ZA tile number out of range at operand 1 -- `ld1w {za4h.s\[w12,0\]},p0/z,\[x0,x0,lsl#2\]' +[^:]*:[0-9]+: Error: ZA tile number out of range at operand 1 -- `ld1w {za4v.s\[w12,0\]},p0/z,\[sp,x0,lsl#2\]' [^:]*:[0-9]+: Error: index offset out of range at operand 1 -- `ld1w {za3h.s\[w15,4\]},p7/z,\[x17\]' [^:]*:[0-9]+: Error: index offset out of range at operand 1 -- `ld1w {za3v.s\[w15,4\]},p7/z,\[sp\]' [^:]*:[0-9]+: Error: index offset out of range at operand 1 -- `ld1w {za3h.s\[w15,4\]},p7/z,\[x0,x17,lsl#2\]' [^:]*:[0-9]+: Error: index offset out of range at operand 1 -- `ld1w {za3v.s\[w15,4\]},p7/z,\[sp,x17,lsl#2\]' -[^:]*:[0-9]+: Error: ZA tile vector out of range at operand 1 -- `ld1d {za8v.d\[w12,0\]},p0/z,\[x0\]' -[^:]*:[0-9]+: Error: ZA tile vector out of range at operand 1 -- `ld1d {za8h.d\[w12,0\]},p0/z,\[sp\]' -[^:]*:[0-9]+: Error: ZA tile vector out of range at operand 1 -- `ld1d {za8v.d\[w12,0\]},p0/z,\[x0,x0,lsl#3\]' -[^:]*:[0-9]+: Error: ZA tile vector out of range at operand 1 -- `ld1d {za8h.d\[w12,0\]},p0/z,\[sp,x0,lsl#3\]' +[^:]*:[0-9]+: Error: ZA tile number out of range at operand 1 -- `ld1d {za8v.d\[w12,0\]},p0/z,\[x0\]' +[^:]*:[0-9]+: Error: ZA tile number out of range at operand 1 -- `ld1d {za8h.d\[w12,0\]},p0/z,\[sp\]' +[^:]*:[0-9]+: Error: ZA tile number out of range at operand 1 -- `ld1d {za8v.d\[w12,0\]},p0/z,\[x0,x0,lsl#3\]' +[^:]*:[0-9]+: Error: ZA tile number out of range at operand 1 -- `ld1d {za8h.d\[w12,0\]},p0/z,\[sp,x0,lsl#3\]' [^:]*:[0-9]+: Error: index offset out of range at operand 1 -- `ld1d {za7v.d\[w15,2\]},p7/z,\[x17\]' [^:]*:[0-9]+: Error: index offset out of range at operand 1 -- `ld1d {za7h.d\[w15,2\]},p7/z,\[sp\]' [^:]*:[0-9]+: Error: index offset out of range at operand 1 -- `ld1d {za7v.d\[w15,2\]},p7/z,\[x0,x17,lsl#3\]' diff --git a/gas/testsuite/gas/aarch64/sme-6-illegal.l b/gas/testsuite/gas/aarch64/sme-6-illegal.l index 233c12a..4fe3613 100644 --- a/gas/testsuite/gas/aarch64/sme-6-illegal.l +++ b/gas/testsuite/gas/aarch64/sme-6-illegal.l @@ -5,32 +5,32 @@ [^:]*:[0-9]+: Error: '\]' expected at operand 3 -- `st1w {za3v.s\[w15,3\]},p7,\[sp,lsl#2\]' [^:]*:[0-9]+: Error: invalid addressing mode at operand 3 -- `st1d {za0h.d\[w12,0\]},p0,\[sp,x0,lsl#12\]' [^:]*:[0-9]+: Error: expected ',' at operand 1 -- `st1q {za0v.q\[w12\]},p0,\[x0,x0,lsl#2\]' -[^:]*:[0-9]+: Error: ZA tile vector out of range at operand 1 -- `st1b {za1h.b\[w12,0\]},p0,\[x0\]' -[^:]*:[0-9]+: Error: ZA tile vector out of range at operand 1 -- `st1b {za1v.b\[w12,0\]},p0,\[sp\]' -[^:]*:[0-9]+: Error: ZA tile vector out of range at operand 1 -- `st1b {za1h.b\[w12,0\]},p0,\[sp,x0\]' +[^:]*:[0-9]+: Error: ZA tile number out of range at operand 1 -- `st1b {za1h.b\[w12,0\]},p0,\[x0\]' +[^:]*:[0-9]+: Error: ZA tile number out of range at operand 1 -- `st1b {za1v.b\[w12,0\]},p0,\[sp\]' +[^:]*:[0-9]+: Error: ZA tile number out of range at operand 1 -- `st1b {za1h.b\[w12,0\]},p0,\[sp,x0\]' [^:]*:[0-9]+: Error: index offset out of range at operand 1 -- `st1b {za0v.b\[w15,16\]},p7,\[x17\]' [^:]*:[0-9]+: Error: index offset out of range at operand 1 -- `st1b {za0h.b\[w15,16\]},p7,\[sp\]' [^:]*:[0-9]+: Error: index offset out of range at operand 1 -- `st1b {za0v.b\[w15,16\]},p7,\[sp,x17\]' -[^:]*:[0-9]+: Error: ZA tile vector out of range at operand 1 -- `st1h {za2v.h\[w12,0\]},p0,\[x0\]' -[^:]*:[0-9]+: Error: ZA tile vector out of range at operand 1 -- `st1h {za2h.h\[w12,0\]},p0,\[sp\]' -[^:]*:[0-9]+: Error: ZA tile vector out of range at operand 1 -- `st1h {za2v.h\[w12,0\]},p0,\[x0,x0,lsl#1\]' -[^:]*:[0-9]+: Error: ZA tile vector out of range at operand 1 -- `st1h {za2h.h\[w12,0\]},p0,\[sp,x0,lsl#1\]' +[^:]*:[0-9]+: Error: ZA tile number out of range at operand 1 -- `st1h {za2v.h\[w12,0\]},p0,\[x0\]' +[^:]*:[0-9]+: Error: ZA tile number out of range at operand 1 -- `st1h {za2h.h\[w12,0\]},p0,\[sp\]' +[^:]*:[0-9]+: Error: ZA tile number out of range at operand 1 -- `st1h {za2v.h\[w12,0\]},p0,\[x0,x0,lsl#1\]' +[^:]*:[0-9]+: Error: ZA tile number out of range at operand 1 -- `st1h {za2h.h\[w12,0\]},p0,\[sp,x0,lsl#1\]' [^:]*:[0-9]+: Error: index offset out of range at operand 1 -- `st1h {za1v.h\[w15,8\]},p7,\[x17\]' [^:]*:[0-9]+: Error: index offset out of range at operand 1 -- `st1h {za1h.h\[w15,8\]},p7,\[sp\]' [^:]*:[0-9]+: Error: index offset out of range at operand 1 -- `st1h {za1v.h\[w15,8\]},p7,\[x0,x17,lsl#1\]' [^:]*:[0-9]+: Error: index offset out of range at operand 1 -- `st1h {za1h.h\[w15,8\]},p7,\[sp,x17,lsl#1\]' -[^:]*:[0-9]+: Error: ZA tile vector out of range at operand 1 -- `st1w {za4h.s\[w12,0\]},p0,\[x0\]' -[^:]*:[0-9]+: Error: ZA tile vector out of range at operand 1 -- `st1w {za4v.s\[w12,0\]},p0,\[sp\]' -[^:]*:[0-9]+: Error: ZA tile vector out of range at operand 1 -- `st1w {za4h.s\[w12,0\]},p0,\[x0,x0,lsl#2\]' -[^:]*:[0-9]+: Error: ZA tile vector out of range at operand 1 -- `st1w {za4v.s\[w12,0\]},p0,\[sp,x0,lsl#2\]' +[^:]*:[0-9]+: Error: ZA tile number out of range at operand 1 -- `st1w {za4h.s\[w12,0\]},p0,\[x0\]' +[^:]*:[0-9]+: Error: ZA tile number out of range at operand 1 -- `st1w {za4v.s\[w12,0\]},p0,\[sp\]' +[^:]*:[0-9]+: Error: ZA tile number out of range at operand 1 -- `st1w {za4h.s\[w12,0\]},p0,\[x0,x0,lsl#2\]' +[^:]*:[0-9]+: Error: ZA tile number out of range at operand 1 -- `st1w {za4v.s\[w12,0\]},p0,\[sp,x0,lsl#2\]' [^:]*:[0-9]+: Error: index offset out of range at operand 1 -- `st1w {za3h.s\[w15,4\]},p7,\[x17\]' [^:]*:[0-9]+: Error: index offset out of range at operand 1 -- `st1w {za3v.s\[w15,4\]},p7,\[sp\]' [^:]*:[0-9]+: Error: index offset out of range at operand 1 -- `st1w {za3h.s\[w15,4\]},p7,\[x0,x17,lsl#2\]' [^:]*:[0-9]+: Error: index offset out of range at operand 1 -- `st1w {za3v.s\[w15,4\]},p7,\[sp,x17,lsl#2\]' -[^:]*:[0-9]+: Error: ZA tile vector out of range at operand 1 -- `st1d {za8v.d\[w12,0\]},p0,\[x0\]' -[^:]*:[0-9]+: Error: ZA tile vector out of range at operand 1 -- `st1d {za8h.d\[w12,0\]},p0,\[sp\]' -[^:]*:[0-9]+: Error: ZA tile vector out of range at operand 1 -- `st1d {za8v.d\[w12,0\]},p0,\[x0,x0,lsl#3\]' -[^:]*:[0-9]+: Error: ZA tile vector out of range at operand 1 -- `st1d {za8h.d\[w12,0\]},p0,\[sp,x0,lsl#3\]' +[^:]*:[0-9]+: Error: ZA tile number out of range at operand 1 -- `st1d {za8v.d\[w12,0\]},p0,\[x0\]' +[^:]*:[0-9]+: Error: ZA tile number out of range at operand 1 -- `st1d {za8h.d\[w12,0\]},p0,\[sp\]' +[^:]*:[0-9]+: Error: ZA tile number out of range at operand 1 -- `st1d {za8v.d\[w12,0\]},p0,\[x0,x0,lsl#3\]' +[^:]*:[0-9]+: Error: ZA tile number out of range at operand 1 -- `st1d {za8h.d\[w12,0\]},p0,\[sp,x0,lsl#3\]' [^:]*:[0-9]+: Error: index offset out of range at operand 1 -- `st1d {za7v.d\[w15,2\]},p7,\[x17\]' [^:]*:[0-9]+: Error: index offset out of range at operand 1 -- `st1d {za7h.d\[w15,2\]},p7,\[sp\]' [^:]*:[0-9]+: Error: index offset out of range at operand 1 -- `st1d {za7v.d\[w15,2\]},p7,\[x0,x17,lsl#3\]' diff --git a/gas/testsuite/gas/aarch64/sme-illegal.l b/gas/testsuite/gas/aarch64/sme-illegal.l index 19d22da..efc9b80 100644 --- a/gas/testsuite/gas/aarch64/sme-illegal.l +++ b/gas/testsuite/gas/aarch64/sme-illegal.l @@ -1,95 +1,117 @@ [^:]*: Assembler messages: -[^:]*:[0-9]+: Error: invalid ZA tile register number, expected za0-za3 at operand 1 -- `addha za4.s,p0/m,p1/m,z1.s' -[^:]*:[0-9]+: Error: invalid ZA tile register number, expected za0-za3 at operand 1 -- `addha za15.s,p2/m,p3/m,z2.s' +[^:]*:[0-9]+: Error: ZA tile number out of range at operand 1 -- `addha za4.s,p0/m,p1/m,z1.s' +[^:]*:[0-9]+: Error: ZA tile number out of range at operand 1 -- `addha za15.s,p2/m,p3/m,z2.s' [^:]*:[0-9]+: Error: operand mismatch -- `addha za0.s,p2/m,p3/m,z2.d' [^:]*:[0-9]+: Info: did you mean this\? [^:]*:[0-9]+: Info: addha za0.d, p2/m, p3/m, z2.d -[^:]*:[0-9]+: Error: invalid ZA tile register number, expected za0-za7 at operand 1 -- `addha za8.d,p0/m,p1/m,z1.d' -[^:]*:[0-9]+: Error: invalid ZA tile register number, expected za0-za7 at operand 1 -- `addha za15.d,p2/m,p3/m,z2.d' +[^:]*:[0-9]+: Error: ZA tile number out of range at operand 1 -- `addha za8.d,p0/m,p1/m,z1.d' +[^:]*:[0-9]+: Error: ZA tile number out of range at operand 1 -- `addha za15.d,p2/m,p3/m,z2.d' [^:]*:[0-9]+: Error: operand mismatch -- `addha za0.d,p2/m,p3/m,z2.s' [^:]*:[0-9]+: Info: did you mean this\? [^:]*:[0-9]+: Info: addha za0.d, p2/m, p3/m, z2.d -[^:]*:[0-9]+: Error: invalid ZA tile register number, expected za0-za3 at operand 1 -- `addva za4.s,p0/m,p1/m,z1.s' -[^:]*:[0-9]+: Error: invalid ZA tile register number, expected za0-za3 at operand 1 -- `addva za15.s,p2/m,p3/m,z2.s' +[^:]*:[0-9]+: Error: ZA tile number out of range at operand 1 -- `addva za4.s,p0/m,p1/m,z1.s' +[^:]*:[0-9]+: Error: ZA tile number out of range at operand 1 -- `addva za15.s,p2/m,p3/m,z2.s' [^:]*:[0-9]+: Error: operand mismatch -- `addva za0.s,p2/m,p3/m,z2.d' [^:]*:[0-9]+: Info: did you mean this\? [^:]*:[0-9]+: Info: addva za0.d, p2/m, p3/m, z2.d -[^:]*:[0-9]+: Error: invalid ZA tile register number, expected za0-za7 at operand 1 -- `addva za8.d,p0/m,p1/m,z1.d' -[^:]*:[0-9]+: Error: invalid ZA tile register number, expected za0-za7 at operand 1 -- `addva za15.d,p2/m,p3/m,z2.d' +[^:]*:[0-9]+: Error: ZA tile number out of range at operand 1 -- `addva za8.d,p0/m,p1/m,z1.d' +[^:]*:[0-9]+: Error: ZA tile number out of range at operand 1 -- `addva za15.d,p2/m,p3/m,z2.d' [^:]*:[0-9]+: Error: operand mismatch -- `addva za0.d,p2/m,p3/m,z2.s' [^:]*:[0-9]+: Info: did you mean this\? [^:]*:[0-9]+: Info: addva za0.d, p2/m, p3/m, z2.d -[^:]*:[0-9]+: Error: invalid ZA tile register number, expected za0-za3 at operand 1 -- `bfmopa za4.s,p0/m,p1/m,z1.h,z4.h' +[^:]*:[0-9]+: Error: ZA tile number out of range at operand 1 -- `bfmopa za4.s,p0/m,p1/m,z1.h,z4.h' [^:]*:[0-9]+: Error: operand mismatch -- `bfmopa za0.s,p2/m,p3/m,z2.s,z3.s' [^:]*:[0-9]+: Info: did you mean this\? [^:]*:[0-9]+: Info: bfmopa za0.s, p2/m, p3/m, z2.h, z3.h -[^:]*:[0-9]+: Error: invalid ZA tile register number, expected za0-za3 at operand 1 -- `bfmops za4.s,p0/m,p1/m,z1.h,z4.h' +[^:]*:[0-9]+: Error: ZA tile number out of range at operand 1 -- `bfmops za4.s,p0/m,p1/m,z1.h,z4.h' [^:]*:[0-9]+: Error: operand mismatch -- `bfmops za0.s,p2/m,p3/m,z2.s,z3.s' [^:]*:[0-9]+: Info: did you mean this\? [^:]*:[0-9]+: Info: bfmops za0.s, p2/m, p3/m, z2.h, z3.h -[^:]*:[0-9]+: Error: invalid ZA tile register number, expected za0-za3 at operand 1 -- `fmopa za4.s,p0/m,p1/m,z1.s,z4.s' +[^:]*:[0-9]+: Error: ZA tile number out of range at operand 1 -- `fmopa za4.s,p0/m,p1/m,z1.s,z4.s' [^:]*:[0-9]+: Error: operand mismatch -- `fmopa za0.s,p6/m,p7/m,z4.d,z1.d' [^:]*:[0-9]+: Info: did you mean this\? [^:]*:[0-9]+: Info: fmopa za0.d, p6/m, p7/m, z4.d, z1.d -[^:]*:[0-9]+: Error: invalid ZA tile register number, expected za0-za7 at operand 1 -- `fmopa za8.d,p0/m,p1/m,z1.d,z8.d' +[^:]*:[0-9]+: Error: ZA tile number out of range at operand 1 -- `fmopa za8.d,p0/m,p1/m,z1.d,z8.d' [^:]*:[0-9]+: Error: operand mismatch -- `fmopa za0.d,p2/m,p3/m,z2.s,z7.s' [^:]*:[0-9]+: Info: did you mean this\? [^:]*:[0-9]+: Info: fmopa za0.d, p2/m, p3/m, z2.d, z7.d -[^:]*:[0-9]+: Error: invalid ZA tile register number, expected za0-za3 at operand 1 -- `fmopa za4.s,p0/m,p1/m,z1.h,z4.h' +[^:]*:[0-9]+: Error: ZA tile number out of range at operand 1 -- `fmopa za4.s,p0/m,p1/m,z1.h,z4.h' [^:]*:[0-9]+: Error: operand mismatch -- `fmopa za1.s,p2/m,p3/m,z2.q,z3.q' [^:]*:[0-9]+: Info: did you mean this\? [^:]*:[0-9]+: Info: fmopa za1.d, p2/m, p3/m, z2.d, z3.d -[^:]*:[0-9]+: Error: invalid ZA tile register number, expected za0-za3 at operand 1 -- `fmops za4.s,p0/m,p1/m,z1.s,z4.s' +[^:]*:[0-9]+: Error: ZA tile number out of range at operand 1 -- `fmops za4.s,p0/m,p1/m,z1.s,z4.s' [^:]*:[0-9]+: Error: operand mismatch -- `fmops za1.s,p2/m,p3/m,z2.q,z3.q' [^:]*:[0-9]+: Info: did you mean this\? [^:]*:[0-9]+: Info: fmops za1.d, p2/m, p3/m, z2.d, z3.d -[^:]*:[0-9]+: Error: invalid ZA tile register number, expected za0-za7 at operand 1 -- `fmops za8.d,p0/m,p1/m,z1.d,z8.d' +[^:]*:[0-9]+: Error: ZA tile number out of range at operand 1 -- `fmops za8.d,p0/m,p1/m,z1.d,z8.d' [^:]*:[0-9]+: Error: operand mismatch -- `fmops za0.d,p2/m,p3/m,z2.s,z7.s' [^:]*:[0-9]+: Info: did you mean this\? [^:]*:[0-9]+: Info: fmops za0.d, p2/m, p3/m, z2.d, z7.d -[^:]*:[0-9]+: Error: invalid ZA tile register number, expected za0-za3 at operand 1 -- `fmops za8.s,p0/m,p1/m,z1.h,z4.h' -[^:]*:[0-9]+: Error: invalid ZA tile element size, allowed b, h, s and d at operand 1 -- `fmops za1.q,p2/m,p3/m,z2.h,z3.h' -[^:]*:[0-9]+: Error: invalid ZA tile register number, expected za0-za3 at operand 1 -- `smopa za4.s,p0/m,p1/m,z1.b,z4.b' -[^:]*:[0-9]+: Error: invalid ZA tile element size, allowed b, h, s and d at operand 1 -- `smopa za1.q,p2/m,p3/m,z2.b,z3.b' -[^:]*:[0-9]+: Error: invalid ZA tile register number, expected za0-za7 at operand 1 -- `smopa za8.d,p0/m,p1/m,z1.h,z8.h' +[^:]*:[0-9]+: Error: ZA tile number out of range at operand 1 -- `fmops za8.s,p0/m,p1/m,z1.h,z4.h' +[^:]*:[0-9]+: Error: operand mismatch -- `fmops za1.q,p2/m,p3/m,z2.h,z3.h' +[^:]*:[0-9]+: Info: did you mean this\? +[^:]*:[0-9]+: Info: fmops za1.d, p2/m, p3/m, z2.d, z3.d +[^:]*:[0-9]+: Error: ZA tile number out of range at operand 1 -- `smopa za4.s,p0/m,p1/m,z1.b,z4.b' +[^:]*:[0-9]+: Error: operand mismatch -- `smopa za1.q,p2/m,p3/m,z2.b,z3.b' +[^:]*:[0-9]+: Info: did you mean this\? +[^:]*:[0-9]+: Info: smopa za1.d, p2/m, p3/m, z2.h, z3.h +[^:]*:[0-9]+: Error: ZA tile number out of range at operand 1 -- `smopa za8.d,p0/m,p1/m,z1.h,z8.h' [^:]*:[0-9]+: Error: operand mismatch -- `smopa za1.d,p2/m,p3/m,z2.h,z7.q' [^:]*:[0-9]+: Info: did you mean this\? [^:]*:[0-9]+: Info: smopa za1.d, p2/m, p3/m, z2.h, z7.h -[^:]*:[0-9]+: Error: invalid ZA tile register number, expected za0-za3 at operand 1 -- `smops za4.s,p0/m,p1/m,z1.b,z4.b' -[^:]*:[0-9]+: Error: invalid ZA tile element size, allowed b, h, s and d at operand 1 -- `smops za1.q,p2/m,p3/m,z2.b,z3.b' -[^:]*:[0-9]+: Error: invalid ZA tile register number, expected za0-za7 at operand 1 -- `smops za8.d,p0/m,p1/m,z1.h,z8.h' +[^:]*:[0-9]+: Error: ZA tile number out of range at operand 1 -- `smops za4.s,p0/m,p1/m,z1.b,z4.b' +[^:]*:[0-9]+: Error: operand mismatch -- `smops za1.q,p2/m,p3/m,z2.b,z3.b' +[^:]*:[0-9]+: Info: did you mean this\? +[^:]*:[0-9]+: Info: smops za1.d, p2/m, p3/m, z2.h, z3.h +[^:]*:[0-9]+: Error: ZA tile number out of range at operand 1 -- `smops za8.d,p0/m,p1/m,z1.h,z8.h' [^:]*:[0-9]+: Error: operand mismatch -- `smops za1.d,p2/m,p3/m,z2.h,z7.q' [^:]*:[0-9]+: Info: did you mean this\? [^:]*:[0-9]+: Info: smops za1.d, p2/m, p3/m, z2.h, z7.h -[^:]*:[0-9]+: Error: invalid ZA tile register number, expected za0-za3 at operand 1 -- `sumopa za4.s,p0/m,p1/m,z1.b,z4.b' -[^:]*:[0-9]+: Error: invalid ZA tile element size, allowed b, h, s and d at operand 1 -- `sumopa za1.q,p2/m,p3/m,z2.s,z3.s' -[^:]*:[0-9]+: Error: invalid ZA tile register number, expected za0-za7 at operand 1 -- `sumopa za8.d,p0/m,p1/m,z1.h,z8.h' +[^:]*:[0-9]+: Error: ZA tile number out of range at operand 1 -- `sumopa za4.s,p0/m,p1/m,z1.b,z4.b' +[^:]*:[0-9]+: Error: operand mismatch -- `sumopa za1.q,p2/m,p3/m,z2.s,z3.s' +[^:]*:[0-9]+: Info: did you mean this\? +[^:]*:[0-9]+: Info: sumopa za1.d, p2/m, p3/m, z2.h, z3.h +[^:]*:[0-9]+: Error: ZA tile number out of range at operand 1 -- `sumopa za8.d,p0/m,p1/m,z1.h,z8.h' [^:]*:[0-9]+: Error: operand mismatch -- `sumopa za1.d,p2/m,p3/m,z2.h,z7.q' [^:]*:[0-9]+: Info: did you mean this\? [^:]*:[0-9]+: Info: sumopa za1.d, p2/m, p3/m, z2.h, z7.h -[^:]*:[0-9]+: Error: invalid ZA tile register number, expected za0-za3 at operand 1 -- `sumops za4.s,p0/m,p1/m,z1.b,z4.b' -[^:]*:[0-9]+: Error: invalid ZA tile element size, allowed b, h, s and d at operand 1 -- `sumops za1.q,p2/m,p3/m,z2.b,z3.b' -[^:]*:[0-9]+: Error: invalid ZA tile register number, expected za0-za7 at operand 1 -- `sumops za8.d,p0/m,p1/m,z1.h,z8.h' -[^:]*:[0-9]+: Error: invalid ZA tile element size, allowed b, h, s and d at operand 1 -- `sumops za1.q,p2/m,p3/m,z2.h,z7.h' -[^:]*:[0-9]+: Error: invalid ZA tile register number, expected za0-za3 at operand 1 -- `umopa za4.s,p0/m,p1/m,z1.b,z4.b' -[^:]*:[0-9]+: Error: invalid ZA tile element size, allowed b, h, s and d at operand 1 -- `umopa za1.q,p2/m,p3/m,z2.b,z3.b' -[^:]*:[0-9]+: Error: invalid ZA tile register number, expected za0-za7 at operand 1 -- `umopa za8.d,p0/m,p1/m,z1.h,z8.h' -[^:]*:[0-9]+: Error: invalid ZA tile element size, allowed b, h, s and d at operand 1 -- `umopa za1.q,p2/m,p3/m,z2.h,z7.h' -[^:]*:[0-9]+: Error: invalid ZA tile register number, expected za0-za3 at operand 1 -- `umops za4.s,p0/m,p1/m,z1.b,z4.b' -[^:]*:[0-9]+: Error: invalid ZA tile element size, allowed b, h, s and d at operand 1 -- `umops za1.q,p2/m,p3/m,z2.b,z3.b' -[^:]*:[0-9]+: Error: invalid ZA tile register number, expected za0-za7 at operand 1 -- `umops za8.d,p0/m,p1/m,z1.h,z8.h' +[^:]*:[0-9]+: Error: ZA tile number out of range at operand 1 -- `sumops za4.s,p0/m,p1/m,z1.b,z4.b' +[^:]*:[0-9]+: Error: operand mismatch -- `sumops za1.q,p2/m,p3/m,z2.b,z3.b' +[^:]*:[0-9]+: Info: did you mean this\? +[^:]*:[0-9]+: Info: sumops za1.d, p2/m, p3/m, z2.h, z3.h +[^:]*:[0-9]+: Error: ZA tile number out of range at operand 1 -- `sumops za8.d,p0/m,p1/m,z1.h,z8.h' +[^:]*:[0-9]+: Error: operand mismatch -- `sumops za1.q,p2/m,p3/m,z2.h,z7.h' +[^:]*:[0-9]+: Info: did you mean this\? +[^:]*:[0-9]+: Info: sumops za1.d, p2/m, p3/m, z2.h, z7.h +[^:]*:[0-9]+: Error: ZA tile number out of range at operand 1 -- `umopa za4.s,p0/m,p1/m,z1.b,z4.b' +[^:]*:[0-9]+: Error: operand mismatch -- `umopa za1.q,p2/m,p3/m,z2.b,z3.b' +[^:]*:[0-9]+: Info: did you mean this\? +[^:]*:[0-9]+: Info: umopa za1.d, p2/m, p3/m, z2.h, z3.h +[^:]*:[0-9]+: Error: ZA tile number out of range at operand 1 -- `umopa za8.d,p0/m,p1/m,z1.h,z8.h' +[^:]*:[0-9]+: Error: operand mismatch -- `umopa za1.q,p2/m,p3/m,z2.h,z7.h' +[^:]*:[0-9]+: Info: did you mean this\? +[^:]*:[0-9]+: Info: umopa za1.d, p2/m, p3/m, z2.h, z7.h +[^:]*:[0-9]+: Error: ZA tile number out of range at operand 1 -- `umops za4.s,p0/m,p1/m,z1.b,z4.b' +[^:]*:[0-9]+: Error: operand mismatch -- `umops za1.q,p2/m,p3/m,z2.b,z3.b' +[^:]*:[0-9]+: Info: did you mean this\? +[^:]*:[0-9]+: Info: umops za1.d, p2/m, p3/m, z2.h, z3.h +[^:]*:[0-9]+: Error: ZA tile number out of range at operand 1 -- `umops za8.d,p0/m,p1/m,z1.h,z8.h' [^:]*:[0-9]+: Error: operand mismatch -- `umops za1.d,p2/m,p3/m,z2.d,z7.d' [^:]*:[0-9]+: Info: did you mean this\? [^:]*:[0-9]+: Info: umops za1.d, p2/m, p3/m, z2.h, z7.h -[^:]*:[0-9]+: Error: invalid ZA tile register number, expected za0-za3 at operand 1 -- `usmopa za4.s,p0/m,p1/m,z1.b,z4.b' -[^:]*:[0-9]+: Error: invalid ZA tile element size, allowed b, h, s and d at operand 1 -- `usmopa za1.q,p2/m,p3/m,z2.b,z3.b' -[^:]*:[0-9]+: Error: invalid ZA tile register number, expected za0-za7 at operand 1 -- `usmopa za8.d,p0/m,p1/m,z1.h,z8.h' -[^:]*:[0-9]+: Error: invalid ZA tile element size, allowed b, h, s and d at operand 1 -- `usmopa za1.q,p2/m,p3/m,z2.h,z7.h' -[^:]*:[0-9]+: Error: invalid ZA tile register number, expected za0-za3 at operand 1 -- `usmops za4.s,p0/m,p1/m,z1.b,z4.b' +[^:]*:[0-9]+: Error: ZA tile number out of range at operand 1 -- `usmopa za4.s,p0/m,p1/m,z1.b,z4.b' +[^:]*:[0-9]+: Error: operand mismatch -- `usmopa za1.q,p2/m,p3/m,z2.b,z3.b' +[^:]*:[0-9]+: Info: did you mean this\? +[^:]*:[0-9]+: Info: usmopa za1.d, p2/m, p3/m, z2.h, z3.h +[^:]*:[0-9]+: Error: ZA tile number out of range at operand 1 -- `usmopa za8.d,p0/m,p1/m,z1.h,z8.h' +[^:]*:[0-9]+: Error: operand mismatch -- `usmopa za1.q,p2/m,p3/m,z2.h,z7.h' +[^:]*:[0-9]+: Info: did you mean this\? +[^:]*:[0-9]+: Info: usmopa za1.d, p2/m, p3/m, z2.h, z7.h +[^:]*:[0-9]+: Error: ZA tile number out of range at operand 1 -- `usmops za4.s,p0/m,p1/m,z1.b,z4.b' [^:]*:[0-9]+: Error: operand mismatch -- `usmops za1.s,p2/m,p3/m,z2.s,z3.b' [^:]*:[0-9]+: Info: did you mean this\? [^:]*:[0-9]+: Info: usmops za1.d, p2/m, p3/m, z2.h, z3.h -[^:]*:[0-9]+: Error: invalid ZA tile register number, expected za0-za7 at operand 1 -- `usmops za8.d,p0/m,p1/m,z1.h,z8.h' +[^:]*:[0-9]+: Error: ZA tile number out of range at operand 1 -- `usmops za8.d,p0/m,p1/m,z1.h,z8.h' [^:]*:[0-9]+: Error: operand mismatch -- `usmops za1.d,p2/m,p3/m,z2.d,z7.d' [^:]*:[0-9]+: Info: did you mean this\? [^:]*:[0-9]+: Info: usmops za1.d, p2/m, p3/m, z2.h, z7.h |