[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 029/117] target/arm: Introduce gen_gvec_ool_arg_zpzz
From: |
Peter Maydell |
Subject: |
[PULL 029/117] target/arm: Introduce gen_gvec_ool_arg_zpzz |
Date: |
Mon, 30 May 2022 17:05:40 +0100 |
From: Richard Henderson <richard.henderson@linaro.org>
Use gen_gvec_ool_arg_zpzz instead of gen_gvec_ool_zzzp
when the arguments come from arg_rprr_esz.
Replaces do_zpzz_ool.
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20220527181907.189259-27-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 | 21 +++++++++++----------
1 file changed, 11 insertions(+), 10 deletions(-)
diff --git a/target/arm/translate-sve.c b/target/arm/translate-sve.c
index fea7164d729..d63099c5b7b 100644
--- a/target/arm/translate-sve.c
+++ b/target/arm/translate-sve.c
@@ -252,6 +252,12 @@ static bool gen_gvec_ool_zzzp(DisasContext *s,
gen_helper_gvec_4 *fn,
return true;
}
+static bool gen_gvec_ool_arg_zpzz(DisasContext *s, gen_helper_gvec_4 *fn,
+ arg_rprr_esz *a, int data)
+{
+ return gen_gvec_ool_zzzp(s, fn, a->rd, a->rn, a->rm, a->pg, data);
+}
+
/* Invoke a vector expander on two Zregs. */
static void gen_gvec_fn_zz(DisasContext *s, GVecGen2Fn *gvec_fn,
int esz, int rd, int rn)
@@ -737,11 +743,6 @@ static bool trans_UQSUB_zzz(DisasContext *s, arg_rrr_esz
*a)
*** SVE Integer Arithmetic - Binary Predicated Group
*/
-static bool do_zpzz_ool(DisasContext *s, arg_rprr_esz *a, gen_helper_gvec_4
*fn)
-{
- return gen_gvec_ool_zzzp(s, fn, a->rd, a->rn, a->rm, a->pg, 0);
-}
-
/* Select active elememnts from Zn and inactive elements from Zm,
* storing the result in Zd.
*/
@@ -761,7 +762,7 @@ static bool trans_##NAME##_zpzz(DisasContext *s,
arg_rprr_esz *a) \
gen_helper_sve_##name##_zpzz_b, gen_helper_sve_##name##_zpzz_h, \
gen_helper_sve_##name##_zpzz_s, gen_helper_sve_##name##_zpzz_d, \
}; \
- return do_zpzz_ool(s, a, fns[a->esz]); \
+ return gen_gvec_ool_arg_zpzz(s, fns[a->esz], a, 0); \
}
DO_ZPZZ(AND, and)
@@ -792,7 +793,7 @@ static bool trans_SDIV_zpzz(DisasContext *s, arg_rprr_esz
*a)
static gen_helper_gvec_4 * const fns[4] = {
NULL, NULL, gen_helper_sve_sdiv_zpzz_s, gen_helper_sve_sdiv_zpzz_d
};
- return do_zpzz_ool(s, a, fns[a->esz]);
+ return gen_gvec_ool_arg_zpzz(s, fns[a->esz], a, 0);
}
static bool trans_UDIV_zpzz(DisasContext *s, arg_rprr_esz *a)
@@ -800,7 +801,7 @@ static bool trans_UDIV_zpzz(DisasContext *s, arg_rprr_esz
*a)
static gen_helper_gvec_4 * const fns[4] = {
NULL, NULL, gen_helper_sve_udiv_zpzz_s, gen_helper_sve_udiv_zpzz_d
};
- return do_zpzz_ool(s, a, fns[a->esz]);
+ return gen_gvec_ool_arg_zpzz(s, fns[a->esz], a, 0);
}
static bool trans_SEL_zpzz(DisasContext *s, arg_rprr_esz *a)
@@ -1076,7 +1077,7 @@ static bool trans_##NAME##_zpzw(DisasContext *s,
arg_rprr_esz *a) \
if (a->esz < 0 || a->esz >= 3) { \
return false; \
} \
- return do_zpzz_ool(s, a, fns[a->esz]); \
+ return gen_gvec_ool_arg_zpzz(s, fns[a->esz], a, 0); \
}
DO_ZPZW(ASR, asr)
@@ -6489,7 +6490,7 @@ static bool do_sve2_zpzz_ool(DisasContext *s,
arg_rprr_esz *a,
if (!dc_isar_feature(aa64_sve2, s)) {
return false;
}
- return do_zpzz_ool(s, a, fn);
+ return gen_gvec_ool_arg_zpzz(s, fn, a, 0);
}
static bool trans_SADALP_zpzz(DisasContext *s, arg_rprr_esz *a)
--
2.25.1
- [PULL 014/117] target/arm: Use TRANS_FEAT for do_sve2_zzzz_ool, (continued)
- [PULL 014/117] target/arm: Use TRANS_FEAT for do_sve2_zzzz_ool, Peter Maydell, 2022/05/30
- [PULL 016/117] target/arm: Rename do_zzxz_ool to gen_gvec_ool_arg_zzxz, Peter Maydell, 2022/05/30
- [PULL 017/117] target/arm: Use TRANS_FEAT for gen_gvec_ool_arg_zzxz, Peter Maydell, 2022/05/30
- [PULL 018/117] target/arm: Use TRANS_FEAT for do_sve2_zzz_data, Peter Maydell, 2022/05/30
- [PULL 004/117] target/arm: Introduce TRANS, TRANS_FEAT, Peter Maydell, 2022/05/30
- [PULL 021/117] target/arm: Use TRANS_FEAT for USDOT_zzzz, Peter Maydell, 2022/05/30
- [PULL 022/117] target/arm: Move null function and sve check into gen_gvec_ool_zzp, Peter Maydell, 2022/05/30
- [PULL 020/117] target/arm: Use TRANS_FEAT for do_sve2_zzw_data, Peter Maydell, 2022/05/30
- [PULL 025/117] target/arm: Use TRANS_FEAT for do_sve2_zpz_data, Peter Maydell, 2022/05/30
- [PULL 030/117] target/arm: Use TRANS_FEAT for gen_gvec_ool_arg_zpzz, Peter Maydell, 2022/05/30
- [PULL 029/117] target/arm: Introduce gen_gvec_ool_arg_zpzz,
Peter Maydell <=
- [PULL 024/117] target/arm: Use TRANS_FEAT for gen_gvec_ool_arg_zpz, Peter Maydell, 2022/05/30
- [PULL 034/117] target/arm: Rename do_zzz_fn to gen_gvec_fn_arg_zzz, Peter Maydell, 2022/05/30
- [PULL 039/117] target/arm: Introduce gen_gvec_fn_arg_zzzz, Peter Maydell, 2022/05/30
- [PULL 026/117] target/arm: Rename do_zpzi_ool to gen_gvec_ool_arg_zpzi, Peter Maydell, 2022/05/30
- [PULL 031/117] target/arm: Use TRANS_FEAT for do_sve2_zpzz_ool, Peter Maydell, 2022/05/30
- [PULL 033/117] target/arm: Move null function and sve check into gen_gvec_fn_zzz, Peter Maydell, 2022/05/30
- [PULL 032/117] target/arm: Merge gen_gvec_fn_zz into do_mov_z, Peter Maydell, 2022/05/30
- [PULL 035/117] target/arm: More use of gen_gvec_fn_arg_zzz, Peter Maydell, 2022/05/30
- [PULL 036/117] target/arm: Use TRANS_FEAT for gen_gvec_fn_arg_zzz, Peter Maydell, 2022/05/30
- [PULL 040/117] target/arm: Use TRANS_FEAT for do_sve2_zzzz_fn, Peter Maydell, 2022/05/30