qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Peter Maydell <peter.maydell@linaro.org>
To: qemu-devel@nongnu.org
Subject: [PULL 023/117] target/arm: Introduce gen_gvec_ool_arg_zpz
Date: Mon, 30 May 2022 17:05:34 +0100	[thread overview]
Message-ID: <20220530160708.726466-24-peter.maydell@linaro.org> (raw)
In-Reply-To: <20220530160708.726466-1-peter.maydell@linaro.org>

From: Richard Henderson <richard.henderson@linaro.org>

Use gen_gvec_ool_arg_zpz instead of gen_gvec_ool_zzp
when the arguments come from arg_rpr_esz.
Replaces do_zpz_ool.

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20220527181907.189259-21-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 | 45 +++++++++++++++++++++-----------------
 1 file changed, 25 insertions(+), 20 deletions(-)

diff --git a/target/arm/translate-sve.c b/target/arm/translate-sve.c
index e81c2de37f0..be426db6a93 100644
--- a/target/arm/translate-sve.c
+++ b/target/arm/translate-sve.c
@@ -222,6 +222,13 @@ static bool gen_gvec_ool_zzp(DisasContext *s, gen_helper_gvec_3 *fn,
     return true;
 }
 
+static bool gen_gvec_ool_arg_zpz(DisasContext *s, gen_helper_gvec_3 *fn,
+                                 arg_rpr_esz *a, int data)
+{
+    return gen_gvec_ool_zzp(s, fn, a->rd, a->rn, a->pg, data);
+}
+
+
 /* 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,
                               int rd, int rn, int rm, int pg, int data)
@@ -805,11 +812,6 @@ static bool trans_SEL_zpzz(DisasContext *s, arg_rprr_esz *a)
  *** SVE Integer Arithmetic - Unary Predicated Group
  */
 
-static bool do_zpz_ool(DisasContext *s, arg_rpr_esz *a, gen_helper_gvec_3 *fn)
-{
-    return gen_gvec_ool_zzp(s, fn, a->rd, a->rn, a->pg, 0);
-}
-
 #define DO_ZPZ(NAME, name) \
 static bool trans_##NAME(DisasContext *s, arg_rpr_esz *a)           \
 {                                                                   \
@@ -817,7 +819,7 @@ static bool trans_##NAME(DisasContext *s, arg_rpr_esz *a)           \
         gen_helper_sve_##name##_b, gen_helper_sve_##name##_h,       \
         gen_helper_sve_##name##_s, gen_helper_sve_##name##_d,       \
     };                                                              \
-    return do_zpz_ool(s, a, fns[a->esz]);                           \
+    return gen_gvec_ool_arg_zpz(s, fns[a->esz], a, 0);              \
 }
 
 DO_ZPZ(CLS, cls)
@@ -836,7 +838,7 @@ static bool trans_FABS(DisasContext *s, arg_rpr_esz *a)
         gen_helper_sve_fabs_s,
         gen_helper_sve_fabs_d
     };
-    return do_zpz_ool(s, a, fns[a->esz]);
+    return gen_gvec_ool_arg_zpz(s, fns[a->esz], a, 0);
 }
 
 static bool trans_FNEG(DisasContext *s, arg_rpr_esz *a)
@@ -847,7 +849,7 @@ static bool trans_FNEG(DisasContext *s, arg_rpr_esz *a)
         gen_helper_sve_fneg_s,
         gen_helper_sve_fneg_d
     };
-    return do_zpz_ool(s, a, fns[a->esz]);
+    return gen_gvec_ool_arg_zpz(s, fns[a->esz], a, 0);
 }
 
 static bool trans_SXTB(DisasContext *s, arg_rpr_esz *a)
@@ -858,7 +860,7 @@ static bool trans_SXTB(DisasContext *s, arg_rpr_esz *a)
         gen_helper_sve_sxtb_s,
         gen_helper_sve_sxtb_d
     };
-    return do_zpz_ool(s, a, fns[a->esz]);
+    return gen_gvec_ool_arg_zpz(s, fns[a->esz], a, 0);
 }
 
 static bool trans_UXTB(DisasContext *s, arg_rpr_esz *a)
@@ -869,7 +871,7 @@ static bool trans_UXTB(DisasContext *s, arg_rpr_esz *a)
         gen_helper_sve_uxtb_s,
         gen_helper_sve_uxtb_d
     };
-    return do_zpz_ool(s, a, fns[a->esz]);
+    return gen_gvec_ool_arg_zpz(s, fns[a->esz], a, 0);
 }
 
 static bool trans_SXTH(DisasContext *s, arg_rpr_esz *a)
@@ -879,7 +881,7 @@ static bool trans_SXTH(DisasContext *s, arg_rpr_esz *a)
         gen_helper_sve_sxth_s,
         gen_helper_sve_sxth_d
     };
-    return do_zpz_ool(s, a, fns[a->esz]);
+    return gen_gvec_ool_arg_zpz(s, fns[a->esz], a, 0);
 }
 
 static bool trans_UXTH(DisasContext *s, arg_rpr_esz *a)
@@ -889,17 +891,19 @@ static bool trans_UXTH(DisasContext *s, arg_rpr_esz *a)
         gen_helper_sve_uxth_s,
         gen_helper_sve_uxth_d
     };
-    return do_zpz_ool(s, a, fns[a->esz]);
+    return gen_gvec_ool_arg_zpz(s, fns[a->esz], a, 0);
 }
 
 static bool trans_SXTW(DisasContext *s, arg_rpr_esz *a)
 {
-    return do_zpz_ool(s, a, a->esz == 3 ? gen_helper_sve_sxtw_d : NULL);
+    return gen_gvec_ool_arg_zpz(s, a->esz == 3 ? gen_helper_sve_sxtw_d
+                                : NULL, a, 0);
 }
 
 static bool trans_UXTW(DisasContext *s, arg_rpr_esz *a)
 {
-    return do_zpz_ool(s, a, a->esz == 3 ? gen_helper_sve_uxtw_d : NULL);
+    return gen_gvec_ool_arg_zpz(s, a->esz == 3 ? gen_helper_sve_uxtw_d
+                                : NULL, a, 0);
 }
 
 #undef DO_ZPZ
@@ -2659,7 +2663,7 @@ static bool trans_COMPACT(DisasContext *s, arg_rpr_esz *a)
     static gen_helper_gvec_3 * const fns[4] = {
         NULL, NULL, gen_helper_sve_compact_s, gen_helper_sve_compact_d
     };
-    return do_zpz_ool(s, a, fns[a->esz]);
+    return gen_gvec_ool_arg_zpz(s, fns[a->esz], a, 0);
 }
 
 /* Call the helper that computes the ARM LastActiveElement pseudocode
@@ -3008,7 +3012,7 @@ static bool trans_REVB(DisasContext *s, arg_rpr_esz *a)
         gen_helper_sve_revb_s,
         gen_helper_sve_revb_d,
     };
-    return do_zpz_ool(s, a, fns[a->esz]);
+    return gen_gvec_ool_arg_zpz(s, fns[a->esz], a, 0);
 }
 
 static bool trans_REVH(DisasContext *s, arg_rpr_esz *a)
@@ -3019,12 +3023,13 @@ static bool trans_REVH(DisasContext *s, arg_rpr_esz *a)
         gen_helper_sve_revh_s,
         gen_helper_sve_revh_d,
     };
-    return do_zpz_ool(s, a, fns[a->esz]);
+    return gen_gvec_ool_arg_zpz(s, fns[a->esz], a, 0);
 }
 
 static bool trans_REVW(DisasContext *s, arg_rpr_esz *a)
 {
-    return do_zpz_ool(s, a, a->esz == 3 ? gen_helper_sve_revw_d : NULL);
+    return gen_gvec_ool_arg_zpz(s, a->esz == 3 ? gen_helper_sve_revw_d
+                                : NULL, a, 0);
 }
 
 static bool trans_RBIT(DisasContext *s, arg_rpr_esz *a)
@@ -3035,7 +3040,7 @@ static bool trans_RBIT(DisasContext *s, arg_rpr_esz *a)
         gen_helper_sve_rbit_s,
         gen_helper_sve_rbit_d,
     };
-    return do_zpz_ool(s, a, fns[a->esz]);
+    return gen_gvec_ool_arg_zpz(s, fns[a->esz], a, 0);
 }
 
 static bool trans_SPLICE(DisasContext *s, arg_rprr_esz *a)
@@ -6624,7 +6629,7 @@ static bool do_sve2_zpz_ool(DisasContext *s, arg_rpr_esz *a,
     if (!dc_isar_feature(aa64_sve2, s)) {
         return false;
     }
-    return do_zpz_ool(s, a, fn);
+    return gen_gvec_ool_arg_zpz(s, fn, a, 0);
 }
 
 static bool trans_URECPE(DisasContext *s, arg_rpr_esz *a)
-- 
2.25.1



  parent reply	other threads:[~2022-05-30 16:36 UTC|newest]

Thread overview: 101+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-30 16:05 [PULL 000/117] target-arm queue Peter Maydell
2022-05-30 16:05 ` [PULL 001/117] docs/system/arm: Add FEAT_HCX to list of emulated features Peter Maydell
2022-05-30 16:05 ` [PULL 002/117] target/arm/hvf: Include missing "cpregs.h" Peter Maydell
2022-05-30 16:05 ` [PULL 003/117] hw/sd/allwinner-sdhost: report FIFO water level as 1 when data ready Peter Maydell
2022-05-30 16:05 ` [PULL 004/117] target/arm: Introduce TRANS, TRANS_FEAT Peter Maydell
2022-05-30 16:05 ` [PULL 005/117] target/arm: Move null function and sve check into gen_gvec_ool_zz Peter Maydell
2022-05-30 16:05 ` [PULL 006/117] target/arm: Use TRANS_FEAT for gen_gvec_ool_zz Peter Maydell
2022-05-30 16:05 ` [PULL 007/117] target/arm: Move null function and sve check into gen_gvec_ool_zzz Peter Maydell
2022-05-30 16:05 ` [PULL 008/117] target/arm: Introduce gen_gvec_ool_arg_zzz Peter Maydell
2022-05-30 16:05 ` [PULL 009/117] target/arm: Use TRANS_FEAT for gen_gvec_ool_arg_zzz Peter Maydell
2022-05-30 16:05 ` [PULL 010/117] target/arm: Use TRANS_FEAT for do_sve2_zzz_ool Peter Maydell
2022-05-30 16:05 ` [PULL 011/117] target/arm: Move null function and sve check into gen_gvec_ool_zzzz Peter Maydell
2022-05-30 16:05 ` [PULL 012/117] target/arm: Use TRANS_FEAT for gen_gvec_ool_zzzz Peter Maydell
2022-05-30 16:05 ` [PULL 013/117] target/arm: Introduce gen_gvec_ool_arg_zzzz Peter Maydell
2022-05-30 16:05 ` [PULL 014/117] target/arm: Use TRANS_FEAT for do_sve2_zzzz_ool Peter Maydell
2022-05-30 16:05 ` [PULL 015/117] target/arm: Use TRANS_FEAT for gen_gvec_ool_arg_zzzz Peter Maydell
2022-05-30 16:05 ` [PULL 016/117] target/arm: Rename do_zzxz_ool to gen_gvec_ool_arg_zzxz Peter Maydell
2022-05-30 16:05 ` [PULL 017/117] target/arm: Use TRANS_FEAT for gen_gvec_ool_arg_zzxz Peter Maydell
2022-05-30 16:05 ` [PULL 018/117] target/arm: Use TRANS_FEAT for do_sve2_zzz_data Peter Maydell
2022-05-30 16:05 ` [PULL 019/117] target/arm: Use TRANS_FEAT for do_sve2_zzzz_data Peter Maydell
2022-05-30 16:05 ` [PULL 020/117] target/arm: Use TRANS_FEAT for do_sve2_zzw_data Peter Maydell
2022-05-30 16:05 ` [PULL 021/117] target/arm: Use TRANS_FEAT for USDOT_zzzz Peter Maydell
2022-05-30 16:05 ` [PULL 022/117] target/arm: Move null function and sve check into gen_gvec_ool_zzp Peter Maydell
2022-05-30 16:05 ` Peter Maydell [this message]
2022-05-30 16:05 ` [PULL 024/117] target/arm: Use TRANS_FEAT for gen_gvec_ool_arg_zpz Peter Maydell
2022-05-30 16:05 ` [PULL 025/117] target/arm: Use TRANS_FEAT for do_sve2_zpz_data Peter Maydell
2022-05-30 16:05 ` [PULL 026/117] target/arm: Rename do_zpzi_ool to gen_gvec_ool_arg_zpzi Peter Maydell
2022-05-30 16:05 ` [PULL 027/117] target/arm: Use TRANS_FEAT for gen_gvec_ool_arg_zpzi Peter Maydell
2022-05-30 16:05 ` [PULL 028/117] target/arm: Move null function and sve check into gen_gvec_ool_zzzp Peter Maydell
2022-05-30 16:05 ` [PULL 029/117] target/arm: Introduce gen_gvec_ool_arg_zpzz Peter Maydell
2022-05-30 16:05 ` [PULL 030/117] target/arm: Use TRANS_FEAT for gen_gvec_ool_arg_zpzz Peter Maydell
2022-05-30 16:05 ` [PULL 031/117] target/arm: Use TRANS_FEAT for do_sve2_zpzz_ool Peter Maydell
2022-05-30 16:05 ` [PULL 032/117] target/arm: Merge gen_gvec_fn_zz into do_mov_z Peter Maydell
2022-05-30 16:05 ` [PULL 033/117] target/arm: Move null function and sve check into gen_gvec_fn_zzz Peter Maydell
2022-05-30 16:05 ` [PULL 034/117] target/arm: Rename do_zzz_fn to gen_gvec_fn_arg_zzz Peter Maydell
2022-05-30 16:05 ` [PULL 035/117] target/arm: More use of gen_gvec_fn_arg_zzz Peter Maydell
2022-05-30 16:05 ` [PULL 036/117] target/arm: Use TRANS_FEAT for gen_gvec_fn_arg_zzz Peter Maydell
2022-05-30 16:05 ` [PULL 037/117] target/arm: Use TRANS_FEAT for do_sve2_fn_zzz Peter Maydell
2022-05-30 16:05 ` [PULL 038/117] target/arm: Use TRANS_FEAT for RAX1 Peter Maydell
2022-05-30 16:05 ` [PULL 039/117] target/arm: Introduce gen_gvec_fn_arg_zzzz Peter Maydell
2022-05-30 16:05 ` [PULL 040/117] target/arm: Use TRANS_FEAT for do_sve2_zzzz_fn Peter Maydell
2022-05-30 16:05 ` [PULL 041/117] target/arm: Introduce gen_gvec_fn_zzi Peter Maydell
2022-05-30 16:05 ` [PULL 042/117] target/arm: Use TRANS_FEAT for do_zz_dbm Peter Maydell
2022-05-30 16:05 ` [PULL 043/117] target/arm: Hoist sve access check through do_sel_z Peter Maydell
2022-05-30 16:05 ` [PULL 044/117] target/arm: Introduce gen_gvec_fn_arg_zzi Peter Maydell
2022-05-30 16:05 ` [PULL 045/117] target/arm: Use TRANS_FEAT for do_sve2_fn2i Peter Maydell
2022-05-30 16:05 ` [PULL 046/117] target/arm: Use TRANS_FEAT for do_vpz_ool Peter Maydell
2022-05-30 16:05 ` [PULL 047/117] target/arm: Use TRANS_FEAT for do_shift_imm Peter Maydell
2022-05-30 16:05 ` [PULL 048/117] target/arm: Introduce do_shift_zpzi Peter Maydell
2022-05-30 16:06 ` [PULL 049/117] target/arm: Use TRANS_FEAT for do_shift_zpzi Peter Maydell
2022-05-30 16:06 ` [PULL 050/117] target/arm: Use TRANS_FEAT for do_zpzzz_ool Peter Maydell
2022-05-30 16:06 ` [PULL 051/117] target/arm: Move sve check into do_index Peter Maydell
2022-05-30 16:06 ` [PULL 052/117] target/arm: Use TRANS_FEAT for do_index Peter Maydell
2022-05-30 16:06 ` [PULL 053/117] target/arm: Use TRANS_FEAT for do_adr Peter Maydell
2022-05-30 16:06 ` [PULL 054/117] target/arm: Use TRANS_FEAT for do_predset Peter Maydell
2022-05-30 16:06 ` [PULL 055/117] target/arm: Use TRANS_FEAT for RDFFR, WRFFR Peter Maydell
2022-05-30 16:06 ` [PULL 056/117] target/arm: Use TRANS_FEAT for do_pfirst_pnext Peter Maydell
2022-05-30 16:06 ` [PULL 057/117] target/arm: Use TRANS_FEAT for do_EXT Peter Maydell
2022-05-30 16:06 ` [PULL 058/117] target/arm: Use TRANS_FEAT for do_perm_pred3 Peter Maydell
2022-05-30 16:06 ` [PULL 059/117] target/arm: Use TRANS_FEAT for do_perm_pred2 Peter Maydell
2022-05-30 16:06 ` [PULL 060/117] target/arm: Move sve zip high_ofs into simd_data Peter Maydell
2022-05-30 16:06 ` [PULL 061/117] target/arm: Use gen_gvec_ool_arg_zzz for do_zip, do_zip_q Peter Maydell
2022-05-30 16:06 ` [PULL 062/117] target/arm: Use TRANS_FEAT " Peter Maydell
2022-05-30 16:06 ` [PULL 063/117] target/arm: Use TRANS_FEAT for do_clast_vector Peter Maydell
2022-05-30 16:06 ` [PULL 064/117] target/arm: Use TRANS_FEAT for do_clast_fp Peter Maydell
2022-05-30 16:06 ` [PULL 065/117] target/arm: Use TRANS_FEAT for do_clast_general Peter Maydell
2022-05-30 16:06 ` [PULL 066/117] target/arm: Use TRANS_FEAT for do_last_fp Peter Maydell
2022-05-30 16:06 ` [PULL 067/117] target/arm: Use TRANS_FEAT for do_last_general Peter Maydell
2022-05-30 16:06 ` [PULL 068/117] target/arm: Use TRANS_FEAT for SPLICE Peter Maydell
2022-05-30 16:06 ` [PULL 069/117] target/arm: Use TRANS_FEAT for do_ppzz_flags Peter Maydell
2022-05-30 16:06 ` [PULL 070/117] target/arm: Use TRANS_FEAT for do_sve2_ppzz_flags Peter Maydell
2022-05-30 16:06 ` [PULL 071/117] target/arm: Use TRANS_FEAT for do_ppzi_flags Peter Maydell
2022-05-30 16:06 ` [PULL 072/117] target/arm: Use TRANS_FEAT for do_brk2, do_brk3 Peter Maydell
2022-05-30 16:06 ` [PULL 073/117] target/arm: Use TRANS_FEAT for MUL_zzi Peter Maydell
2022-05-30 16:06 ` [PULL 074/117] target/arm: Reject dup_i w/ shifted byte early Peter Maydell
2022-05-30 16:06 ` [PULL 075/117] target/arm: Reject add/sub " Peter Maydell
2022-05-30 16:06 ` [PULL 076/117] target/arm: Reject copy " Peter Maydell
2022-05-30 16:06 ` [PULL 077/117] target/arm: Use TRANS_FEAT for ADD_zzi Peter Maydell
2022-05-30 16:06 ` [PULL 078/117] target/arm: Use TRANS_FEAT for do_zzi_sat Peter Maydell
2022-05-30 16:06 ` [PULL 079/117] target/arm: Use TRANS_FEAT for do_zzi_ool Peter Maydell
2022-05-30 16:06 ` [PULL 080/117] target/arm: Introduce gen_gvec_{ptr,fpst}_zzzz Peter Maydell
2022-05-30 16:06 ` [PULL 081/117] target/arm: Use TRANS_FEAT for FMMLA Peter Maydell
2022-05-30 16:06 ` [PULL 082/117] target/arm: Move sve check into gen_gvec_fn_ppp Peter Maydell
2022-05-30 16:06 ` [PULL 083/117] target/arm: Implement NOT (prediates) alias Peter Maydell
2022-05-30 16:06 ` [PULL 084/117] target/arm: Use TRANS_FEAT for SEL_zpzz Peter Maydell
2022-05-30 16:06 ` [PULL 085/117] target/arm: Use TRANS_FEAT for MOVPRFX Peter Maydell
2022-05-30 16:06 ` [PULL 086/117] target/arm: Use TRANS_FEAT for FMLA Peter Maydell
2022-05-30 16:06 ` [PULL 087/117] target/arm: Use TRANS_FEAT for BFMLA Peter Maydell
2022-05-30 16:06 ` [PULL 088/117] target/arm: Rename do_zzz_fp to gen_gvec_ool_fpst_arg_zzz Peter Maydell
2022-05-30 16:06 ` [PULL 089/117] target/arm: Use TRANS_FEAT for DO_FP3 Peter Maydell
2022-05-30 16:06 ` [PULL 090/117] target/arm: Use TRANS_FEAT for FMUL_zzx Peter Maydell
2022-05-30 16:06 ` [PULL 091/117] target/arm: Use TRANS_FEAT for FTMAD Peter Maydell
2022-05-30 16:06 ` [PULL 092/117] target/arm: Move null function and sve check into do_reduce Peter Maydell
2022-05-30 16:06 ` [PULL 093/117] target/arm: Use TRANS_FEAT for do_reduce Peter Maydell
2022-05-30 16:06 ` [PULL 094/117] target/arm: Use TRANS_FEAT for FRECPE, FRSQRTE Peter Maydell
2022-05-30 16:06 ` [PULL 095/117] target/arm: Expand frint_fns for MO_8 Peter Maydell
2022-05-30 16:06 ` [PULL 096/117] target/arm: Rename do_zpz_ptr to gen_gvec_ool_fpst_arg_zpz Peter Maydell
2022-05-30 16:06 ` [PULL 097/117] target/arm: Move null function and sve check into do_frint_mode Peter Maydell
2022-05-30 16:06 ` [PULL 098/117] target/arm: Use TRANS_FEAT for do_frint_mode Peter Maydell
2022-05-30 16:06 ` [PULL 099/117] target/arm: Use TRANS_FEAT for FLOGB Peter Maydell
2022-05-30 19:39 ` [PULL 000/117] target-arm queue Richard Henderson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220530160708.726466-24-peter.maydell@linaro.org \
    --to=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).