target/arm: Use TRANS_FEAT for do_ppz_fp
Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Message-id: 20220527181907.189259-98-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:
parent
7b9dfcfec8
commit
63d6aef86c
@ -3696,35 +3696,32 @@ TRANS_FEAT(FRSQRTE, aa64_sve, gen_gvec_fpst_arg_zz, frsqrte_fns[a->esz], a, 0)
|
||||
*** SVE Floating Point Compare with Zero Group
|
||||
*/
|
||||
|
||||
static void do_ppz_fp(DisasContext *s, arg_rpr_esz *a,
|
||||
static bool do_ppz_fp(DisasContext *s, arg_rpr_esz *a,
|
||||
gen_helper_gvec_3_ptr *fn)
|
||||
{
|
||||
unsigned vsz = vec_full_reg_size(s);
|
||||
TCGv_ptr status = fpstatus_ptr(a->esz == MO_16 ? FPST_FPCR_F16 : FPST_FPCR);
|
||||
if (fn == NULL) {
|
||||
return false;
|
||||
}
|
||||
if (sve_access_check(s)) {
|
||||
unsigned vsz = vec_full_reg_size(s);
|
||||
TCGv_ptr status =
|
||||
fpstatus_ptr(a->esz == MO_16 ? FPST_FPCR_F16 : FPST_FPCR);
|
||||
|
||||
tcg_gen_gvec_3_ptr(pred_full_reg_offset(s, a->rd),
|
||||
vec_full_reg_offset(s, a->rn),
|
||||
pred_full_reg_offset(s, a->pg),
|
||||
status, vsz, vsz, 0, fn);
|
||||
tcg_temp_free_ptr(status);
|
||||
tcg_gen_gvec_3_ptr(pred_full_reg_offset(s, a->rd),
|
||||
vec_full_reg_offset(s, a->rn),
|
||||
pred_full_reg_offset(s, a->pg),
|
||||
status, vsz, vsz, 0, fn);
|
||||
tcg_temp_free_ptr(status);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
#define DO_PPZ(NAME, name) \
|
||||
static bool trans_##NAME(DisasContext *s, arg_rpr_esz *a) \
|
||||
{ \
|
||||
static gen_helper_gvec_3_ptr * const fns[3] = { \
|
||||
gen_helper_sve_##name##_h, \
|
||||
gen_helper_sve_##name##_s, \
|
||||
gen_helper_sve_##name##_d, \
|
||||
static gen_helper_gvec_3_ptr * const name##_fns[] = { \
|
||||
NULL, gen_helper_sve_##name##_h, \
|
||||
gen_helper_sve_##name##_s, gen_helper_sve_##name##_d, \
|
||||
}; \
|
||||
if (a->esz == 0) { \
|
||||
return false; \
|
||||
} \
|
||||
if (sve_access_check(s)) { \
|
||||
do_ppz_fp(s, a, fns[a->esz - 1]); \
|
||||
} \
|
||||
return true; \
|
||||
}
|
||||
TRANS_FEAT(NAME, aa64_sve, do_ppz_fp, a, name##_fns[a->esz])
|
||||
|
||||
DO_PPZ(FCMGE_ppz0, fcmge0)
|
||||
DO_PPZ(FCMGT_ppz0, fcmgt0)
|
||||
|
Loading…
Reference in New Issue
Block a user