Message ID | 0b9e98cf4003198bda24ac56e128e4393682963e.1734424581.git.lc00631@tecorigin.com (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | [v1,1/1] target/riscv: Fix handling of NOP for vstart >= vl in vext_vx_rm_2() | expand |
On Tue, Dec 17, 2024 at 6:46 PM Chao Liu <lc00631@tecorigin.com> wrote: > > fix: https://lore.kernel.org/all/20240322085319.1758843-8-alistair.francis@wdc.com/ 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" > Signed-off-by: Chao Liu <lc00631@tecorigin.com> > --- > target/riscv/vector_helper.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/target/riscv/vector_helper.c b/target/riscv/vector_helper.c > index a85dd1d200..54bac5922a 100644 > --- a/target/riscv/vector_helper.c > +++ b/target/riscv/vector_helper.c > @@ -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 > >
diff --git a/target/riscv/vector_helper.c b/target/riscv/vector_helper.c index a85dd1d200..54bac5922a 100644 --- a/target/riscv/vector_helper.c +++ b/target/riscv/vector_helper.c @@ -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,
fix: https://lore.kernel.org/all/20240322085319.1758843-8-alistair.francis@wdc.com/ Signed-off-by: Chao Liu <lc00631@tecorigin.com> --- target/riscv/vector_helper.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)