diff options
author | Yueh-Ting (eop) Chen <eop.chen@sifive.com> | 2022-06-20 06:50:58 +0000 |
---|---|---|
committer | Alistair Francis <alistair.francis@wdc.com> | 2022-09-07 09:18:33 +0200 |
commit | bce9a636beabbb2c538cdfca49592b04bfbf7e2c (patch) | |
tree | e715d65cb3b25a37b3576e423badd0129e8d2035 /target/riscv/vector_helper.c | |
parent | 265ecd4c62a008f3be351a75e1847cee9c71e380 (diff) |
target/riscv: rvv: Add mask agnostic for vx instructions
Signed-off-by: eop Chen <eop.chen@sifive.com>
Reviewed-by: Frank Chang <frank.chang@sifive.com>
Reviewed-by: Weiwei Li <liweiwei@iscas.ac.cn>
Acked-by: Alistair Francis <alistair.francis@wdc.com>
Message-Id: <165570784143.17634.35095816584573691-3@git.sr.ht>
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
Diffstat (limited to 'target/riscv/vector_helper.c')
-rw-r--r-- | target/riscv/vector_helper.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/target/riscv/vector_helper.c b/target/riscv/vector_helper.c index e3810d2bc3..6be3c4e739 100644 --- a/target/riscv/vector_helper.c +++ b/target/riscv/vector_helper.c @@ -899,10 +899,13 @@ static void do_vext_vx(void *vd, void *v0, target_long s1, void *vs2, uint32_t vl = env->vl; uint32_t total_elems = vext_get_total_elems(env, desc, esz); uint32_t vta = vext_vta(desc); + uint32_t vma = vext_vma(desc); uint32_t i; for (i = env->vstart; i < vl; i++) { if (!vm && !vext_elem_mask(v0, i)) { + /* set masked-off elements to 1s */ + vext_set_elems_1s(vd, vma, i * esz, (i + 1) * esz); continue; } fn(vd, s1, vs2, i); |