From: Tsukasa OI <research_trasio@irq.a4lg.com>
To: Tsukasa OI <research_trasio@irq.a4lg.com>,
Palmer Dabbelt <palmer@dabbelt.com>,
Andrew Waterman <andrew@sifive.com>,
Jim Wilson <jim.wilson.gcc@gmail.com>,
Nelson Chu <nelson@rivosinc.com>,
Kito Cheng <kito.cheng@sifive.com>
Cc: binutils@sourceware.org
Subject: [PATCH v2 0/1] RISC-V: Add 'Zicntr' and 'Zihpm' support with compatibility measures
Date: Sat, 21 Oct 2023 02:17:19 +0000 [thread overview]
Message-ID: <cover.1697854636.git.research_trasio@irq.a4lg.com> (raw)
In-Reply-To: <cover.1697849093.git.research_trasio@irq.a4lg.com>
Hi,
This patch adds support for two extensions, split from the RISC-V
Unprivileged ISA version 2.2:
1. `Zicntr`
Basic hardware performance counters
2. `Zihpm`
Platform-specific configurable hardware performance counters
but the compatibility is vital. This patch set tries to deal with the
compatibility issues as possible.
RFC PATCH v1:
<https://sourceware.org/pipermail/binutils/2023-August/128895.html>
PATCH v1 (the implementation is detailed in this cover letter):
<https://sourceware.org/pipermail/binutils/2023-October/130091.html>
PATCH v2 fixes some test failures when compiled with -with-isa-spec=2.2
just like Nelson found some test failures and fixed in the commit
4352c0ac04a6 ("RISC-V: Make sure rv32q conflict won't affect the zfa gas
testcases.").
csr-insns-pseudo-nozicntr.d
Specified the extension version (without any -misa-spec option)
to make sure that we test "no subset" behavior on 'I' >= version 2.1.
csr-version-{1p9p1,1p10,1p11,1p12}.d
Specified the extension versions to make sure that
we are working on the 'I' >= version 2.1 (also specified the version of
'Zicsr' but this is only for consistency).
march-imply-i2p0-01.d
'I' version 2.0 effectively imples 'Zicsr' and 'Zifencei' but should not
be reflected to the expanded architectural string because features of
'Zicsr' and 'Zifencei' are parts of 'I' version 2.0.
This change make sures that we removed the dependency to -misa-spec
option and the behavior only depends on the version of 'I'
(despite that -misa-spec=20191213).
march-ok-reorder.d
Use 'I' version 2.1. To test ordering of 'Zi*' extensions, PATCH v2
specifies "zifencei_zicsr" (intentionally reverse of the canonical
order) to make sure that the expanded architectural string has
"zicsr2p0_zifencei2p0".
It also fixes a minor grammar error on the commit message.
Thanks,
Tsukasa
Tsukasa OI (1):
RISC-V: Add 'Zicntr' and 'Zihpm' support with compatibility measures
bfd/elfxx-riscv.c | 52 +++-
gas/config/tc-riscv.c | 25 ++
.../gas/riscv/csr-insns-pseudo-noalias.d | 2 +-
.../gas/riscv/csr-insns-pseudo-nozicntr.d | 37 +++
.../gas/riscv/csr-insns-pseudo-nozicntr.l | 7 +
.../gas/riscv/csr-insns-pseudo-zfinx.d | 2 +-
gas/testsuite/gas/riscv/csr-insns-pseudo.d | 2 +-
gas/testsuite/gas/riscv/csr-insns-pseudo.s | 3 +-
gas/testsuite/gas/riscv/csr-insns-read-only.d | 2 +-
gas/testsuite/gas/riscv/csr-version-1p10.d | 2 +-
gas/testsuite/gas/riscv/csr-version-1p10.l | 256 ++++++++++++++++++
gas/testsuite/gas/riscv/csr-version-1p11.d | 2 +-
gas/testsuite/gas/riscv/csr-version-1p11.l | 256 ++++++++++++++++++
gas/testsuite/gas/riscv/csr-version-1p12.d | 2 +-
gas/testsuite/gas/riscv/csr-version-1p12.l | 256 ++++++++++++++++++
gas/testsuite/gas/riscv/csr-version-1p9p1.d | 2 +-
gas/testsuite/gas/riscv/csr-version-1p9p1.l | 256 ++++++++++++++++++
gas/testsuite/gas/riscv/march-imply-i2p0-01.d | 2 +-
gas/testsuite/gas/riscv/march-ok-reorder.d | 4 +-
include/opcode/riscv-opc.h | 128 ++++-----
include/opcode/riscv.h | 1 +
opcodes/riscv-opc.c | 12 +-
22 files changed, 1224 insertions(+), 87 deletions(-)
create mode 100644 gas/testsuite/gas/riscv/csr-insns-pseudo-nozicntr.d
create mode 100644 gas/testsuite/gas/riscv/csr-insns-pseudo-nozicntr.l
base-commit: 0e17d3fc080f543d81e6c2520ba0bd8046ea3a95
--
2.42.0
next prev parent reply other threads:[~2023-10-21 2:17 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-08 3:17 [RFC PATCH 0/2] " Tsukasa OI
2023-08-08 3:17 ` [RFC PATCH 1/2] RISC-V: Base for complex extension implications Tsukasa OI
2023-08-08 3:17 ` [RFC PATCH 2/2] RISC-V: Add 'Zicntr' and 'Zihpm' support with compatibility measures Tsukasa OI
2023-10-19 7:57 ` [PING^1][RFC PATCH 0/2] " Tsukasa OI
2023-10-19 8:33 ` Nelson Chu
2023-10-20 2:52 ` Tsukasa OI
2023-10-21 0:45 ` [PATCH 0/1] " Tsukasa OI
2023-10-21 0:45 ` [PATCH 1/1] " Tsukasa OI
2023-10-21 2:17 ` Tsukasa OI [this message]
2023-10-21 2:17 ` [PATCH v2 " 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.1697854636.git.research_trasio@irq.a4lg.com \
--to=research_trasio@irq.a4lg.com \
--cc=andrew@sifive.com \
--cc=binutils@sourceware.org \
--cc=jim.wilson.gcc@gmail.com \
--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).