qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH RESEND 0/6] Introduce extension implied rules
@ 2024-06-05  6:31 frank.chang
  2024-06-05  6:31 ` [PATCH RESEND 1/6] target/riscv: Introduce extension implied rules definition frank.chang
                   ` (6 more replies)
  0 siblings, 7 replies; 13+ messages in thread
From: frank.chang @ 2024-06-05  6:31 UTC (permalink / raw)
  To: qemu-devel
  Cc: Palmer Dabbelt, Alistair Francis, Bin Meng, Weiwei Li,
	Daniel Henrique Barboza, Liu Zhiwei, open list:RISC-V TCG CPUs,
	Frank Chang

From: Frank Chang <frank.chang@sifive.com>

Currently, the implied extensions are enabled and checked in
riscv_cpu_validate_set_extensions(). However, the order of enabling the
implied extensions must follow a strict sequence, which is error-prone.

This patchset introduce extension implied rule helpers to enable the
implied extensions. This also eliminates the old-fashioned ordering
requirement. For example, Zvksg implies Zvks, Zvks implies Zvksed, etc.,
removing the need to check the implied rules of Zvksg before Zvks.

The idea [1] and the implied rules [2] are referenced from LLVM.

[1] https://github.com/llvm/llvm-project/blob/main/llvm/lib/TargetParser/RISCVISAInfo.cpp#L875
[2] https://github.com/llvm/llvm-project/blob/main/llvm/lib/Target/RISCV/RISCVFeatures.td

Frank Chang (6):
  target/riscv: Introduce extension implied rules definition
  target/riscv: Introduce extension implied rule helpers
  target/riscv: Add MISA implied rules
  target/riscv: Add standard extension implied rules
  target/riscv: Add Zc extension implied rule
  target/riscv: Remove extension auto-update check statements

 target/riscv/cpu.c         | 396 +++++++++++++++++++++++++++++++++++++
 target/riscv/cpu.h         |  18 ++
 target/riscv/tcg/tcg-cpu.c | 238 +++++++++++-----------
 3 files changed, 537 insertions(+), 115 deletions(-)

--
2.43.2



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

end of thread, other threads:[~2024-06-12  1:22 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-05  6:31 [PATCH RESEND 0/6] Introduce extension implied rules frank.chang
2024-06-05  6:31 ` [PATCH RESEND 1/6] target/riscv: Introduce extension implied rules definition frank.chang
2024-06-11  1:35   ` Alistair Francis
2024-06-11  1:56     ` Frank Chang
2024-06-05  6:31 ` [PATCH RESEND 2/6] target/riscv: Introduce extension implied rule helpers frank.chang
2024-06-12  1:21   ` Frank Chang
2024-06-05  6:31 ` [PATCH RESEND 3/6] target/riscv: Add MISA implied rules frank.chang
2024-06-11  1:41   ` Alistair Francis
2024-06-05  6:31 ` [PATCH RESEND 4/6] target/riscv: Add standard extension " frank.chang
2024-06-11  1:45   ` Alistair Francis
2024-06-05  6:31 ` [PATCH RESEND 5/6] target/riscv: Add Zc extension implied rule frank.chang
2024-06-05  6:31 ` [PATCH RESEND 6/6] target/riscv: Remove extension auto-update check statements frank.chang
2024-06-05  7:48 ` [PATCH RESEND 0/6] Introduce extension implied rules Jerry Zhang Jian

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 NNTP newsgroup(s).