]> git.proxmox.com Git - mirror_qemu.git/commitdiff
target/riscv: The whole vector register move instructions depend on vsew
authorMax Chou <max.chou@sifive.com>
Wed, 29 Nov 2023 17:03:58 +0000 (01:03 +0800)
committerAlistair Francis <alistair.francis@wdc.com>
Wed, 10 Jan 2024 08:47:46 +0000 (18:47 +1000)
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>
Acked-by: Richard Henderson <richard.henderson@linaro.org>
Message-ID: <20231129170400.21251-3-max.chou@sifive.com>
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
target/riscv/insn_trans/trans_rvv.c.inc

index 114ad87397fbc5955e162e9a96f8e4c848da92f0..3871f0ea73d8d8dda0dd15f87f24030e7d06ead3 100644 (file)
@@ -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 {                                                        \