qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Jun Sun <jsun@junsun.net>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: qemu-devel@nongnu.org, "Alex Bennée" <alex.bennee@linaro.org>
Subject: Re: [PATCH risu] --group option to allow all instructions in the specified groups.
Date: Tue, 6 Jun 2023 09:42:17 -0700	[thread overview]
Message-ID: <CAP5Nno76ofD7rsYJxBx9Kv52z0ut=Lz3FS1eXVgVyokX8wNdTg@mail.gmail.com> (raw)
In-Reply-To: <CAFEAcA-qVPABh-B8D7Ds20NwT_zGq9t_za9xFR-x2mfNjUMuYg@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 2663 bytes --]

I see. I think your suggestion makes sense, i.e., groups specified in one
line means intersection of groups, while multiple --group lines mean union
of groups.

BTW, I have moved along and added many new features to risu, including
generating instructions as shared libraries (instead of raw binary files),
multiple instruction sequence, etc.  If these are interesting to the
community, I will try to find time and submit.  There are a lot of works to
make a proper patch than just making my hack. :)

Jun

On Tue, May 9, 2023 at 5:43 AM Peter Maydell <peter.maydell@linaro.org>
wrote:

> On Wed, 3 May 2023 at 17:35, Jun Sun <jsun@junsun.net> wrote:
> >
> >
> > Current semantic is a little strange when multiple --group options are
> specified.
> > In this case,  only instructions in *all* these groups (i.e.,
> intersection) are used for
> > generation, which is not very useful at all.  This patch changes the
> semantic to
> > include all instructions in these groups (i.e., union) for sequence
> generation.
>
> The commit message which added the --group option specifically
> documents a case where it is useful:
>
>       ./risugen --group v8.2,Cryptographic aarch64.risu v8.2-crypto.bin
>
> where you want to say "only test the v8.2 crypto insns"
> (i.e. not any crypto insns from other architecture versions,
> and not any non-crypto insns).
> Changing the semantics to union would break this.
>
> Being able to specify that you want insns from multiple
> groups seems like it would be useful, but we should add
> it in a way that doesn't break the existing uses.
>
> One idea that occurs to me is that you could allow
> multiple --group options to mean "union of these"
> and multiple groups within a --group to mean "intersection".
> So for instance
>  --group v8.2,Cryptographic --group v8_3_compnum
> would select all the insns that are
>    (v8.2 AND cryptographic) OR v8_3_compnum
>
> (This does technically break some existing commandlines
> because the current code makes "--group A --group B"
> do the same thing as "--group A,B".)
>
> Alex, you added the --group option -- what do you think?
>
> > diff --git a/risugen_arm.pm b/risugen_arm.pm
> > index 2dc144d..dc08ec0 100644
> > --- a/risugen_arm.pm
> > +++ b/risugen_arm.pm
> > @@ -1112,6 +1112,7 @@ sub write_test_code($$$$$$$$$)
> >      }
> >
> >      print "Generating code using patterns: @keys...\n";
> > +    print "Total insn patterns : " . $#keys . "\n";
> >      progress_start(78, $numinsns);
> >
> >      if ($fp_enabled) {
>
> These changes seem unrelated to the --group option.
>
> thanks
> -- PMM
>

[-- Attachment #2: Type: text/html, Size: 3579 bytes --]

      reply	other threads:[~2023-06-06 16:43 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-03 16:34 [PATCH risu] --group option to allow all instructions in the specified groups Jun Sun
2023-05-09 12:43 ` Peter Maydell
2023-06-06 16:42   ` Jun Sun [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='CAP5Nno76ofD7rsYJxBx9Kv52z0ut=Lz3FS1eXVgVyokX8wNdTg@mail.gmail.com' \
    --to=jsun@junsun.net \
    --cc=alex.bennee@linaro.org \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    /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 NNTP newsgroup(s).