qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 00/12] target/riscv: add 'cpu->cfg.vlenb', remove 'cpu->cfg.vlen'
@ 2024-01-15 22:25 Daniel Henrique Barboza
  2024-01-15 22:25 ` [PATCH v2 01/12] target/riscv: add 'vlenb' field in cpu->cfg Daniel Henrique Barboza
                   ` (11 more replies)
  0 siblings, 12 replies; 27+ messages in thread
From: Daniel Henrique Barboza @ 2024-01-15 22:25 UTC (permalink / raw)
  To: qemu-devel
  Cc: qemu-riscv, alistair.francis, bmeng, liwei1518, zhiwei_liu,
	palmer, richard.henderson, max.chou, Daniel Henrique Barboza

Hi,

This v2 contains changes proposed after the review from Richard. Most
notable change is in patch 11, where we simplified our lives a bit and
just calculated 'vlmax' using 'vlenb' instead of trying to use the TCG
global 'cpu_vl'.

Patch 10 also changed a bit to avoid the negative shift we were doing in
v1.


Changes from v1:
- patch 8:
  - instead of shifting sew, adjust the amount of shift rights to use 'vlenb'
- patch 9:
  - adjust the shifts rights to use 'vlenb' instead of shifting 'vlenb' left beforehand
- patch 10:
  - calc 'max_sz' before doing shift rights to retrieve MAX_SZ()
- patches 11 and 12:
  - squashed together
  - calc 'vlmax' using the same logic from patch 9 in both functions
- v1 link: https://lore.kernel.org/qemu-riscv/20240112213812.173521-1-dbarboza@ventanamicro.com/


Daniel Henrique Barboza (12):
  target/riscv: add 'vlenb' field in cpu->cfg
  target/riscv/csr.c: use 'vlenb' instead of 'vlen'
  target/riscv/gdbstub.c: use 'vlenb' instead of shifting 'vlen'
  target/riscv/insn_trans/trans_rvbf16.c.inc: use cpu->cfg.vlenb
  target/riscv/insn_trans/trans_rvv.c.inc: use 'vlenb'
  target/riscv/insn_trans/trans_rvvk.c.inc: use 'vlenb'
  target/riscv/vector_helper.c: use 'vlenb'
  target/riscv/vector_helper.c: use vlenb in HELPER(vsetvl)
  target/riscv/cpu.h: use 'vlenb' in vext_get_vlmax()
  target/riscv/insn_trans/trans_rvv.c.inc: use 'vlenb' in MAXSZ()
  trans_rvv.c.inc: use 'vlenb' to calc vlmax in trans_vrgather_v*()
  target/riscv/cpu.c: remove cpu->cfg.vlen

 target/riscv/cpu.c                         |  12 +-
 target/riscv/cpu.h                         |   6 +-
 target/riscv/cpu_cfg.h                     |   2 +-
 target/riscv/csr.c                         |   4 +-
 target/riscv/gdbstub.c                     |   6 +-
 target/riscv/insn_trans/trans_rvbf16.c.inc |  12 +-
 target/riscv/insn_trans/trans_rvv.c.inc    | 152 ++++++++++-----------
 target/riscv/insn_trans/trans_rvvk.c.inc   |  16 +--
 target/riscv/tcg/tcg-cpu.c                 |   4 +-
 target/riscv/vector_helper.c               |  26 ++--
 10 files changed, 124 insertions(+), 116 deletions(-)

-- 
2.43.0



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

end of thread, other threads:[~2024-01-16 20:46 UTC | newest]

Thread overview: 27+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-01-15 22:25 [PATCH v2 00/12] target/riscv: add 'cpu->cfg.vlenb', remove 'cpu->cfg.vlen' Daniel Henrique Barboza
2024-01-15 22:25 ` [PATCH v2 01/12] target/riscv: add 'vlenb' field in cpu->cfg Daniel Henrique Barboza
2024-01-15 22:33   ` Richard Henderson
2024-01-15 22:25 ` [PATCH v2 02/12] target/riscv/csr.c: use 'vlenb' instead of 'vlen' Daniel Henrique Barboza
2024-01-15 22:39   ` Richard Henderson
2024-01-15 22:25 ` [PATCH v2 03/12] target/riscv/gdbstub.c: use 'vlenb' instead of shifting 'vlen' Daniel Henrique Barboza
2024-01-15 22:39   ` Richard Henderson
2024-01-15 22:25 ` [PATCH v2 04/12] target/riscv/insn_trans/trans_rvbf16.c.inc: use cpu->cfg.vlenb Daniel Henrique Barboza
2024-01-15 22:40   ` Richard Henderson
2024-01-15 22:25 ` [PATCH v2 05/12] target/riscv/insn_trans/trans_rvv.c.inc: use 'vlenb' Daniel Henrique Barboza
2024-01-15 22:45   ` Richard Henderson
2024-01-15 22:25 ` [PATCH v2 06/12] target/riscv/insn_trans/trans_rvvk.c.inc: " Daniel Henrique Barboza
2024-01-15 22:47   ` Richard Henderson
2024-01-15 22:25 ` [PATCH v2 07/12] target/riscv/vector_helper.c: " Daniel Henrique Barboza
2024-01-15 22:48   ` Richard Henderson
2024-01-15 22:25 ` [PATCH v2 08/12] target/riscv/vector_helper.c: use vlenb in HELPER(vsetvl) Daniel Henrique Barboza
2024-01-15 22:57   ` Richard Henderson
2024-01-16 20:45     ` Daniel Henrique Barboza
2024-01-15 22:25 ` [PATCH v2 09/12] target/riscv/cpu.h: use 'vlenb' in vext_get_vlmax() Daniel Henrique Barboza
2024-01-15 22:58   ` Richard Henderson
2024-01-15 23:14   ` Richard Henderson
2024-01-16 17:52     ` Daniel Henrique Barboza
2024-01-15 22:25 ` [PATCH v2 10/12] target/riscv/insn_trans/trans_rvv.c.inc: use 'vlenb' in MAXSZ() Daniel Henrique Barboza
2024-01-15 23:02   ` Richard Henderson
2024-01-15 22:25 ` [PATCH v2 11/12] trans_rvv.c.inc: use 'vlenb' to calc vlmax in trans_vrgather_v*() Daniel Henrique Barboza
2024-01-15 22:25 ` [PATCH v2 12/12] target/riscv/cpu.c: remove cpu->cfg.vlen Daniel Henrique Barboza
2024-01-15 23:15   ` 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).