[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 028/117] target/arm: Move null function and sve check into gen_gve
From: |
Peter Maydell |
Subject: |
[PULL 028/117] target/arm: Move null function and sve check into gen_gvec_ool_zzzp |
Date: |
Mon, 30 May 2022 17:05:39 +0100 |
From: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20220527181907.189259-26-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 | 42 ++++++++++++++++----------------------
1 file changed, 18 insertions(+), 24 deletions(-)
diff --git a/target/arm/translate-sve.c b/target/arm/translate-sve.c
index 10614bf9151..fea7164d729 100644
--- a/target/arm/translate-sve.c
+++ b/target/arm/translate-sve.c
@@ -235,15 +235,21 @@ static bool gen_gvec_ool_arg_zpzi(DisasContext *s,
gen_helper_gvec_3 *fn,
}
/* Invoke an out-of-line helper on 3 Zregs and a predicate. */
-static void gen_gvec_ool_zzzp(DisasContext *s, gen_helper_gvec_4 *fn,
+static bool gen_gvec_ool_zzzp(DisasContext *s, gen_helper_gvec_4 *fn,
int rd, int rn, int rm, int pg, int data)
{
- unsigned vsz = vec_full_reg_size(s);
- tcg_gen_gvec_4_ool(vec_full_reg_offset(s, rd),
- vec_full_reg_offset(s, rn),
- vec_full_reg_offset(s, rm),
- pred_full_reg_offset(s, pg),
- vsz, vsz, data, fn);
+ if (fn == NULL) {
+ return false;
+ }
+ if (sve_access_check(s)) {
+ unsigned vsz = vec_full_reg_size(s);
+ tcg_gen_gvec_4_ool(vec_full_reg_offset(s, rd),
+ vec_full_reg_offset(s, rn),
+ vec_full_reg_offset(s, rm),
+ pred_full_reg_offset(s, pg),
+ vsz, vsz, data, fn);
+ }
+ return true;
}
/* Invoke a vector expander on two Zregs. */
@@ -733,13 +739,7 @@ static bool trans_UQSUB_zzz(DisasContext *s, arg_rrr_esz
*a)
static bool do_zpzz_ool(DisasContext *s, arg_rprr_esz *a, gen_helper_gvec_4
*fn)
{
- if (fn == NULL) {
- return false;
- }
- if (sve_access_check(s)) {
- gen_gvec_ool_zzzp(s, fn, a->rd, a->rn, a->rm, a->pg, 0);
- }
- return true;
+ 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,
@@ -2950,11 +2950,8 @@ TRANS_FEAT(REVW, aa64_sve, gen_gvec_ool_arg_zpz,
static bool trans_SPLICE(DisasContext *s, arg_rprr_esz *a)
{
- if (sve_access_check(s)) {
- gen_gvec_ool_zzzp(s, gen_helper_sve_splice,
- a->rd, a->rn, a->rm, a->pg, a->esz);
- }
- return true;
+ return gen_gvec_ool_zzzp(s, gen_helper_sve_splice,
+ a->rd, a->rn, a->rm, a->pg, a->esz);
}
static bool trans_SPLICE_sve2(DisasContext *s, arg_rpr_esz *a)
@@ -2962,11 +2959,8 @@ static bool trans_SPLICE_sve2(DisasContext *s,
arg_rpr_esz *a)
if (!dc_isar_feature(aa64_sve2, s)) {
return false;
}
- if (sve_access_check(s)) {
- gen_gvec_ool_zzzp(s, gen_helper_sve_splice,
- a->rd, a->rn, (a->rn + 1) % 32, a->pg, a->esz);
- }
- return true;
+ return gen_gvec_ool_zzzp(s, gen_helper_sve_splice,
+ a->rd, a->rn, (a->rn + 1) % 32, a->pg, a->esz);
}
/*
--
2.25.1
- [PULL 024/117] target/arm: Use TRANS_FEAT for gen_gvec_ool_arg_zpz, (continued)
- [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
- [PULL 028/117] target/arm: Move null function and sve check into gen_gvec_ool_zzzp,
Peter Maydell <=
- [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
- [PULL 047/117] target/arm: Use TRANS_FEAT for do_shift_imm, Peter Maydell, 2022/05/30
- [PULL 053/117] target/arm: Use TRANS_FEAT for do_adr, Peter Maydell, 2022/05/30
- [PULL 055/117] target/arm: Use TRANS_FEAT for RDFFR, WRFFR, Peter Maydell, 2022/05/30
- [PULL 057/117] target/arm: Use TRANS_FEAT for do_EXT, Peter Maydell, 2022/05/30
- [PULL 038/117] target/arm: Use TRANS_FEAT for RAX1, Peter Maydell, 2022/05/30
- [PULL 044/117] target/arm: Introduce gen_gvec_fn_arg_zzi, Peter Maydell, 2022/05/30
- [PULL 048/117] target/arm: Introduce do_shift_zpzi, Peter Maydell, 2022/05/30
- [PULL 043/117] target/arm: Hoist sve access check through do_sel_z, Peter Maydell, 2022/05/30