All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH qemu v10 00/14] Add tail agnostic behavior for rvv instructions
@ 2022-04-27 15:06 ` ~eopxd
  0 siblings, 0 replies; 42+ messages in thread
From: ~eopxd @ 2022-04-27 15:06 UTC (permalink / raw)
  To: qemu-devel, qemu-riscv
  Cc: WeiWei Li, Frank Chang, eop Chen, Bin Meng, Alistair Francis,
	Palmer Dabbelt

According to v-spec, tail agnostic behavior can be either kept as
undisturbed or set elements' bits to all 1s. To distinguish the
difference of tail policies, QEMU should be able to simulate the tail
agnostic behavior as "set tail elements' bits to all 1s". An option
'rvv_ta_all_1s' is added to enable the behavior, it is default as
disabled.

There are multiple possibility for agnostic elements according to
v-spec. The main intent of this patch-set tries to add option that
can distinguish between tail policies. Setting agnostic elements to
all 1s makes things simple and allow QEMU to express this.

We may explore other possibility of agnostic behavior by adding
other options in the future. Please understand that this patch-set
is limited.

v2 updates:
- Addressed comments from Weiwei Li
- Added commit tail agnostic on load / store instructions (which
  I forgot to include into the patch-set)

v3 updates:
- Missed the very 1st commit, adding it back

v4 updates:
- Renamed vlmax to total_elems
- Deal with tail element when vl_eq_vlmax == true

v5 updates:
- Let `vext_get_total_elems` take `desc` and `esz`
- Utilize `simd_maxsz(desc)` to get `vlenb`
- Fix alignments to code

v6 updates:
- Fix `vext_get_total_elems`

v7 updates:
- Reuse `max_elems` for vector load / store helper functions. The
  translation sets desc's `lmul` to `min(1, lmul)`, making
  `vext_max_elems` equivalent to `vext_get_total_elems`.

v8 updates:
- Simplify `vext_set_elems_1s`, don't need `vext_set_elems_1s_fns`
- Fix `vext_get_total_elems`, it should derive upon EMUL instead
  of LMUL

v9 updates:
- Let instructions that is tail agnostic regardless of vta respect the
  option and not the vta.

v10 updates:
- Correct range to set element to 1s for load instructions

eopXD (14):
  target/riscv: rvv: Prune redundant ESZ, DSZ parameter passed
  target/riscv: rvv: Rename ambiguous esz
  target/riscv: rvv: Early exit when vstart >= vl
  target/riscv: rvv: Add tail agnostic for vv instructions
  target/riscv: rvv: Add tail agnostic for vector load / store
    instructions
  target/riscv: rvv: Add tail agnostic for vx, vvm, vxm instructions
  target/riscv: rvv: Add tail agnostic for vector integer shift
    instructions
  target/riscv: rvv: Add tail agnostic for vector integer comparison
    instructions
  target/riscv: rvv: Add tail agnostic for vector integer merge and move
    instructions
  target/riscv: rvv: Add tail agnostic for vector fix-point arithmetic
    instructions
  target/riscv: rvv: Add tail agnostic for vector floating-point
    instructions
  target/riscv: rvv: Add tail agnostic for vector reduction instructions
  target/riscv: rvv: Add tail agnostic for vector mask instructions
  target/riscv: rvv: Add tail agnostic for vector permutation
    instructions

 target/riscv/cpu.c                      |    1 +
 target/riscv/cpu.h                      |    2 +
 target/riscv/cpu_helper.c               |    2 +
 target/riscv/insn_trans/trans_rvv.c.inc |  176 +++
 target/riscv/internals.h                |    6 +-
 target/riscv/translate.c                |    4 +
 target/riscv/vector_helper.c            | 1536 ++++++++++++++---------
 7 files changed, 1110 insertions(+), 617 deletions(-)

-- 
2.34.2


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

end of thread, other threads:[~2022-04-27 23:16 UTC | newest]

Thread overview: 42+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-27 15:06 [PATCH qemu v10 00/14] Add tail agnostic behavior for rvv instructions ~eopxd
2022-04-27 15:06 ` ~eopxd
2022-03-01  9:07 ` [PATCH qemu v10 04/14] target/riscv: rvv: Add tail agnostic for vv instructions ~eopxd
2022-04-27 15:06   ` ~eopxd
2022-04-27 23:11   ` Alistair Francis
2022-04-27 23:11     ` Alistair Francis
2022-04-27 23:13     ` Alistair Francis
2022-04-27 23:13       ` Alistair Francis
2022-04-27 23:14   ` Alistair Francis
2022-04-27 23:14     ` Alistair Francis
2022-03-07  7:10 ` [PATCH qemu v10 05/14] target/riscv: rvv: Add tail agnostic for vector load / store instructions ~eopxd
2022-04-27 15:06   ` ~eopxd
2022-03-07  7:32 ` [PATCH qemu v10 06/14] target/riscv: rvv: Add tail agnostic for vx, vvm, vxm instructions ~eopxd
2022-04-27 15:06   ` ~eopxd
2022-03-07  9:38 ` [PATCH qemu v10 07/14] target/riscv: rvv: Add tail agnostic for vector integer shift instructions ~eopxd
2022-04-27 15:06   ` ~eopxd
2022-03-07  9:43 ` [PATCH qemu v10 08/14] target/riscv: rvv: Add tail agnostic for vector integer comparison instructions ~eopxd
2022-04-27 15:06   ` ~eopxd
2022-03-07  9:53 ` [PATCH qemu v10 09/14] target/riscv: rvv: Add tail agnostic for vector integer merge and move instructions ~eopxd
2022-04-27 15:06   ` ~eopxd
2022-03-07 10:04 ` [PATCH qemu v10 10/14] target/riscv: rvv: Add tail agnostic for vector fix-point arithmetic instructions ~eopxd
2022-04-27 15:06   ` ~eopxd
2022-03-07 10:05 ` [PATCH qemu v10 11/14] target/riscv: rvv: Add tail agnostic for vector floating-point instructions ~eopxd
2022-04-27 15:07   ` ~eopxd
2022-03-07 12:21 ` [PATCH qemu v10 12/14] target/riscv: rvv: Add tail agnostic for vector reduction instructions ~eopxd
2022-04-27 15:06   ` ~eopxd
2022-03-07 15:26 ` [PATCH qemu v10 13/14] target/riscv: rvv: Add tail agnostic for vector mask instructions ~eopxd
2022-04-27 15:06   ` ~eopxd
2022-03-07 15:59 ` [PATCH qemu v10 14/14] target/riscv: rvv: Add tail agnostic for vector permutation instructions ~eopxd
2022-04-27 15:07   ` ~eopxd
2022-03-09  8:34 ` [PATCH qemu v10 02/14] target/riscv: rvv: Rename ambiguous esz ~eopxd
2022-04-27 15:06   ` ~eopxd
2022-04-27 23:00   ` Alistair Francis
2022-04-27 23:00     ` Alistair Francis
2022-03-12  6:28 ` [PATCH qemu v10 03/14] target/riscv: rvv: Early exit when vstart >= vl ~eopxd
2022-04-27 15:06   ` ~eopxd
2022-04-27 23:02   ` Alistair Francis
2022-04-27 23:02     ` Alistair Francis
2022-03-14  7:38 ` [PATCH qemu v10 01/14] target/riscv: rvv: Prune redundant ESZ, DSZ parameter passed ~eopxd
2022-04-27 15:06   ` ~eopxd
2022-04-27 22:59   ` Alistair Francis
2022-04-27 22:59     ` Alistair Francis

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.