[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 025/114] target/arm: Move null function and sve check into gen_gv
From: |
Richard Henderson |
Subject: |
[PATCH 025/114] target/arm: Move null function and sve check into gen_gvec_ool_zzzp |
Date: |
Fri, 27 May 2022 11:17:38 -0700 |
Signed-off-by: Richard Henderson <richard.henderson@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 10614bf915..fea7164d72 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.34.1
- [PATCH 006/114] target/arm: Use TRANS_FEAT for gen_gvec_ool_arg_zzz, (continued)
- [PATCH 006/114] target/arm: Use TRANS_FEAT for gen_gvec_ool_arg_zzz, Richard Henderson, 2022/05/27
- [PATCH 015/114] target/arm: Use TRANS_FEAT for do_sve2_zzz_data, Richard Henderson, 2022/05/27
- [PATCH 016/114] target/arm: Use TRANS_FEAT for do_sve2_zzzz_data, Richard Henderson, 2022/05/27
- [PATCH 018/114] target/arm: Use TRANS_FEAT for USDOT_zzzz, Richard Henderson, 2022/05/27
- [PATCH 017/114] target/arm: Use TRANS_FEAT for do_sve2_zzw_data, Richard Henderson, 2022/05/27
- [PATCH 020/114] target/arm: Introduce gen_gvec_ool_arg_zpz, Richard Henderson, 2022/05/27
- [PATCH 021/114] target/arm: Use TRANS_FEAT for gen_gvec_ool_arg_zpz, Richard Henderson, 2022/05/27
- [PATCH 019/114] target/arm: Move null function and sve check into gen_gvec_ool_zzp, Richard Henderson, 2022/05/27
- [PATCH 022/114] target/arm: Use TRANS_FEAT for do_sve2_zpz_data, Richard Henderson, 2022/05/27
- [PATCH 014/114] target/arm: Use TRANS_FEAT for gen_gvec_ool_arg_zzxz, Richard Henderson, 2022/05/27
- [PATCH 025/114] target/arm: Move null function and sve check into gen_gvec_ool_zzzp,
Richard Henderson <=
- [PATCH 024/114] target/arm: Use TRANS_FEAT for gen_gvec_ool_arg_zpzi, Richard Henderson, 2022/05/27
- [PATCH 027/114] target/arm: Use TRANS_FEAT for gen_gvec_ool_arg_zpzz, Richard Henderson, 2022/05/27
- [PATCH 026/114] target/arm: Introduce gen_gvec_ool_arg_zpzz, Richard Henderson, 2022/05/27
- [PATCH 030/114] target/arm: Move null function and sve check into gen_gvec_fn_zzz, Richard Henderson, 2022/05/27
- [PATCH 031/114] target/arm: Rename do_zzz_fn to gen_gvec_fn_arg_zzz, Richard Henderson, 2022/05/27
- [PATCH 029/114] target/arm: Merge gen_gvec_fn_zz into do_mov_z, Richard Henderson, 2022/05/27
- [PATCH 028/114] target/arm: Use TRANS_FEAT for do_sve2_zpzz_ool, Richard Henderson, 2022/05/27
- [PATCH 023/114] target/arm: Rename do_zpzi_ool to gen_gvec_ool_arg_zpzi, Richard Henderson, 2022/05/27
- [PATCH 034/114] target/arm: Use TRANS_FEAT for do_sve2_fn_zzz, Richard Henderson, 2022/05/27
- [PATCH 035/114] target/arm: Use TRANS_FEAT for RAX1, Richard Henderson, 2022/05/27