public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Tsukasa OI <research_trasio@irq.a4lg.com>
To: Tsukasa OI <research_trasio@irq.a4lg.com>,
	Nelson Chu <nelson@rivosinc.com>,
	Kito Cheng <kito.cheng@sifive.com>,
	Palmer Dabbelt <palmer@dabbelt.com>,
	Andrew Waterman <andrew@sifive.com>
Cc: binutils@sourceware.org
Subject: [RFC PATCH 0/1] RISC-V: Add privileged extensions without instructions/CSRs
Date: Thu, 22 Sep 2022 07:58:55 +0000	[thread overview]
Message-ID: <cover.1663833488.git.research_trasio@irq.a4lg.com> (raw)

Hello,

Tracker on GitHub:
<https://github.com/a4lg/binutils-gdb/wiki/riscv_priv_ext_without_insn_or_csrs>


Currently, GNU Binutils does not support following privileged extensions:

-   'Smepmp'
-   'Svnapot'
-   'Svpbmt'

as they do not provide new CSRs or new instructions ('Smepmp' extends the
privileged architecture CSRs but does not define the CSR itself).  However,
I started considering adding them to GNU Binutils' supported extension list.

One of the reason is simple: if we do that, we no longer have to "filter"
ISA strings just for toolchains (if full ISA string is given by a vendor, we
can straightly use it).

And there's a fact that support this theory: there's already an
(unprivileged) extension which does not provide CSRs or instructions (not
even pseudoinstructions; but only an architectural guarantee): 'Zkt'
(constant timing guarantee for certain subset of RISC-V instructions).


This simple patchset simply adds three privileged extensions I described
above and I want to hear your thoughts.

If this is acceptable for GNU Binutils, doing the same (or accepting all
privileged extensions) to GCC might be an option.  It might not benefit
regular C/C++ programs but it absolutely helps compiling .S (assembler file
but must pass C preprocessor first).


Thanks,
Tsukasa




Tsukasa OI (1):
  RISC-V: Add privileged extensions without instructions/CSRs

 bfd/elfxx-riscv.c | 3 +++
 1 file changed, 3 insertions(+)


base-commit: 0383bce6502271455804daa533c9d141e7c3fc98
-- 
2.34.1


             reply	other threads:[~2022-09-22  7:59 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-22  7:58 Tsukasa OI [this message]
2022-09-22  7:58 ` [RFC PATCH 1/1] " Tsukasa OI
2022-09-22  8:48   ` Nelson Chu
2022-09-22  9:44     ` Tsukasa OI
2022-09-30 15:44       ` Tsukasa OI

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=cover.1663833488.git.research_trasio@irq.a4lg.com \
    --to=research_trasio@irq.a4lg.com \
    --cc=andrew@sifive.com \
    --cc=binutils@sourceware.org \
    --cc=kito.cheng@sifive.com \
    --cc=nelson@rivosinc.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).