From 163b2c58bdbf0cba9a085574ae88d4c757c6567d Mon Sep 17 00:00:00 2001 From: Barnaby Wilks Date: Tue, 2 Jul 2019 14:09:52 +0100 Subject: This patch fixes a bug in the AArch64 assembler where an incorrect structural load/store by element instruction would generate the wrong error message. For example, when provided with the (incorrect) instruction st4 {v0.16b-v3.16b}[4],[x0] currently assembler provides the following error message "Error: comma expected between operands at operand 2 -- `st4 {v0.16b-v3.16b}[4],[x0]'". This was due to the assembler consuming the {v0.16b-v3.16b} as the first operand leaving [4],[x0] as what it believed to be the second operand. The actual error is that the first operand should be of element type and not vector type (as provided). The new diagnostic for this error is "Error: expected element type rather than vector type at operand 1 -- `st4 {v0.16b-v3.16b}[4],[x0]'. Added testcases to check for the correct diagnostic message as well as checking that variations of the structural load/store by element instruction also generate the error when they have the same problem. * config/tc-aarch64.c (parse_operands): Add error check. * testsuite/gas/aarch64/diagnostic.l: New test. * testsuite/gas/aarch64/diagnostic.s: New test. * testsuite/gas/aarch64/illegal.l: New tests. * testsuite/gas/aarch64/illegal.s: New tests. --- gas/ChangeLog | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'gas/ChangeLog') diff --git a/gas/ChangeLog b/gas/ChangeLog index f3fe16a..2134607 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,11 @@ +2019-07-02 Barnaby Wilks + + * config/tc-aarch64.c (parse_operands): Add error check. + * testsuite/gas/aarch64/diagnostic.l: New test. + * testsuite/gas/aarch64/diagnostic.s: New test. + * testsuite/gas/aarch64/illegal.l: New tests. + * testsuite/gas/aarch64/illegal.s: New tests. + 2019-07-02 Richard Sandiford * testsuite/gas/aarch64/sve-movprfx_27.s, -- cgit v1.1