From: Richard Henderson <richard.henderson@linaro.org>
To: Max Chou <max.chou@sifive.com>,
qemu-devel@nongnu.org, qemu-riscv@nongnu.org
Cc: Palmer Dabbelt <palmer@dabbelt.com>,
Alistair Francis <alistair.francis@wdc.com>,
Bin Meng <bin.meng@windriver.com>,
Weiwei Li <liwei1518@gmail.com>,
Daniel Henrique Barboza <dbarboza@ventanamicro.com>,
Liu Zhiwei <zhiwei_liu@linux.alibaba.com>,
Junqiang Wang <wangjunqiang@iscas.ac.cn>
Subject: Re: [PATCH 2/2] target/riscv: The whole vector register move instructions depend on vsew
Date: Wed, 29 Nov 2023 11:27:09 -0600 [thread overview]
Message-ID: <68a73d87-bb90-413d-ba48-e4bd62c61bd9@linaro.org> (raw)
In-Reply-To: <20231129170400.21251-3-max.chou@sifive.com>
On 11/29/23 11:03, Max Chou wrote:
> The RISC-V v spec 16.6 section says that the whole vector register move
> instructions operate as if EEW=SEW. So it should depends on the vsew
> field of vtype register.
>
> Signed-off-by: Max Chou <max.chou@sifive.com>
> ---
> target/riscv/insn_trans/trans_rvv.c.inc | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/target/riscv/insn_trans/trans_rvv.c.inc b/target/riscv/insn_trans/trans_rvv.c.inc
> index 114ad87397f..3871f0ea73d 100644
> --- a/target/riscv/insn_trans/trans_rvv.c.inc
> +++ b/target/riscv/insn_trans/trans_rvv.c.inc
> @@ -3643,8 +3643,7 @@ static bool trans_##NAME(DisasContext *s, arg_##NAME * a) \
> QEMU_IS_ALIGNED(a->rs2, LEN)) { \
> uint32_t maxsz = (s->cfg_ptr->vlen >> 3) * LEN; \
> if (s->vstart_eq_zero) { \
> - /* EEW = 8 */ \
> - tcg_gen_gvec_mov(MO_8, vreg_ofs(s, a->rd), \
> + tcg_gen_gvec_mov(s->sew, vreg_ofs(s, a->rd), \
> vreg_ofs(s, a->rs2), maxsz, maxsz); \
> mark_vs_dirty(s); \
> } else { \
This perhaps makes things clearer in the translator, but there is no difference in the tcg
code generation end. All logic operations (and, or, xor, mov...) ignore the element size.
Acked-by: Richard Henderson <richard.henderson@linaro.org>
r~
next prev parent reply other threads:[~2023-11-29 17:27 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-29 17:03 [PATCH 0/2] Make vector whole-register move (vmv) depend on vtype register Max Chou
2023-11-29 17:03 ` [PATCH 1/2] target/riscv: Add vill check for whole vector register move instructions Max Chou
2023-12-04 19:22 ` Daniel Henrique Barboza
2023-11-29 17:03 ` [PATCH 2/2] target/riscv: The whole vector register move instructions depend on vsew Max Chou
2023-11-29 17:27 ` Richard Henderson [this message]
2023-12-06 0:49 ` [PATCH 0/2] Make vector whole-register move (vmv) depend on vtype register Alistair Francis
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=68a73d87-bb90-413d-ba48-e4bd62c61bd9@linaro.org \
--to=richard.henderson@linaro.org \
--cc=alistair.francis@wdc.com \
--cc=bin.meng@windriver.com \
--cc=dbarboza@ventanamicro.com \
--cc=liwei1518@gmail.com \
--cc=max.chou@sifive.com \
--cc=palmer@dabbelt.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-riscv@nongnu.org \
--cc=wangjunqiang@iscas.ac.cn \
--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 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).