From: James Greenhalgh <james.greenhalgh@arm.com>
To: Wilco Dijkstra <Wilco.Dijkstra@arm.com>
Cc: GCC Patches <gcc-patches@gcc.gnu.org>, nd <nd@arm.com>
Subject: Re: [PATCH][AArch64] Fix ICE due to store_pair_lanes
Date: Tue, 28 Nov 2017 18:40:00 -0000 [thread overview]
Message-ID: <20171128181500.GA25893@arm.com> (raw)
In-Reply-To: <DB6PR0801MB2053ED838D2FC5576E5658E383250@DB6PR0801MB2053.eurprd08.prod.outlook.com>
On Mon, Nov 27, 2017 at 03:20:29PM +0000, Wilco Dijkstra wrote:
> The recently added store_pair_lanes causes ICEs in output_operand.
> This is due to aarch64_classify_address treating it like a 128-bit STR
> rather than a STP. The valid immediate offsets don't fully overlap,
> causing it to return false. Eg. offset 264 is a valid 8-byte STP offset
> but not a valid 16-byte STR offset since it isn't a multiple of 16.
>
> The original instruction isn't passed in the printing code, so the context
> is unclear. The solution is to add a new operand formatting specifier
> which is used for LDP/STP instructions like this. This, like the Uml
> constraint that applies to store_pair_lanes, uses PARALLEL when calling
> aarch64_classify_address so that it knows it is an STP.
> Also add the 'z' specifier for future use by load/store pair instructions.
>
> Passes regress, OK for commit?
OK. But...
> + if (aarch64_classify_address (&addr, x, mode, op, true))
This interface is not nice, resulting in...
> +/* Print address 'x' of a LDP/STP with mode 'mode'. */
> +static void
> +aarch64_print_ldpstp_address (FILE *f, machine_mode mode, rtx x)
> +{
> + aarch64_print_address_internal (f, mode, x, PARALLEL);
> +}
> +
> +/* Print address 'x' of a memory access with mode 'mode'. */
> +static void
> +aarch64_print_operand_address (FILE *f, machine_mode mode, rtx x)
> +{
> + aarch64_print_address_internal (f, mode, x, MEM);
> +}
These, which I *really* dislike.
Ideas on how to clean up this interface would be appreciated.
Thanks,
James
next prev parent reply other threads:[~2017-11-28 18:15 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-27 15:44 Wilco Dijkstra
2017-11-28 18:40 ` James Greenhalgh [this message]
2017-11-29 21:03 ` Christophe Lyon
2017-11-29 22:32 ` Steve Ellcey
2017-11-30 0:52 ` Steve Ellcey
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20171128181500.GA25893@arm.com \
--to=james.greenhalgh@arm.com \
--cc=Wilco.Dijkstra@arm.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=nd@arm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).