From: WX Chen <wxchen0913@gmail.com>
To: Richard Henderson <richard.henderson@linaro.org>
Cc: qemu-devel@nongnu.org, qemu-riscv@nongnu.org, wxchen0913@gmail.com
Subject: Re: [PATCH v3] target/riscv: use gen_goto_tb for vsetvli
Date: Sat, 14 Nov 2026 15:58:02 +0800 [thread overview]
Message-ID: <20261114075803.58854-1-wxchen0913@gmail.com> (raw)
In-Reply-To: <e54b27f6-7130-475c-b2b6-b7a477de48b3@linaro.org>
> Did you mean TCG_COND_GEU? Surely dst very large results in vlmax.
Hi Richard,
Thanks for the review!
I think TCG_COND_NE is correct here. The `dst` value actually comes
from the previous `gen_helper_vsetvl(dst, tcg_env, ...);` call.
According to the definition of the `vsetvli` instruction, it will
set vl CSR and copy its value to a dst reg. The value of `vl` is determined
by the relationship between AVL and VLMAX:
AVL <= VLMAX:
VL = AVL
AVL < (2 * VLMAX):
ceil(AVL / 2) ≤ VL ≤ VLMAX
Otherwise:
VL = VLMAX
So, `dst` here is either equal to VLMAX or smaller than it.
That's why TCG_COND_NE is used here.
Thanks,
Chen
next prev parent reply other threads:[~2026-11-14 7:59 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-11 13:40 [PATCH v3] target/riscv: use gen_goto_tb for vsetvli WX Chen
2026-11-13 18:18 ` Richard Henderson
2026-11-14 7:58 ` WX Chen [this message]
2026-11-14 15:16 ` Richard Henderson
2026-11-23 6:40 ` WX Chen
2026-11-24 20:32 ` Daniel Henrique Barboza
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=20261114075803.58854-1-wxchen0913@gmail.com \
--to=wxchen0913@gmail.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-riscv@nongnu.org \
--cc=richard.henderson@linaro.org \
/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.