mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-14 21:52:18 -06:00
trans_rvv.c.inc: use vext_get_vlmax() in trans_vrgather_v*()
Use the helper instead of calculating vlmax by hand. Signed-off-by: Daniel Henrique Barboza <dbarboza@ventanamicro.com> Reviewed-by: Alistair Francis <alistair.francis@wdc.com> Message-ID: <20240122161107.26737-13-dbarboza@ventanamicro.com> Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
This commit is contained in:
parent
cd21576de6
commit
25669d275c
1 changed files with 2 additions and 4 deletions
|
@ -3535,8 +3535,7 @@ static bool trans_vrgather_vx(DisasContext *s, arg_rmrr *a)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (a->vm && s->vl_eq_vlmax && !(s->vta && s->lmul < 0)) {
|
if (a->vm && s->vl_eq_vlmax && !(s->vta && s->lmul < 0)) {
|
||||||
int scale = s->lmul - (s->sew + 3);
|
int vlmax = vext_get_vlmax(s->cfg_ptr->vlenb, s->sew, s->lmul);
|
||||||
int vlmax = s->cfg_ptr->vlen >> -scale;
|
|
||||||
TCGv_i64 dest = tcg_temp_new_i64();
|
TCGv_i64 dest = tcg_temp_new_i64();
|
||||||
|
|
||||||
if (a->rs1 == 0) {
|
if (a->rs1 == 0) {
|
||||||
|
@ -3566,8 +3565,7 @@ static bool trans_vrgather_vi(DisasContext *s, arg_rmrr *a)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (a->vm && s->vl_eq_vlmax && !(s->vta && s->lmul < 0)) {
|
if (a->vm && s->vl_eq_vlmax && !(s->vta && s->lmul < 0)) {
|
||||||
int scale = s->lmul - (s->sew + 3);
|
int vlmax = vext_get_vlmax(s->cfg_ptr->vlenb, s->sew, s->lmul);
|
||||||
int vlmax = s->cfg_ptr->vlen >> -scale;
|
|
||||||
if (a->rs1 >= vlmax) {
|
if (a->rs1 >= vlmax) {
|
||||||
tcg_gen_gvec_dup_imm(MO_64, vreg_ofs(s, a->rd),
|
tcg_gen_gvec_dup_imm(MO_64, vreg_ofs(s, a->rd),
|
||||||
MAXSZ(s), MAXSZ(s), 0);
|
MAXSZ(s), MAXSZ(s), 0);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue