public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Tsukasa OI <research_trasio@irq.a4lg.com>
To: Jan Beulich <jbeulich@suse.com>, Binutils <binutils@sourceware.org>
Subject: Re: [PATCH v2] RISC-V: Add support for 'Zacas' atomic CAS
Date: Tue, 24 Oct 2023 13:07:37 +0900	[thread overview]
Message-ID: <df7079de-6dd5-4b20-8753-377968619d13@irq.a4lg.com> (raw)
In-Reply-To: <ea818aaa-fd25-c549-62e0-43c974959726@suse.com>

On 2023/10/23 15:47, Jan Beulich wrote:
> 
> Mind me asking what good the former of the two really does? It's just
> match_opcode() aiui, properly obfuscated.
> 
> Jan
> 

****Excuse me?****

As a single patch set, I think Gianluca's patch with a minor fix will
work perfectly.  But, the concept of register pairs / register groups
are not specific to 'Zacas', that's what I'm talking about and the
reason I think Gianluca's patch set's match function will not be a long
term solution (actually, I found Gianluca's patch set after I wrote
mine, but that wouldn't change my opinion).

So, let me list all register group-related constraints in existing and
upcoming extensions (except all ones; x is "not applicable" and can be
theoretically replaced to "1" but it's probably better to be named "x"
to indicate that the instruction does not use "x" operand as register):

Extension   |  RD | RS1 | RS2 | RS3
----------- | --- | --- | --- | ---
Zdinx       |   2 |   2 |   2 |   x
Zdinx       |   2 |   2 |   2 |   2
Zdinx       |   x |   2 |   2 |   x
Zdinx       |   1 |   2 |   x |   x
Zdinx       |   2 |   1 |   x |   x
Zdinx       |   2 |   2 |   x |   x
----------- | --- | --- | --- | ---
Zqinx       |   2 |   2 |   2 |   x
Zqinx       |   4 |   4 |   4 |   x
Zqinx       |   2 |   2 |   2 |   2
Zqinx       |   4 |   4 |   4 |   4
Zqinx       |   x |   2 |   2 |   x
Zqinx       |   x |   4 |   4 |   x
Zqinx       |   1 |   2 |   x |   x
Zqinx       |   1 |   4 |   x |   x
Zqinx       |   2 |   1 |   x |   x
Zqinx       |   2 |   2 |   x |   x
Zqinx       |   2 |   4 |   x |   x
Zqinx       |   4 |   1 |   x |   x
Zqinx       |   4 |   2 |   x |   x
Zqinx       |   4 |   4 |   x |   x
----------- | --- | --- | --- | ---
Zpsfoperand |   2 |   1 |   1 |   x
Zpsfoperand |   2 |   2 |   1 |   x
Zpsfoperand |   2 |   2 |   2 |   x
----------- | --- | --- | --- | ---
Zacas       |   2 |   1 |   2 |   x

Lots of similar constraints but different values.  Don't you think a
generator macro is the best solution for this kind of situation?

Tsukasa

  reply	other threads:[~2023-10-24  4:07 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-21  3:12 [PATCH 0/1] " Tsukasa OI
2023-10-21  3:12 ` [PATCH 1/1] " Tsukasa OI
2023-10-22  3:54 ` [PATCH v2] " Tsukasa OI
2023-10-22  3:57   ` [REVIEW ONLY] UNRATIFIED RISC-V: Add support for 'Zabha' subword AMO extension Tsukasa OI
2023-10-22  3:59   ` [PATCH v2] RISC-V: Add support for 'Zacas' atomic CAS Tsukasa OI
2023-10-23  6:47   ` Jan Beulich
2023-10-24  4:07     ` Tsukasa OI [this message]
2023-10-24  6:02       ` Jan Beulich
2023-10-25  2:15         ` Nelson Chu
2023-10-25  6:02           ` Jan Beulich
2023-12-06 18:39 ` [PATCH 0/1] " Gianluca Guida

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=df7079de-6dd5-4b20-8753-377968619d13@irq.a4lg.com \
    --to=research_trasio@irq.a4lg.com \
    --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).