[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v8 03/10] target/riscv/vector_helper.c: do vstart=0 after updatin
From: |
Daniel Henrique Barboza |
Subject: |
[PATCH v8 03/10] target/riscv/vector_helper.c: do vstart=0 after updating tail |
Date: |
Fri, 8 Mar 2024 18:53:43 -0300 |
vext_vv_rm_1() and vext_vv_rm_2() are setting vstart = 0 before their
respective callers (vext_vv_rm_2 and vext_vx_rm_2) update the tail
elements.
This is benign now, but we'll convert the tail updates to use
vext_set_tail_elems_1s(), and this function is sensitive to vstart
changes. Do vstart = 0 after vext_set_elems_1s() now to make the
conversion easier.
Signed-off-by: Daniel Henrique Barboza <dbarboza@ventanamicro.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 db1d3f77ce..544234c2d8 100644
--- a/target/riscv/vector_helper.c
+++ b/target/riscv/vector_helper.c
@@ -1927,7 +1927,6 @@ vext_vv_rm_1(void *vd, void *v0, void *vs1, void *vs2,
}
fn(vd, vs1, vs2, i, env, vxrm);
}
- env->vstart = 0;
}
static inline void
@@ -1962,6 +1961,7 @@ vext_vv_rm_2(void *vd, void *v0, void *vs1, void *vs2,
}
/* set tail elements to 1s */
vext_set_elems_1s(vd, vta, vl * esz, total_elems * esz);
+ env->vstart = 0;
}
/* generate helpers for fixed point instructions with OPIVV format */
@@ -2052,7 +2052,6 @@ vext_vx_rm_1(void *vd, void *v0, target_long s1, void
*vs2,
}
fn(vd, s1, vs2, i, env, vxrm);
}
- env->vstart = 0;
}
static inline void
@@ -2087,6 +2086,7 @@ vext_vx_rm_2(void *vd, void *v0, target_long s1, void
*vs2,
}
/* set tail elements to 1s */
vext_set_elems_1s(vd, vta, vl * esz, total_elems * esz);
+ env->vstart = 0;
}
/* generate helpers for fixed point instructions with OPIVX format */
--
2.43.2
- [PATCH v8 00/10] riscv: set vstart_eq_zero on mark_vs_dirty, Daniel Henrique Barboza, 2024/03/08
- [PATCH v8 02/10] target/riscv: handle vstart >= vl in vext_set_tail_elems_1s(), Daniel Henrique Barboza, 2024/03/08
- [PATCH v8 01/10] target/riscv/vector_helper.c: set vstart = 0 in GEN_VEXT_VSLIDEUP_VX(), Daniel Henrique Barboza, 2024/03/08
- [PATCH v8 03/10] target/riscv/vector_helper.c: do vstart=0 after updating tail,
Daniel Henrique Barboza <=
- [PATCH v8 04/10] target/riscv/vector_helper.c: update tail with vext_set_tail_elems_1s(), Daniel Henrique Barboza, 2024/03/08
- [PATCH v8 05/10] target/riscv: use vext_set_tail_elems_1s() in vcrypto insns, Daniel Henrique Barboza, 2024/03/08
- [PATCH v8 06/10] trans_rvv.c.inc: set vstart = 0 in int scalar move insns, Daniel Henrique Barboza, 2024/03/08
- [PATCH v8 07/10] target/riscv: remove 'over' brconds from vector trans, Daniel Henrique Barboza, 2024/03/08
- [PATCH v8 08/10] trans_rvv.c.inc: remove redundant mark_vs_dirty() calls, Daniel Henrique Barboza, 2024/03/08
- [PATCH v8 09/10] target/riscv: Clear vstart_qe_zero flag, Daniel Henrique Barboza, 2024/03/08
- [PATCH v8 10/10] target/riscv/vector_helper.c: optimize loops in ldst helpers, Daniel Henrique Barboza, 2024/03/08
- Re: [PATCH v8 00/10] riscv: set vstart_eq_zero on mark_vs_dirty, Richard Henderson, 2024/03/09