This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
RE: [PATCH][binutils][AArch64] Fix diagnostic error message for structural load/store by element.
- From: Tamar Christina <Tamar dot Christina at arm dot com>
- To: Barnaby Wilks <Barnaby dot Wilks at arm dot com>, "binutils at sourceware dot org" <binutils at sourceware dot org>
- Cc: nd <nd at arm dot com>, Richard Earnshaw <Richard dot Earnshaw at arm dot com>, Marcus Shawcroft <Marcus dot Shawcroft at arm dot com>
- Date: Mon, 1 Jul 2019 07:20:40 +0000
- Subject: RE: [PATCH][binutils][AArch64] Fix diagnostic error message for structural load/store by element.
- References: <AM0PR08MB36506C4D6C7CFB2FBB9C1E99EAE20@AM0PR08MB3650.eurprd08.prod.outlook.com>
Hi Barnaby,
Your patch looks OK to be, however I am not a maintainer so you still need maintainer approval for this.
Thanks for the fix,
Tamar
> -----Original Message-----
> From: binutils-owner@sourceware.org <binutils-owner@sourceware.org> On
> Behalf Of Barnaby Wilks
> Sent: Wednesday, June 26, 2019 15:20
> To: binutils@sourceware.org
> Cc: nd <nd@arm.com>; Richard Earnshaw <Richard.Earnshaw@arm.com>;
> Marcus Shawcroft <Marcus.Shawcroft@arm.com>
> Subject: [PATCH][binutils][AArch64] Fix diagnostic error message for
> structural load/store by element.
>
> Hello,
>
> This patch fixes a bug 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.
>
> Cross compiled and regtested aarch64-none-elf and
> aarch64-none-linux-gnu and no issues found.
>
> I don't have write access, so if it's OK then could someone commit on
> my behalf?
>
> Thanks,
> Barney
>
> gas/ChangeLog:
>
> 2019-06-26 Barnaby Wilks <barnaby.wilks@arm.com>
>
> * 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.