[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 085/114] target/arm: Rename do_zzz_fp to gen_gvec_ool_fpst_arg_zz
From: |
Richard Henderson |
Subject: |
[PATCH 085/114] target/arm: Rename do_zzz_fp to gen_gvec_ool_fpst_arg_zzz |
Date: |
Fri, 27 May 2022 11:18:38 -0700 |
Rename the function to match gen_gvec_ool_arg_zzz,
and move to be adjacent. Split out gen_gvec_fpst_zzz
as a helper while we're at it.
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
target/arm/translate-sve.c | 50 +++++++++++++++++++++++---------------
1 file changed, 30 insertions(+), 20 deletions(-)
diff --git a/target/arm/translate-sve.c b/target/arm/translate-sve.c
index f2939fbeb9..61bf5f5757 100644
--- a/target/arm/translate-sve.c
+++ b/target/arm/translate-sve.c
@@ -175,6 +175,35 @@ static bool gen_gvec_ool_arg_zzz(DisasContext *s,
gen_helper_gvec_3 *fn,
return gen_gvec_ool_zzz(s, fn, a->rd, a->rn, a->rm, data);
}
+/* Invoke an out-of-line helper on 3 Zregs, plus float_status. */
+static bool gen_gvec_fpst_zzz(DisasContext *s, gen_helper_gvec_3_ptr *fn,
+ int rd, int rn, int rm,
+ int data, ARMFPStatusFlavour flavour)
+{
+ if (fn == NULL) {
+ return false;
+ }
+ if (sve_access_check(s)) {
+ unsigned vsz = vec_full_reg_size(s);
+ TCGv_ptr status = fpstatus_ptr(flavour);
+
+ tcg_gen_gvec_3_ptr(vec_full_reg_offset(s, rd),
+ vec_full_reg_offset(s, rn),
+ vec_full_reg_offset(s, rm),
+ status, vsz, vsz, data, fn);
+
+ tcg_temp_free_ptr(status);
+ }
+ return true;
+}
+
+static bool gen_gvec_fpst_arg_zzz(DisasContext *s, gen_helper_gvec_3_ptr *fn,
+ arg_rrr_esz *a, int data)
+{
+ return gen_gvec_fpst_zzz(s, fn, a->rd, a->rn, a->rm, data,
+ a->esz == MO_16 ? FPST_FPCR_F16 : FPST_FPCR);
+}
+
/* Invoke an out-of-line helper on 4 Zregs. */
static bool gen_gvec_ool_zzzz(DisasContext *s, gen_helper_gvec_4 *fn,
int rd, int rn, int rm, int ra, int data)
@@ -3769,25 +3798,6 @@ static bool trans_FADDA(DisasContext *s, arg_rprr_esz *a)
*** SVE Floating Point Arithmetic - Unpredicated Group
*/
-static bool do_zzz_fp(DisasContext *s, arg_rrr_esz *a,
- gen_helper_gvec_3_ptr *fn)
-{
- 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(vec_full_reg_offset(s, a->rd),
- vec_full_reg_offset(s, a->rn),
- vec_full_reg_offset(s, a->rm),
- status, vsz, vsz, 0, fn);
- tcg_temp_free_ptr(status);
- }
- return true;
-}
-
-
#define DO_FP3(NAME, name) \
static bool trans_##NAME(DisasContext *s, arg_rrr_esz *a) \
{ \
@@ -3795,7 +3805,7 @@ static bool trans_##NAME(DisasContext *s, arg_rrr_esz *a)
\
NULL, gen_helper_gvec_##name##_h, \
gen_helper_gvec_##name##_s, gen_helper_gvec_##name##_d \
}; \
- return do_zzz_fp(s, a, fns[a->esz]); \
+ return gen_gvec_fpst_arg_zzz(s, fns[a->esz], a, 0); \
}
DO_FP3(FADD_zzz, fadd)
--
2.34.1
- [PATCH 066/114] target/arm: Use TRANS_FEAT for do_ppzz_flags, (continued)
- [PATCH 066/114] target/arm: Use TRANS_FEAT for do_ppzz_flags, Richard Henderson, 2022/05/27
- [PATCH 065/114] target/arm: Use TRANS_FEAT for SPLICE, Richard Henderson, 2022/05/27
- [PATCH 078/114] target/arm: Use TRANS_FEAT for FMMLA, Richard Henderson, 2022/05/27
- [PATCH 069/114] target/arm: Use TRANS_FEAT for do_brk2, do_brk3, Richard Henderson, 2022/05/27
- [PATCH 070/114] target/arm: Use TRANS_FEAT for MUL_zzi, Richard Henderson, 2022/05/27
- [PATCH 071/114] target/arm: Reject dup_i w/ shifted byte early, Richard Henderson, 2022/05/27
- [PATCH 079/114] target/arm: Move sve check into gen_gvec_fn_ppp, Richard Henderson, 2022/05/27
- [PATCH 073/114] target/arm: Reject copy w/ shifted byte early, Richard Henderson, 2022/05/27
- [PATCH 083/114] target/arm: Use TRANS_FEAT for FMLA, Richard Henderson, 2022/05/27
- [PATCH 080/114] target/arm: Implement NOT (prediates) alias, Richard Henderson, 2022/05/27
- [PATCH 085/114] target/arm: Rename do_zzz_fp to gen_gvec_ool_fpst_arg_zzz,
Richard Henderson <=
- [PATCH 081/114] target/arm: Use TRANS_FEAT for SEL_zpzz, Richard Henderson, 2022/05/27
- [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