qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [RFC v3 00/16] support subsets of bitmanip extension
@ 2021-01-12  2:19 frank.chang
  2021-01-12  2:19 ` [RFC v3 01/16] target/riscv: reformat @sh format encoding for B-extension frank.chang
                   ` (15 more replies)
  0 siblings, 16 replies; 24+ messages in thread
From: frank.chang @ 2021-01-12  2:19 UTC (permalink / raw)
  To: qemu-devel, qemu-riscv; +Cc: Frank Chang

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

This patchset implements RISC-V B-extension 0.93 version Zbb, Zbs and
Zba subset instructions. Some Zbp instructions are also implemented as
they have similar behavior with their Zbb-, Zbs- and Zba-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-v3

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

Changelog:

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 (4):
  target/riscv: rvb: count bits set
  target/riscv: add gen_shifti() and gen_shiftiw() helper functions
  target/riscv: rvb: generalized reverse
  target/riscv: rvb: generalized or-combine

Kito Cheng (12):
  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: single-bit 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          | 102 ++++++
 target/riscv/cpu.c                      |   4 +
 target/riscv/cpu.h                      |   2 +
 target/riscv/helper.h                   |   9 +
 target/riscv/insn32-64.decode           |  33 ++
 target/riscv/insn32.decode              |  54 ++-
 target/riscv/insn_trans/trans_rvb.c.inc | 415 ++++++++++++++++++++++++
 target/riscv/insn_trans/trans_rvi.c.inc |  45 +--
 target/riscv/meson.build                |   1 +
 target/riscv/translate.c                | 314 ++++++++++++++++++
 10 files changed, 932 insertions(+), 47 deletions(-)
 create mode 100644 target/riscv/bitmanip_helper.c
 create mode 100644 target/riscv/insn_trans/trans_rvb.c.inc

--
2.17.1



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

end of thread, other threads:[~2021-01-12  5:53 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-01-12  2:19 [RFC v3 00/16] support subsets of bitmanip extension frank.chang
2021-01-12  2:19 ` [RFC v3 01/16] target/riscv: reformat @sh format encoding for B-extension frank.chang
2021-01-12  2:19 ` [RFC v3 02/16] target/riscv: rvb: count leading/trailing zeros frank.chang
2021-01-12  2:19 ` [RFC v3 03/16] target/riscv: rvb: count bits set frank.chang
2021-01-12  2:19 ` [RFC v3 04/16] target/riscv: rvb: logic-with-negate frank.chang
2021-01-12  5:46   ` Richard Henderson
2021-01-12  2:19 ` [RFC v3 05/16] target/riscv: rvb: pack two words into one register frank.chang
2021-01-12  2:19 ` [RFC v3 06/16] target/riscv: rvb: min/max instructions frank.chang
2021-01-12  2:19 ` [RFC v3 07/16] target/riscv: rvb: sign-extend instructions frank.chang
2021-01-12  2:19 ` [RFC v3 08/16] target/riscv: add gen_shifti() and gen_shiftiw() helper functions frank.chang
2021-01-12  4:54   ` Richard Henderson
2021-01-12  5:27     ` Frank Chang
2021-01-12  2:19 ` [RFC v3 09/16] target/riscv: rvb: single-bit instructions frank.chang
2021-01-12  4:56   ` Richard Henderson
2021-01-12  2:19 ` [RFC v3 10/16] target/riscv: rvb: shift ones frank.chang
2021-01-12  2:19 ` [RFC v3 11/16] target/riscv: rvb: rotate (left/right) frank.chang
2021-01-12  5:45   ` Richard Henderson
2021-01-12  2:19 ` [RFC v3 12/16] target/riscv: rvb: generalized reverse frank.chang
2021-01-12  2:19 ` [RFC v3 13/16] target/riscv: rvb: generalized or-combine frank.chang
2021-01-12  5:47   ` Richard Henderson
2021-01-12  2:19 ` [RFC v3 14/16] target/riscv: rvb: address calculation frank.chang
2021-01-12  2:19 ` [RFC v3 15/16] target/riscv: rvb: add/shift with prefix zero-extend frank.chang
2021-01-12  2:19 ` [RFC v3 16/16] target/riscv: rvb: support and turn on B-extension from command line frank.chang
2021-01-12  5:47   ` Richard Henderson

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).