public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Vineet Gupta <vineetg@rivosinc.com>
To: Binutils <binutils@sourceware.org>, Nelson Chu <nelson.chu@sifive.com>
Cc: Kito Cheng <kito.cheng@sifive.com>,
	jim.wilson.gcc@gmail.com, palmer@dabbelt.com,
	Vineet Gupta <vineetg@rivosinc.com>
Subject: [RFC 0/4] riscv/binutils support Hypervisor Extension
Date: Thu, 16 Dec 2021 09:33:24 -0800	[thread overview]
Message-ID: <20211216173328.766127-1-vineetg@rivosinc.com> (raw)

Hi,

This patchset adds support for Hypervisor Extension ratified recently
[1].

This is an RFC as I seek some guidance. The core changes to add new
instructions and CSRs are strightfwd however some of the peripheral
changes require some consensus:

1. single letter 'h' prefix in arch string (vs. existing multi-letter)
   This started because I couldn't coax the existing gcc driver to
   take a multi-letter h prefix. And while that was the initial motivation,
   following other discussion [2] it seems to make sense anyways.

2. I don't know how to generate the testsuite output files (.d) for the
   new files I added - does it start with copy/paste or does tooling
   exist to generate those.

Please review/comment !

Thx,
-Vineet

[1] https://wiki.riscv.org/display/TECH/Recently+Ratified+Extensions
[2] https://github.com/riscv/riscv-isa-manual/issues/781#issuecomment-983233088

Vineet Gupta (4):
  RISC-V: Hypervisor ext: Treat as "Standard" extension
  RISC-V: Hypervisor ext: CSR and Instructions
  RISC-V: Hypervisor ext: tests for new isns/csr and cleanup old csrs
  RISC-V: fix a comment for adding CSR entry and annotate switch-break

 bfd/elfxx-riscv.c                             |   5 +
 gas/config/tc-riscv.c                         |  15 ++-
 gas/testsuite/gas/riscv/csr-dw-regnums.d      |  10 --
 gas/testsuite/gas/riscv/csr-dw-regnums.s      |  10 --
 gas/testsuite/gas/riscv/h-ext-32.s            |  61 +++++++++
 gas/testsuite/gas/riscv/h-ext-64.s            |  68 ++++++++++
 .../gas/riscv/march-fail-single-prefix-h.d    |   3 -
 .../gas/riscv/march-fail-single-prefix.l      |   2 +-
 .../gas/riscv/priv-reg-fail-read-only-01.s    |  10 --
 .../gas/riscv/priv-reg-fail-version-1p10.l    |  10 --
 .../gas/riscv/priv-reg-fail-version-1p11.l    |  10 --
 .../gas/riscv/priv-reg-version-1p10.d         |  10 --
 .../gas/riscv/priv-reg-version-1p11.d         |  10 --
 .../gas/riscv/priv-reg-version-1p9p1.d        |  10 --
 gas/testsuite/gas/riscv/priv-reg.s            |  10 --
 include/opcode/riscv-opc.h                    | 123 ++++++++++++++----
 include/opcode/riscv.h                        |   1 +
 opcodes/riscv-opc.c                           |  23 +++-
 18 files changed, 264 insertions(+), 127 deletions(-)
 create mode 100644 gas/testsuite/gas/riscv/h-ext-32.s
 create mode 100644 gas/testsuite/gas/riscv/h-ext-64.s
 delete mode 100644 gas/testsuite/gas/riscv/march-fail-single-prefix-h.d

-- 
2.30.2


             reply	other threads:[~2021-12-16 17:33 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-16 17:33 Vineet Gupta [this message]
2021-12-16 17:33 ` [RFC 1/4] RISC-V: Hypervisor ext: Treat as "Standard" extension Vineet Gupta
2021-12-17  4:10   ` Palmer Dabbelt
2021-12-17 16:10     ` Nelson Chu
2021-12-17 22:40       ` Vineet Gupta
2021-12-17 22:50       ` Palmer Dabbelt
2021-12-17 23:14         ` Vineet Gupta
2021-12-16 17:33 ` [RFC 2/4] RISC-V: Hypervisor ext: CSR and Instructions Vineet Gupta
2021-12-17  4:10   ` Palmer Dabbelt
2021-12-17 17:30     ` Nelson Chu
2021-12-18  1:44       ` Vineet Gupta
2021-12-16 17:33 ` [RFC 3/4] RISC-V: Hypervisor ext: tests for new isns/csr and cleanup old csrs Vineet Gupta
2021-12-17  4:10   ` Palmer Dabbelt
2021-12-21  8:17   ` Jan Beulich
2021-12-21 15:28     ` Vineet Gupta
2021-12-16 17:33 ` [RFC 4/4] RISC-V: fix a comment for adding CSR entry and annotate switch-break Vineet Gupta
2021-12-17  4:10   ` Palmer Dabbelt

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=20211216173328.766127-1-vineetg@rivosinc.com \
    --to=vineetg@rivosinc.com \
    --cc=binutils@sourceware.org \
    --cc=jim.wilson.gcc@gmail.com \
    --cc=kito.cheng@sifive.com \
    --cc=nelson.chu@sifive.com \
    --cc=palmer@dabbelt.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).