Skip to content

support subsets of bitmanip extension

[email protected] qemu-devel qemu-riscv 6 versions – Applied

Status from this message: Applied to riscv-to-apply.next

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v6 Latest17 patches 7 repliesApplied
  2. v517 patches 7 repliesSuperseded
  3. v4 RFC16 patches 2 repliesSuperseded
Earlier versions · 3
VersionPostedPatchesRepliesStatus
v3 RFC16 patches7 repliesSuperseded
v2 RFC15 patches16 repliesSuperseded
v1 RFC15 patches24 repliesSuperseded

Changes in v6 from the cover letter

* rebase riscv-to-apply.next branch.
* remove all #ifdef TARGET_RISCV64 macros.

Patches in v6 Applied

#Subject and filesSizeRepliesApplied
1/17target/riscv: reformat @sh format encoding for B-extensiontarget/riscv/insn32.decode+5 -50 replies
2/17target/riscv: rvb: count leading/trailing zerostarget/riscv/cpu.h target/riscv/insn32.decode target/riscv/insn_trans/trans_rvb.c.inc +1 more+93 -11 reply
3/17target/riscv: rvb: count bits settarget/riscv/insn32.decode target/riscv/insn_trans/trans_rvb.c.inc target/riscv/translate.c+21 -00 replies
4/17target/riscv: rvb: logic-with-negatetarget/riscv/insn32.decode target/riscv/insn_trans/trans_rvb.c.inc+21 -00 replies
5/17target/riscv: rvb: pack two words into one registertarget/riscv/insn32.decode target/riscv/insn_trans/trans_rvb.c.inc target/riscv/translate.c+78 -00 replies
6/17target/riscv: rvb: min/max instructionstarget/riscv/insn32.decode target/riscv/insn_trans/trans_rvb.c.inc+28 -00 replies
7/17target/riscv: rvb: sign-extend instructionstarget/riscv/insn32.decode target/riscv/insn_trans/trans_rvb.c.inc+15 -00 replies
8/17target/riscv: add gen_shifti() and gen_shiftiw() helper functionstarget/riscv/insn_trans/trans_rvi.c.inc target/riscv/translate.c+43 -501 reply
9/17target/riscv: rvb: single-bit instructionstarget/riscv/insn32.decode target/riscv/insn_trans/trans_rvb.c.inc target/riscv/translate.c+175 -01 reply
10/17target/riscv: rvb: shift onestarget/riscv/insn32.decode target/riscv/insn_trans/trans_rvb.c.inc target/riscv/translate.c+74 -01 reply
11/17target/riscv: rvb: rotate (left/right)target/riscv/insn32.decode target/riscv/insn_trans/trans_rvb.c.inc target/riscv/translate.c+81 -01 reply
12/17target/riscv: rvb: generalized reversetarget/riscv/bitmanip_helper.c target/riscv/helper.h target/riscv/insn32.decode +3 more+132 -00 replies
13/17target/riscv: rvb: generalized or-combinetarget/riscv/bitmanip_helper.c target/riscv/helper.h target/riscv/insn32.decode +2 more+64 -00 replies
14/17target/riscv: rvb: address calculationtarget/riscv/insn32.decode target/riscv/insn_trans/trans_rvb.c.inc target/riscv/translate.c+62 -00 replies
15/17target/riscv: rvb: add/shift with prefix zero-extendtarget/riscv/insn32.decode target/riscv/insn_trans/trans_rvb.c.inc target/riscv/translate.c+35 -00 replies
16/17target/riscv: rvb: support and turn on B-extension from command linetarget/riscv/cpu.c target/riscv/cpu.h+5 -00 replies
17/17target/riscv: rvb: add b-ext version cpu optiontarget/riscv/cpu.c target/riscv/cpu.h+26 -01 reply

Reviews trailers per patch

All 17 patches have a Reviewed-by or Acked-by.

PatchRichard HendersonAlistair Francis
1/17R-b R-b
2/17R-b R-b
3/17R-b R-b
4/17R-b R-b
5/17R-b R-b
6/17R-b R-b
7/17R-b R-b
8/17R-b R-b
9/17R-b R-b
10/17R-b R-b
11/17R-b R-b
12/17R-b
13/17R-b
14/17R-b
15/17R-b
16/17R-b R-b
17/17R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v6 thread

Cover letter [PATCH v6 00/17] support subsets of bitmanip extension

From: Frank Chang <[email protected]>

This patchset implements RISC-V B-extension v0.93 version Zba, Zbb and Zbs subset instructions. Some Zbp instructions are also implemented as they have similar behavior with their Zba-, Zbb- and Zbs-family instructions or for Zbb pseudo instructions (e.g. rev8, orc.b).

Specification:
https://github.com/riscv/riscv-bitmanip/blob/master/bitmanip-0.93.pdf

The port is available here:
https://github.com/sifive/qemu/tree/rvb-upstream-v6

To test rvb implementation, specify cpu argument with 'x-b=true' or 'x-b=true,bext_spec=v0.93'to enable B-extension support.

Changelog:

v6:
* rebase riscv-to-apply.next branch.
* remove all #ifdef TARGET_RISCV64 macros.

v5:
* add bext_spec cpu option, default set to v0.93.
* rebase master branch.

v4:
* Remove 'rd != 0' checks from immediate shift instructions.

v3:
* Convert existing immediate shift instructions to use gen_shifti() and gen_shiftiw() interfaces.
* Rename *u.w instructions to *.uw.
* Rename sb* instructions to b*.
* Rename pcnt* instructions to cpop*.

v2:
* Add gen_shifti(), gen_shiftw(), gen_shiftiw() helper functions.
* Remove addwu, subwu and addiwu instructions as they are not longer exist in latest draft.
* Optimize implementation with cleaner tcg ops.

Frank Chang (6):
target/riscv: rvb: count bits set
target/riscv: add gen_shifti() and gen_shiftiw() helper functions target/riscv: rvb: single-bit instructions target/riscv: rvb: generalized reverse
target/riscv: rvb: generalized or-combine target/riscv: rvb: add b-ext version cpu option

Kito Cheng (11):
target/riscv: reformat @sh format encoding for B-extension target/riscv: rvb: count leading/trailing zeros target/riscv: rvb: logic-with-negate
target/riscv: rvb: pack two words into one register target/riscv: rvb: min/max instructions
target/riscv: rvb: sign-extend instructions
target/riscv: rvb: shift ones
target/riscv: rvb: rotate (left/right)
target/riscv: rvb: address calculation
target/riscv: rvb: add/shift with prefix zero-extend target/riscv: rvb: support and turn on B-extension from command line

 target/riscv/bitmanip_helper.c          |  90 +++++
 target/riscv/cpu.c                      |  27 ++
 target/riscv/cpu.h                      |   5 +
 target/riscv/helper.h                   |   6 +
 target/riscv/insn32.decode              |  87 ++++-
 target/riscv/insn_trans/trans_rvb.c.inc | 438 ++++++++++++++++++++++++
 target/riscv/insn_trans/trans_rvi.c.inc |  54 +--
 target/riscv/meson.build                |   1 +
 target/riscv/translate.c                | 306 +++++++++++++++++
 9 files changed, 958 insertions(+), 56 deletions(-)
 create mode 100644 target/riscv/bitmanip_helper.c
 create mode 100644 target/riscv/insn_trans/trans_rvb.c.inc

--
2.17.1