target/arm: Use TRANS_FEAT for do_index

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20220527181907.189259-50-richard.henderson@linaro.org
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
Richard Henderson 2022-05-27 11:18:02 -07:00 committed by Peter Maydell
parent 6687d05dc3
commit 9aa60c83ea

View File

@ -1126,33 +1126,14 @@ static bool do_index(DisasContext *s, int esz, int rd,
return true; return true;
} }
static bool trans_INDEX_ii(DisasContext *s, arg_INDEX_ii *a) TRANS_FEAT(INDEX_ii, aa64_sve, do_index, a->esz, a->rd,
{ tcg_constant_i64(a->imm1), tcg_constant_i64(a->imm2))
TCGv_i64 start = tcg_constant_i64(a->imm1); TRANS_FEAT(INDEX_ir, aa64_sve, do_index, a->esz, a->rd,
TCGv_i64 incr = tcg_constant_i64(a->imm2); tcg_constant_i64(a->imm), cpu_reg(s, a->rm))
return do_index(s, a->esz, a->rd, start, incr); TRANS_FEAT(INDEX_ri, aa64_sve, do_index, a->esz, a->rd,
} cpu_reg(s, a->rn), tcg_constant_i64(a->imm))
TRANS_FEAT(INDEX_rr, aa64_sve, do_index, a->esz, a->rd,
static bool trans_INDEX_ir(DisasContext *s, arg_INDEX_ir *a) cpu_reg(s, a->rn), cpu_reg(s, a->rm))
{
TCGv_i64 start = tcg_constant_i64(a->imm);
TCGv_i64 incr = cpu_reg(s, a->rm);
return do_index(s, a->esz, a->rd, start, incr);
}
static bool trans_INDEX_ri(DisasContext *s, arg_INDEX_ri *a)
{
TCGv_i64 start = cpu_reg(s, a->rn);
TCGv_i64 incr = tcg_constant_i64(a->imm);
return do_index(s, a->esz, a->rd, start, incr);
}
static bool trans_INDEX_rr(DisasContext *s, arg_INDEX_rr *a)
{
TCGv_i64 start = cpu_reg(s, a->rn);
TCGv_i64 incr = cpu_reg(s, a->rm);
return do_index(s, a->esz, a->rd, start, incr);
}
/* /*
*** SVE Stack Allocation Group *** SVE Stack Allocation Group