public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Richard Sandiford <richard.sandiford@arm.com>
To: Ilya Leoshkevich <iii@linux.ibm.com>
Cc: gcc-patches@gcc.gnu.org,  krebbel@linux.ibm.com,  rdapp@linux.ibm.com
Subject: Re: [PATCH] Change EQ_ATTR_ALT to support up to 64 alternatives
Date: Mon, 24 Sep 2018 11:49:00 -0000	[thread overview]
Message-ID: <875zyv5e1y.fsf@arm.com> (raw)
In-Reply-To: <20180919152246.55456-1-iii@linux.ibm.com> (Ilya Leoshkevich's	message of "Wed, 19 Sep 2018 17:22:46 +0200")

Ilya Leoshkevich <iii@linux.ibm.com> writes:
> On S/390 there is a need to support more than 32 instruction
> alternatives per define_insn.  Currently this is not explicitly
> prohibited or unsupported: MAX_RECOG_ALTERNATIVES is equal 35, and,
> futhermore, the related code uses uint64_t for bitmaps in most places.
>
> However, genattrtab contains the logic to convert (eq_attr "attribute"
> "value") RTXs to (eq_attr_alt bitmap) RTXs, where bitmap contains
> alternatives, whose "attribute" has the corresponding "value".
> Unfortunately, bitmap is only 32 bits.
>
> When adding the 33rd alternative, this led to (eq_attr "type" "larl")
> becoming (eq_attr_alt -1050625 1), where -1050625 == 0xffeff7ff.  The
> cleared bits 12, 21 and 32 correspond to two existing and one newly
> added insn of type "larl".  compute_alternative_mask sign extended this
> to 0xffffffffffeff7ff, which contained non-existent alternatives, and
> this made simplify_test_exp fail with "invalid alternative specified".
>
> I'm not sure why it didn't fail the same way before, since the top bit,
> which led to sign extension, should have been set even with 32
> alternatives.  Maybe simplify_test_exp was not called for "type"
> attribute for some reason?
>
> This patch widens EQ_ATTR_ALT bitmap to 64 bits, making it possible to
> gracefully handle up to 64 alternatives.  It eliminates the problem with
> the 33rd alternative on S/390.

Could you test this with --enable-checking=yes,rtl , if you haven't already,
to check that there are no mossing XINT->XWINT changes?

OK if that passes, thanks.

Richard

  reply	other threads:[~2018-09-24 11:29 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-19 15:51 Ilya Leoshkevich
2018-09-24 11:49 ` Richard Sandiford [this message]
2018-09-24 15:20   ` Ilya Leoshkevich
2018-09-24 16:48     ` Rainer Orth

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=875zyv5e1y.fsf@arm.com \
    --to=richard.sandiford@arm.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=iii@linux.ibm.com \
    --cc=krebbel@linux.ibm.com \
    --cc=rdapp@linux.ibm.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).