All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chao Liu <chao.liu@yeah.net>
To: richard.henderson@linaro.org, paolo.savini@embecosm.com,
	ebiggers@kernel.org, dbarboza@ventanamicro.com,
	palmer@dabbelt.com, alistair.francis@wdc.com,
	liwei1518@gmail.com, zhiwei_liu@linux.alibaba.com
Cc: qemu-riscv@nongnu.org, qemu-devel@nongnu.org,
	Chao Liu <chao.liu@yeah.net>
Subject: [PATCH v4 0/2] target/riscv: Generate strided vector ld/st with tcg
Date: Sat, 16 Aug 2025 16:56:34 +0800	[thread overview]
Message-ID: <cover.1755333616.git.chao.liu@yeah.net> (raw)

Hi all,

Thanks Richard for the review.

For patch v4, the main modification is to improve the implementation of the
get_log2() function.

+static inline uint32_t get_log2(uint32_t a)
+{
-    uint32_t i = 0;
-    if (a == 0) {
-        return i;
-    }
-    for (; a > 1;) {
-        a >>= 1;
-        i++;
-    } 
+    assert(is_power_of_2(a));
+    return ctz32(a);
+}

patch v3 changes:
- Fix the get_log2() function:
  https://lore.kernel.org/qemu-riscv/cover.1755287531.git.chao.liu@yeah.net/T/#t
- Add test for vlsseg8e32 instruction.
- Rebase on top of the latest master.

patch v2 changes:
- Split the TCG node emulation of the complex strided load/store operation into
  two separate functions to simplify the implementation:
  https://lore.kernel.org/qemu-riscv/20250312155547.289642-1-paolo.savini@embecosm.com/


Best regards,

Chao

Chao Liu (2):
  Generate strided vector loads/stores with tcg nodes.
  tests/tcg/riscv64: Add test for vlsseg8e32 instruction

 target/riscv/insn_trans/trans_rvv.c.inc   | 319 ++++++++++++++++++----
 tests/tcg/riscv64/Makefile.softmmu-target |   8 +-
 tests/tcg/riscv64/test-vlsseg8e32.S       | 107 ++++++++
 3 files changed, 382 insertions(+), 52 deletions(-)
 create mode 100644 tests/tcg/riscv64/test-vlsseg8e32.S

-- 
2.50.1



             reply	other threads:[~2025-08-16  8:58 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-16  8:56 Chao Liu [this message]
2025-08-16  8:56 ` [PATCH v4 1/2] target/riscv: Generate strided vector loads/stores with tcg nodes Chao Liu
2025-08-16  8:56 ` [PATCH v4 2/2] tests/tcg/riscv64: Add test for vlsseg8e32 instruction Chao Liu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=cover.1755333616.git.chao.liu@yeah.net \
    --to=chao.liu@yeah.net \
    --cc=alistair.francis@wdc.com \
    --cc=dbarboza@ventanamicro.com \
    --cc=ebiggers@kernel.org \
    --cc=liwei1518@gmail.com \
    --cc=palmer@dabbelt.com \
    --cc=paolo.savini@embecosm.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-riscv@nongnu.org \
    --cc=richard.henderson@linaro.org \
    --cc=zhiwei_liu@linux.alibaba.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.