[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 039/117] target/arm: Introduce gen_gvec_fn_arg_zzzz
From: |
Peter Maydell |
Subject: |
[PULL 039/117] target/arm: Introduce gen_gvec_fn_arg_zzzz |
Date: |
Mon, 30 May 2022 17:05:50 +0100 |
From: Richard Henderson <richard.henderson@linaro.org>
Merge gen_gvec_fn_zzzz with the sve access check and the
dereference of arg_rrrr_esz.
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20220527181907.189259-37-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 | 25 ++++++++++++++-----------
1 file changed, 14 insertions(+), 11 deletions(-)
diff --git a/target/arm/translate-sve.c b/target/arm/translate-sve.c
index 36d739d7b2c..e0b083f8615 100644
--- a/target/arm/translate-sve.c
+++ b/target/arm/translate-sve.c
@@ -281,14 +281,20 @@ static bool gen_gvec_fn_arg_zzz(DisasContext *s,
GVecGen3Fn *fn,
}
/* Invoke a vector expander on four Zregs. */
-static void gen_gvec_fn_zzzz(DisasContext *s, GVecGen4Fn *gvec_fn,
- int esz, int rd, int rn, int rm, int ra)
+static bool gen_gvec_fn_arg_zzzz(DisasContext *s, GVecGen4Fn *gvec_fn,
+ arg_rrrr_esz *a)
{
- unsigned vsz = vec_full_reg_size(s);
- gvec_fn(esz, vec_full_reg_offset(s, rd),
- vec_full_reg_offset(s, rn),
- vec_full_reg_offset(s, rm),
- vec_full_reg_offset(s, ra), vsz, vsz);
+ if (gvec_fn == NULL) {
+ return false;
+ }
+ if (sve_access_check(s)) {
+ unsigned vsz = vec_full_reg_size(s);
+ gvec_fn(a->esz, vec_full_reg_offset(s, a->rd),
+ vec_full_reg_offset(s, a->rn),
+ vec_full_reg_offset(s, a->rm),
+ vec_full_reg_offset(s, a->ra), vsz, vsz);
+ }
+ return true;
}
/* Invoke a vector move on two Zregs. */
@@ -490,10 +496,7 @@ static bool do_sve2_zzzz_fn(DisasContext *s, arg_rrrr_esz
*a, GVecGen4Fn *fn)
if (!dc_isar_feature(aa64_sve2, s)) {
return false;
}
- if (sve_access_check(s)) {
- gen_gvec_fn_zzzz(s, fn, a->esz, a->rd, a->rn, a->rm, a->ra);
- }
- return true;
+ return gen_gvec_fn_arg_zzzz(s, fn, a);
}
static void gen_eor3_i64(TCGv_i64 d, TCGv_i64 n, TCGv_i64 m, TCGv_i64 k)
--
2.25.1
- [PULL 018/117] target/arm: Use TRANS_FEAT for do_sve2_zzz_data, (continued)
- [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, 2022/05/30
- [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 <=
- [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
- [PULL 028/117] target/arm: Move null function and sve check into gen_gvec_ool_zzzp, Peter Maydell, 2022/05/30
- [PULL 041/117] target/arm: Introduce gen_gvec_fn_zzi, Peter Maydell, 2022/05/30
- [PULL 037/117] target/arm: Use TRANS_FEAT for do_sve2_fn_zzz, Peter Maydell, 2022/05/30