[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 100/114] target/arm: Use TRANS_FEAT for FCADD
From: |
Richard Henderson |
Subject: |
[PATCH 100/114] target/arm: Use TRANS_FEAT for FCADD |
Date: |
Fri, 27 May 2022 11:18:53 -0700 |
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
target/arm/translate-sve.c | 30 +++++++-----------------------
1 file changed, 7 insertions(+), 23 deletions(-)
diff --git a/target/arm/translate-sve.c b/target/arm/translate-sve.c
index 1108494919..e323b2d6d5 100644
--- a/target/arm/translate-sve.c
+++ b/target/arm/translate-sve.c
@@ -3966,29 +3966,13 @@ DO_FPCMP(FACGT, facgt)
#undef DO_FPCMP
-static bool trans_FCADD(DisasContext *s, arg_FCADD *a)
-{
- static gen_helper_gvec_4_ptr * const fns[3] = {
- gen_helper_sve_fcadd_h,
- gen_helper_sve_fcadd_s,
- gen_helper_sve_fcadd_d
- };
-
- if (a->esz == 0) {
- 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_4_ptr(vec_full_reg_offset(s, a->rd),
- vec_full_reg_offset(s, a->rn),
- vec_full_reg_offset(s, a->rm),
- pred_full_reg_offset(s, a->pg),
- status, vsz, vsz, a->rot, fns[a->esz - 1]);
- tcg_temp_free_ptr(status);
- }
- return true;
-}
+static gen_helper_gvec_4_ptr * const fcadd_fns[] = {
+ NULL, gen_helper_sve_fcadd_h,
+ gen_helper_sve_fcadd_s, gen_helper_sve_fcadd_d,
+};
+TRANS_FEAT(FCADD, aa64_sve, gen_gvec_fpst_zzzp, fcadd_fns[a->esz],
+ a->rd, a->rn, a->rm, a->pg, a->rot,
+ a->esz == MO_16 ? FPST_FPCR_F16 : FPST_FPCR)
static bool do_fmla(DisasContext *s, arg_rprrr_esz *a,
gen_helper_gvec_5_ptr *fn)
--
2.34.1
- [PATCH 082/114] target/arm: Use TRANS_FEAT for MOVPRFX, (continued)
- [PATCH 082/114] target/arm: Use TRANS_FEAT for MOVPRFX, Richard Henderson, 2022/05/27
- [PATCH 090/114] target/arm: Use TRANS_FEAT for do_reduce, Richard Henderson, 2022/05/27
- [PATCH 092/114] target/arm: Expand frint_fns for MO_8, Richard Henderson, 2022/05/27
- [PATCH 086/114] target/arm: Use TRANS_FEAT for DO_FP3, Richard Henderson, 2022/05/27
- [PATCH 088/114] target/arm: Use TRANS_FEAT for FTMAD, Richard Henderson, 2022/05/27
- [PATCH 091/114] target/arm: Use TRANS_FEAT for FRECPE, FRSQRTE, Richard Henderson, 2022/05/27
- [PATCH 084/114] target/arm: Use TRANS_FEAT for BFMLA, 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 097/114] target/arm: Use TRANS_FEAT for do_ppz_fp, Richard Henderson, 2022/05/27
- [PATCH 087/114] target/arm: Use TRANS_FEAT for FMUL_zzx, Richard Henderson, 2022/05/27
- [PATCH 100/114] target/arm: Use TRANS_FEAT for FCADD,
Richard Henderson <=
- [PATCH 089/114] target/arm: Move null function and sve check into do_reduce, Richard Henderson, 2022/05/27
- [PATCH 098/114] target/arm: Rename do_zpzz_ptr to gen_gvec_fpst_arg_zpzz, Richard Henderson, 2022/05/27
- [PATCH 095/114] target/arm: Use TRANS_FEAT for do_frint_mode, Richard Henderson, 2022/05/27
- [PATCH 094/114] target/arm: Move null function and sve check into do_frint_mode, Richard Henderson, 2022/05/27
- [PATCH 101/114] target/arm: Introduce gen_gvec_fpst_zzzzp, Richard Henderson, 2022/05/27
- [PATCH 102/114] target/arm: Use TRANS_FEAT for gen_gvec_fpst_zzzzp, Richard Henderson, 2022/05/27
- [PATCH 096/114] target/arm: Use TRANS_FEAT for FLOGB, Richard Henderson, 2022/05/27
- [PATCH 108/114] target/arm: Use TRANS_FEAT for do_narrow_extract, Richard Henderson, 2022/05/27
- [PATCH 104/114] target/arm: Use TRANS_FEAT for DO_FP_IMM, Richard Henderson, 2022/05/27
- [PATCH 106/114] target/arm: Remove assert in trans_FCMLA_zzxz, Richard Henderson, 2022/05/27