[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 095/114] target/arm: Use TRANS_FEAT for do_frint_mode
From: |
Richard Henderson |
Subject: |
[PATCH 095/114] target/arm: Use TRANS_FEAT for do_frint_mode |
Date: |
Fri, 27 May 2022 11:18:48 -0700 |
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
target/arm/translate-sve.c | 53 ++++++++++----------------------------
1 file changed, 14 insertions(+), 39 deletions(-)
diff --git a/target/arm/translate-sve.c b/target/arm/translate-sve.c
index 43cfd2818e..552a551fef 100644
--- a/target/arm/translate-sve.c
+++ b/target/arm/translate-sve.c
@@ -4168,30 +4168,16 @@ static bool do_frint_mode(DisasContext *s, arg_rpr_esz
*a,
return true;
}
-static bool trans_FRINTN(DisasContext *s, arg_rpr_esz *a)
-{
- return do_frint_mode(s, a, float_round_nearest_even, frint_fns[a->esz]);
-}
-
-static bool trans_FRINTP(DisasContext *s, arg_rpr_esz *a)
-{
- return do_frint_mode(s, a, float_round_up, frint_fns[a->esz]);
-}
-
-static bool trans_FRINTM(DisasContext *s, arg_rpr_esz *a)
-{
- return do_frint_mode(s, a, float_round_down, frint_fns[a->esz]);
-}
-
-static bool trans_FRINTZ(DisasContext *s, arg_rpr_esz *a)
-{
- return do_frint_mode(s, a, float_round_to_zero, frint_fns[a->esz]);
-}
-
-static bool trans_FRINTA(DisasContext *s, arg_rpr_esz *a)
-{
- return do_frint_mode(s, a, float_round_ties_away, frint_fns[a->esz]);
-}
+TRANS_FEAT(FRINTN, aa64_sve, do_frint_mode, a,
+ float_round_nearest_even, frint_fns[a->esz])
+TRANS_FEAT(FRINTP, aa64_sve, do_frint_mode, a,
+ float_round_up, frint_fns[a->esz])
+TRANS_FEAT(FRINTM, aa64_sve, do_frint_mode, a,
+ float_round_down, frint_fns[a->esz])
+TRANS_FEAT(FRINTZ, aa64_sve, do_frint_mode, a,
+ float_round_to_zero, frint_fns[a->esz])
+TRANS_FEAT(FRINTA, aa64_sve, do_frint_mode, a,
+ float_round_ties_away, frint_fns[a->esz])
static gen_helper_gvec_3_ptr * const frecpx_fns[] = {
NULL, gen_helper_sve_frecpx_h,
@@ -7289,21 +7275,10 @@ TRANS_FEAT(FCVTLT_hs, aa64_sve2, gen_gvec_fpst_arg_zpz,
TRANS_FEAT(FCVTLT_sd, aa64_sve2, gen_gvec_fpst_arg_zpz,
gen_helper_sve2_fcvtlt_sd, a, 0, FPST_FPCR)
-static bool trans_FCVTX_ds(DisasContext *s, arg_rpr_esz *a)
-{
- if (!dc_isar_feature(aa64_sve2, s)) {
- return false;
- }
- return do_frint_mode(s, a, float_round_to_odd, gen_helper_sve_fcvt_ds);
-}
-
-static bool trans_FCVTXNT_ds(DisasContext *s, arg_rpr_esz *a)
-{
- if (!dc_isar_feature(aa64_sve2, s)) {
- return false;
- }
- return do_frint_mode(s, a, float_round_to_odd, gen_helper_sve2_fcvtnt_ds);
-}
+TRANS_FEAT(FCVTX_ds, aa64_sve2, do_frint_mode, a,
+ float_round_to_odd, gen_helper_sve_fcvt_ds)
+TRANS_FEAT(FCVTXNT_ds, aa64_sve2, do_frint_mode, a,
+ float_round_to_odd, gen_helper_sve2_fcvtnt_ds)
static bool trans_FLOGB(DisasContext *s, arg_rpr_esz *a)
{
--
2.34.1
- [PATCH 071/114] target/arm: Reject dup_i w/ shifted byte early, (continued)
- [PATCH 071/114] target/arm: Reject dup_i w/ shifted byte early, Richard Henderson, 2022/05/27
- [PATCH 075/114] target/arm: Use TRANS_FEAT for do_zzi_sat, Richard Henderson, 2022/05/27
- [PATCH 080/114] target/arm: Implement NOT (prediates) alias, Richard Henderson, 2022/05/27
- [PATCH 081/114] target/arm: Use TRANS_FEAT for SEL_zpzz, Richard Henderson, 2022/05/27
- [PATCH 086/114] target/arm: Use TRANS_FEAT for DO_FP3, Richard Henderson, 2022/05/27
- [PATCH 087/114] target/arm: Use TRANS_FEAT for FMUL_zzx, Richard Henderson, 2022/05/27
- [PATCH 088/114] target/arm: Use TRANS_FEAT for FTMAD, Richard Henderson, 2022/05/27
- [PATCH 092/114] target/arm: Expand frint_fns for MO_8, Richard Henderson, 2022/05/27
- [PATCH 082/114] target/arm: Use TRANS_FEAT for MOVPRFX, Richard Henderson, 2022/05/27
- [PATCH 083/114] target/arm: Use TRANS_FEAT for FMLA, Richard Henderson, 2022/05/27
- [PATCH 095/114] target/arm: Use TRANS_FEAT for do_frint_mode,
Richard Henderson <=
- [PATCH 094/114] target/arm: Move null function and sve check into do_frint_mode, Richard Henderson, 2022/05/27
- [PATCH 096/114] target/arm: Use TRANS_FEAT for FLOGB, Richard Henderson, 2022/05/27
- [PATCH 085/114] target/arm: Rename do_zzz_fp to gen_gvec_ool_fpst_arg_zzz, Richard Henderson, 2022/05/27
- [PATCH 084/114] target/arm: Use TRANS_FEAT for BFMLA, Richard Henderson, 2022/05/27
- [PATCH 090/114] target/arm: Use TRANS_FEAT for do_reduce, Richard Henderson, 2022/05/27
- [PATCH 091/114] target/arm: Use TRANS_FEAT for FRECPE, FRSQRTE, Richard Henderson, 2022/05/27
- [PATCH 093/114] target/arm: Rename do_zpz_ptr to gen_gvec_ool_fpst_arg_zpz, Richard Henderson, 2022/05/27
- [PATCH 089/114] target/arm: Move null function and sve check into do_reduce, Richard Henderson, 2022/05/27
- [PATCH 100/114] target/arm: Use TRANS_FEAT for FCADD, Richard Henderson, 2022/05/27
- [PATCH 101/114] target/arm: Introduce gen_gvec_fpst_zzzzp, Richard Henderson, 2022/05/27