[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 099/117] target/arm: Use TRANS_FEAT for FLOGB
From: |
Peter Maydell |
Subject: |
[PULL 099/117] target/arm: Use TRANS_FEAT for FLOGB |
Date: |
Mon, 30 May 2022 17:06:50 +0100 |
From: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20220527181907.189259-97-richard.henderson@linaro.org
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
target/arm/translate-sve.c | 29 ++++++-----------------------
1 file changed, 6 insertions(+), 23 deletions(-)
diff --git a/target/arm/translate-sve.c b/target/arm/translate-sve.c
index 552a551fef3..2f96f52293d 100644
--- a/target/arm/translate-sve.c
+++ b/target/arm/translate-sve.c
@@ -7280,29 +7280,12 @@ TRANS_FEAT(FCVTX_ds, aa64_sve2, do_frint_mode, a,
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)
-{
- static gen_helper_gvec_3_ptr * const fns[] = {
- NULL, gen_helper_flogb_h,
- gen_helper_flogb_s, gen_helper_flogb_d
- };
-
- if (!dc_isar_feature(aa64_sve2, s) || fns[a->esz] == NULL) {
- return false;
- }
- if (sve_access_check(s)) {
- TCGv_ptr status =
- fpstatus_ptr(a->esz == MO_16 ? FPST_FPCR_F16 : FPST_FPCR);
- unsigned vsz = vec_full_reg_size(s);
-
- tcg_gen_gvec_3_ptr(vec_full_reg_offset(s, a->rd),
- vec_full_reg_offset(s, a->rn),
- pred_full_reg_offset(s, a->pg),
- status, vsz, vsz, 0, fns[a->esz]);
- tcg_temp_free_ptr(status);
- }
- return true;
-}
+static gen_helper_gvec_3_ptr * const flogb_fns[] = {
+ NULL, gen_helper_flogb_h,
+ gen_helper_flogb_s, gen_helper_flogb_d
+};
+TRANS_FEAT(FLOGB, aa64_sve2, gen_gvec_fpst_arg_zpz, flogb_fns[a->esz],
+ a, 0, a->esz == MO_16 ? FPST_FPCR_F16 : FPST_FPCR)
static bool do_FMLAL_zzzw(DisasContext *s, arg_rrrr_esz *a, bool sub, bool sel)
{
--
2.25.1
- [PULL 080/117] target/arm: Introduce gen_gvec_{ptr,fpst}_zzzz, (continued)
- [PULL 080/117] target/arm: Introduce gen_gvec_{ptr,fpst}_zzzz, Peter Maydell, 2022/05/30
- [PULL 027/117] target/arm: Use TRANS_FEAT for gen_gvec_ool_arg_zpzi, Peter Maydell, 2022/05/30
- [PULL 079/117] target/arm: Use TRANS_FEAT for do_zzi_ool, Peter Maydell, 2022/05/30
- [PULL 087/117] target/arm: Use TRANS_FEAT for BFMLA, Peter Maydell, 2022/05/30
- [PULL 051/117] target/arm: Move sve check into do_index, Peter Maydell, 2022/05/30
- [PULL 066/117] target/arm: Use TRANS_FEAT for do_last_fp, Peter Maydell, 2022/05/30
- [PULL 072/117] target/arm: Use TRANS_FEAT for do_brk2, do_brk3, Peter Maydell, 2022/05/30
- [PULL 071/117] target/arm: Use TRANS_FEAT for do_ppzi_flags, Peter Maydell, 2022/05/30
- [PULL 076/117] target/arm: Reject copy w/ shifted byte early, Peter Maydell, 2022/05/30
- [PULL 081/117] target/arm: Use TRANS_FEAT for FMMLA, Peter Maydell, 2022/05/30
- [PULL 099/117] target/arm: Use TRANS_FEAT for FLOGB,
Peter Maydell <=
- [PULL 065/117] target/arm: Use TRANS_FEAT for do_clast_general, Peter Maydell, 2022/05/30
- [PULL 085/117] target/arm: Use TRANS_FEAT for MOVPRFX, Peter Maydell, 2022/05/30
- [PULL 089/117] target/arm: Use TRANS_FEAT for DO_FP3, Peter Maydell, 2022/05/30
- [PULL 097/117] target/arm: Move null function and sve check into do_frint_mode, Peter Maydell, 2022/05/30
- [PULL 078/117] target/arm: Use TRANS_FEAT for do_zzi_sat, Peter Maydell, 2022/05/30
- [PULL 098/117] target/arm: Use TRANS_FEAT for do_frint_mode, Peter Maydell, 2022/05/30
- Re: [PULL 000/117] target-arm queue, Richard Henderson, 2022/05/30