public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: "Maciej W. Rozycki" <macro@orcam.me.uk>
To: Jan Beulich <jbeulich@suse.com>
Cc: binutils@sourceware.org
Subject: Re: [PATCH] RISC-V: fix JAL aliases ordering in opcode table
Date: Sun, 8 Jan 2023 13:53:14 +0000 (GMT)	[thread overview]
Message-ID: <alpine.DEB.2.21.2301081344090.2259@angie.orcam.me.uk> (raw)
In-Reply-To: <9975504c-579e-48ee-751a-66c6b055a78c@suse.com>

On Thu, 5 Jan 2023, Jan Beulich via Binutils wrote:

> >> I'm afraid reverting the "offending" hunk is only a workaround, as it
> >> would re-introduce the disassembler side issue that the patch tried to
> >> deal with (and which sadly looks to not be covered by anything in the
> >> testsuite, or else you would have noticed breakage when testing your
> >> change). Since I expect that in the course of table lookup it is still
> >> the correct entry (in particular one with two rather than just one
> >> operands) which is used, my suspicion is that something somewhere makes
> >> a silent assumption upon the (original) ordering of table entries. It
> >> would be that place which needs fixing then; I'll try to find time soon
> >> to see if I can spot where that is.
> > 
> > Thanks for the analysis. Do you think you have time to get a patch with
> > that fix before the 2.40 release?
> 
> I hope to get to looking into this tomorrow; whether that'll result in a
> patch I obviously can't tell yet. In any event Nelson's reply (which
> crossed with mine) suggests the reason for the problem to be different.
> Yet then still that's where the change wants to be (albeit I disagree
> with his proposal, yet that's without having looked at the code at all),
> rather than re-introducing the disassembler inconsistency. The latter
> would certainly be a short-term option for the impending release, if a
> proper solution can't be found in time or turns out too intrusive. But
> then the title and description would need adjustment to reflect this
> (e.g. it wouldn't be "fix" but maybe "restore" or "undo").

 FWIW we have taken a similar approach in the MIPS port, which I believe 
is where the RISC-V port took inspiration from, and by ordering the opcode 
table carefully we get the desired results; see the various `j*' and other 
instruction entries in opcodes/mips-opc.c.  It has worked for some 30 
years now, so it should be pretty straightforward to get this sorted here 
as well.

  Maciej

      reply	other threads:[~2023-01-08 13:53 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-04  5:59 Aurelien Jarno
2023-01-04  7:43 ` Nelson Chu
2023-01-04  7:50 ` Jan Beulich
2023-01-05  7:56   ` Aurelien Jarno
2023-01-05  8:20     ` Jan Beulich
2023-01-08 13:53       ` Maciej W. Rozycki [this message]

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=alpine.DEB.2.21.2301081344090.2259@angie.orcam.me.uk \
    --to=macro@orcam.me.uk \
    --cc=binutils@sourceware.org \
    --cc=jbeulich@suse.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).