target/riscv: Fix handling of NOP for vstart >= vl in vext_vx_rm_2()
A message that is not in the archive (sent off-list or not yet received): [email protected]
PATCH 1/1 target/riscv: Fix handling of NOP for vstart >= vl in vext_vx_rm_2()
fix: https://lore.kernel.org/all/[email protected]/
Signed-off-by Chao Liu <[email protected]>
--- target/riscv/vector_helper.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
target/riscv/vector_helper.c +2 -2
@@ -2154,8 +2154,6 @@ vext_vv_rm_1(void *vd, void *v0, void *vs1, void *vs2, uint32_t vl, uint32_t vm, int vxrm, opivv2_rm_fn *fn, uint32_t vma, uint32_t esz) { -VSTART_CHECK_EARLY_EXIT (env ); - for (uint32_t i = env->vstart; i < vl; i++) {if (!vm && !vext_elem_mask (v0, i)) {/* set masked-off elements to 1s */
@@ -2179,6 +2177,8 @@ vext_vv_rm_2(void *vd, void *v0, void *vs1, void *vs2,uint32_t vta =vext_vta (desc);uint32_t vma =vext_vma (desc); +VSTART_CHECK_EARLY_EXIT (env); +switch (env->vxrm) {case 0 :/* rnu */ vext_vv_rm_1(vd, v0, vs1, vs2,
Signature · 1 line
2.47.1
Quoted 2 lines · Chao Liu
Can you include a commit message of what this fixes?
Instead of linking to the pull request there should be a fixes tag here, like this
Fixes df4252b2ecaf "target/riscv/vector_helpers: do early exit when
vstart >= vl"
Quoted 31 lines
Signed-off-by Chao Liu <[email protected]>--- target/riscv/vector_helper.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)target/riscv/vector_helper.c +2
-3@@ -2154,8 +2154,6 @@ vext_vv_rm_1(void *vd, void *v0, void *vs1, void *vs2, uint32_t vl, uint32_t vm, int vxrm, opivv2_rm_fn *fn, uint32_t vma, uint32_t esz) { -VSTART_CHECK_EARLY_EXIT (env ); - for (uint32_t i = env->vstart; i < vl; i++) {if (!vm && !vext_elem_mask (v0, i)) {/* set masked-off elements to 1s */ @@ -2179,6 +2177,8 @@ vext_vv_rm_2(void *vd, void *v0, void *vs1, void *vs2,uint32_t vta =vext_vta (desc);uint32_t vma =vext_vma (desc); +VSTART_CHECK_EARLY_EXIT (env); +switch (env->vxrm) {case 0 :/* rnu */ vext_vv_rm_1(vd, v0, vs1, vs2, --2.47.1