public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* [PATCH 0/1] RISC-V: Add support for 'Zacas' atomic CAS
@ 2023-10-21  3:12 Tsukasa OI
  2023-10-21  3:12 ` [PATCH 1/1] " Tsukasa OI
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Tsukasa OI @ 2023-10-21  3:12 UTC (permalink / raw)
  To: Tsukasa OI, Palmer Dabbelt, Andrew Waterman, Jim Wilson,
	Nelson Chu, Kito Cheng
  Cc: binutils

Hi,

This patch adds support for now frozen (and being ratification) 'Zacas'
extension, containing atomic CAS instructions.

There are two patch sets by other people:

By Gianluca Guida (in 2023 May; RFC PATCH v2 at that time):
<https://sourceware.org/pipermail/binutils/2023-May/127700.html>
By Jiawei (in 2023 July; withdrawn):
<https://sourceware.org/pipermail/binutils/2023-July/128556.html>

... but independently developed.


Note that, this is one of the extensions that require the concept of
register pairs or register groups because it contains 2*XLEN-width
(double-word) CAS instructions.

We are better to reject invalid encodings considering the consensus after
the discussion of RISC-V GNU Toolchain meeting at 2022-10-06 (the feedback
of my proposal itself wasn't positive but we agreed that we are better to
detect invalid encodings as early as possible [I mean, in the assembler])
and the feedback to Gianluca's first RFC PATCH by Jan:
<https://sourceware.org/pipermail/binutils/2023-May/127407.html>


Differences to Gianluka's:
1.  Correct data size (INSN_DREF|INSN_*_BYTE) we are handling
2.  Make register pair matching function to be template
    to enable reusing this framework for upcoming P and existing Zdinx and
    V (many V cases are invalid only on certain runtime configuration and
    "always invalid" detectable cases are rare, but not zero).

Differences to Jiawei's:
1.  Correct support for register groups (fixed in Gianluka's RFC PATCH v2).


Thanks,
Tsukasa




Tsukasa OI (1):
  RISC-V: Add support for 'Zacas' atomic CAS

 bfd/elfxx-riscv.c                       |  6 +++++
 gas/testsuite/gas/riscv/zacas-32-fail.d |  2 ++
 gas/testsuite/gas/riscv/zacas-32-fail.l |  9 +++++++
 gas/testsuite/gas/riscv/zacas-32-fail.s | 10 +++++++
 gas/testsuite/gas/riscv/zacas-32.d      | 17 ++++++++++++
 gas/testsuite/gas/riscv/zacas-32.s      |  9 +++++++
 gas/testsuite/gas/riscv/zacas-64-fail.d |  2 ++
 gas/testsuite/gas/riscv/zacas-64-fail.l |  9 +++++++
 gas/testsuite/gas/riscv/zacas-64-fail.s | 10 +++++++
 gas/testsuite/gas/riscv/zacas-64.d      | 17 ++++++++++++
 gas/testsuite/gas/riscv/zacas-64.s      |  9 +++++++
 include/opcode/riscv-opc.h              | 11 ++++++++
 include/opcode/riscv.h                  |  1 +
 opcodes/riscv-opc.c                     | 36 +++++++++++++++++++++++++
 14 files changed, 148 insertions(+)
 create mode 100644 gas/testsuite/gas/riscv/zacas-32-fail.d
 create mode 100644 gas/testsuite/gas/riscv/zacas-32-fail.l
 create mode 100644 gas/testsuite/gas/riscv/zacas-32-fail.s
 create mode 100644 gas/testsuite/gas/riscv/zacas-32.d
 create mode 100644 gas/testsuite/gas/riscv/zacas-32.s
 create mode 100644 gas/testsuite/gas/riscv/zacas-64-fail.d
 create mode 100644 gas/testsuite/gas/riscv/zacas-64-fail.l
 create mode 100644 gas/testsuite/gas/riscv/zacas-64-fail.s
 create mode 100644 gas/testsuite/gas/riscv/zacas-64.d
 create mode 100644 gas/testsuite/gas/riscv/zacas-64.s


base-commit: 0e17d3fc080f543d81e6c2520ba0bd8046ea3a95
-- 
2.42.0


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2023-12-06 18:39 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-10-21  3:12 [PATCH 0/1] RISC-V: Add support for 'Zacas' atomic CAS 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
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

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).