All of lore.kernel.org
 help / color / mirror / Atom feed
From: Richard Henderson <richard.henderson@linaro.org>
To: qemu-devel@nongnu.org
Cc: qemu-arm@nongnu.org
Subject: [PATCH 113/114] target/arm: Add sve feature check for remaining trans_* functions
Date: Fri, 27 May 2022 11:19:06 -0700	[thread overview]
Message-ID: <20220527181907.189259-114-richard.henderson@linaro.org> (raw)
In-Reply-To: <20220527181907.189259-1-richard.henderson@linaro.org>

For all remaining trans_* functions that do not already
have a check, add one now.

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
 target/arm/translate-sve.c | 177 ++++++++++++++++++++++++++++++++++---
 1 file changed, 163 insertions(+), 14 deletions(-)

diff --git a/target/arm/translate-sve.c b/target/arm/translate-sve.c
index 5fb66547ec..836511d719 100644
--- a/target/arm/translate-sve.c
+++ b/target/arm/translate-sve.c
@@ -1311,6 +1311,9 @@ TRANS_FEAT(INDEX_rr, aa64_sve, do_index, a->esz, a->rd,
 
 static bool trans_ADDVL(DisasContext *s, arg_ADDVL *a)
 {
+    if (!dc_isar_feature(aa64_sve, s)) {
+        return false;
+    }
     if (sve_access_check(s)) {
         TCGv_i64 rd = cpu_reg_sp(s, a->rd);
         TCGv_i64 rn = cpu_reg_sp(s, a->rn);
@@ -1321,6 +1324,9 @@ static bool trans_ADDVL(DisasContext *s, arg_ADDVL *a)
 
 static bool trans_ADDPL(DisasContext *s, arg_ADDPL *a)
 {
+    if (!dc_isar_feature(aa64_sve, s)) {
+        return false;
+    }
     if (sve_access_check(s)) {
         TCGv_i64 rd = cpu_reg_sp(s, a->rd);
         TCGv_i64 rn = cpu_reg_sp(s, a->rn);
@@ -1331,6 +1337,9 @@ static bool trans_ADDPL(DisasContext *s, arg_ADDPL *a)
 
 static bool trans_RDVL(DisasContext *s, arg_RDVL *a)
 {
+    if (!dc_isar_feature(aa64_sve, s)) {
+        return false;
+    }
     if (sve_access_check(s)) {
         TCGv_i64 reg = cpu_reg(s, a->rd);
         tcg_gen_movi_i64(reg, a->imm * vec_full_reg_size(s));
@@ -1451,6 +1460,9 @@ static bool trans_AND_pppp(DisasContext *s, arg_rprr_s *a)
         .prefer_i64 = TCG_TARGET_REG_BITS == 64,
     };
 
+    if (!dc_isar_feature(aa64_sve, s)) {
+        return false;
+    }
     if (!a->s) {
         if (a->rn == a->rm) {
             if (a->pg == a->rn) {
@@ -1486,6 +1498,9 @@ static bool trans_BIC_pppp(DisasContext *s, arg_rprr_s *a)
         .prefer_i64 = TCG_TARGET_REG_BITS == 64,
     };
 
+    if (!dc_isar_feature(aa64_sve, s)) {
+        return false;
+    }
     if (!a->s && a->pg == a->rn) {
         return gen_gvec_fn_ppp(s, tcg_gen_gvec_andc, a->rd, a->rn, a->rm);
     }
@@ -1514,6 +1529,9 @@ static bool trans_EOR_pppp(DisasContext *s, arg_rprr_s *a)
         .prefer_i64 = TCG_TARGET_REG_BITS == 64,
     };
 
+    if (!dc_isar_feature(aa64_sve, s)) {
+        return false;
+    }
     /* Alias NOT (predicate) is EOR Pd.B, Pg/Z, Pn.B, Pg.B */
     if (!a->s && a->pg == a->rm) {
         return gen_gvec_fn_ppp(s, tcg_gen_gvec_andc, a->rd, a->pg, a->rn);
@@ -1523,7 +1541,7 @@ static bool trans_EOR_pppp(DisasContext *s, arg_rprr_s *a)
 
 static bool trans_SEL_pppp(DisasContext *s, arg_rprr_s *a)
 {
-    if (a->s) {
+    if (a->s || !dc_isar_feature(aa64_sve, s)) {
         return false;
     }
     if (sve_access_check(s)) {
@@ -1558,6 +1576,9 @@ static bool trans_ORR_pppp(DisasContext *s, arg_rprr_s *a)
         .prefer_i64 = TCG_TARGET_REG_BITS == 64,
     };
 
+    if (!dc_isar_feature(aa64_sve, s)) {
+        return false;
+    }
     if (!a->s && a->pg == a->rn && a->rn == a->rm) {
         return do_mov_p(s, a->rd, a->rn);
     }
@@ -1585,6 +1606,10 @@ static bool trans_ORN_pppp(DisasContext *s, arg_rprr_s *a)
         .fno = gen_helper_sve_orn_pppp,
         .prefer_i64 = TCG_TARGET_REG_BITS == 64,
     };
+
+    if (!dc_isar_feature(aa64_sve, s)) {
+        return false;
+    }
     return do_pppp_flags(s, a, &op);
 }
 
@@ -1609,6 +1634,10 @@ static bool trans_NOR_pppp(DisasContext *s, arg_rprr_s *a)
         .fno = gen_helper_sve_nor_pppp,
         .prefer_i64 = TCG_TARGET_REG_BITS == 64,
     };
+
+    if (!dc_isar_feature(aa64_sve, s)) {
+        return false;
+    }
     return do_pppp_flags(s, a, &op);
 }
 
@@ -1633,6 +1662,10 @@ static bool trans_NAND_pppp(DisasContext *s, arg_rprr_s *a)
         .fno = gen_helper_sve_nand_pppp,
         .prefer_i64 = TCG_TARGET_REG_BITS == 64,
     };
+
+    if (!dc_isar_feature(aa64_sve, s)) {
+        return false;
+    }
     return do_pppp_flags(s, a, &op);
 }
 
@@ -1642,6 +1675,9 @@ static bool trans_NAND_pppp(DisasContext *s, arg_rprr_s *a)
 
 static bool trans_PTEST(DisasContext *s, arg_PTEST *a)
 {
+    if (!dc_isar_feature(aa64_sve, s)) {
+        return false;
+    }
     if (sve_access_check(s)) {
         int nofs = pred_full_reg_offset(s, a->rn);
         int gofs = pred_full_reg_offset(s, a->pg);
@@ -1998,6 +2034,9 @@ static void do_sat_addsub_vec(DisasContext *s, int esz, int rd, int rn,
 
 static bool trans_CNT_r(DisasContext *s, arg_CNT_r *a)
 {
+    if (!dc_isar_feature(aa64_sve, s)) {
+        return false;
+    }
     if (sve_access_check(s)) {
         unsigned fullsz = vec_full_reg_size(s);
         unsigned numelem = decode_pred_count(fullsz, a->pat, a->esz);
@@ -2008,6 +2047,9 @@ static bool trans_CNT_r(DisasContext *s, arg_CNT_r *a)
 
 static bool trans_INCDEC_r(DisasContext *s, arg_incdec_cnt *a)
 {
+    if (!dc_isar_feature(aa64_sve, s)) {
+        return false;
+    }
     if (sve_access_check(s)) {
         unsigned fullsz = vec_full_reg_size(s);
         unsigned numelem = decode_pred_count(fullsz, a->pat, a->esz);
@@ -2021,6 +2063,9 @@ static bool trans_INCDEC_r(DisasContext *s, arg_incdec_cnt *a)
 
 static bool trans_SINCDEC_r_32(DisasContext *s, arg_incdec_cnt *a)
 {
+    if (!dc_isar_feature(aa64_sve, s)) {
+        return false;
+    }
     if (!sve_access_check(s)) {
         return true;
     }
@@ -2045,6 +2090,9 @@ static bool trans_SINCDEC_r_32(DisasContext *s, arg_incdec_cnt *a)
 
 static bool trans_SINCDEC_r_64(DisasContext *s, arg_incdec_cnt *a)
 {
+    if (!dc_isar_feature(aa64_sve, s)) {
+        return false;
+    }
     if (!sve_access_check(s)) {
         return true;
     }
@@ -2062,7 +2110,7 @@ static bool trans_SINCDEC_r_64(DisasContext *s, arg_incdec_cnt *a)
 
 static bool trans_INCDEC_v(DisasContext *s, arg_incdec2_cnt *a)
 {
-    if (a->esz == 0) {
+    if (a->esz == 0 || !dc_isar_feature(aa64_sve, s)) {
         return false;
     }
 
@@ -2085,7 +2133,7 @@ static bool trans_INCDEC_v(DisasContext *s, arg_incdec2_cnt *a)
 
 static bool trans_SINCDEC_v(DisasContext *s, arg_incdec2_cnt *a)
 {
-    if (a->esz == 0) {
+    if (a->esz == 0 || !dc_isar_feature(aa64_sve, s)) {
         return false;
     }
 
@@ -2126,6 +2174,10 @@ TRANS_FEAT(EOR_zzi, aa64_sve, do_zz_dbm, a, tcg_gen_gvec_xori)
 static bool trans_DUPM(DisasContext *s, arg_DUPM *a)
 {
     uint64_t imm;
+
+    if (!dc_isar_feature(aa64_sve, s)) {
+        return false;
+    }
     if (!logic_imm_decode_wmask(&imm, extract32(a->dbm, 12, 1),
                                 extract32(a->dbm, 0, 6),
                                 extract32(a->dbm, 6, 6))) {
@@ -2171,7 +2223,7 @@ static void do_cpy_m(DisasContext *s, int esz, int rd, int rn, int pg,
 
 static bool trans_FCPY(DisasContext *s, arg_FCPY *a)
 {
-    if (a->esz == 0) {
+    if (a->esz == 0 || !dc_isar_feature(aa64_sve, s)) {
         return false;
     }
     if (sve_access_check(s)) {
@@ -2184,6 +2236,9 @@ static bool trans_FCPY(DisasContext *s, arg_FCPY *a)
 
 static bool trans_CPY_m_i(DisasContext *s, arg_rpri_esz *a)
 {
+    if (!dc_isar_feature(aa64_sve, s)) {
+        return false;
+    }
     if (sve_access_check(s)) {
         do_cpy_m(s, a->esz, a->rd, a->rn, a->pg, tcg_constant_i64(a->imm));
     }
@@ -2197,6 +2252,9 @@ static bool trans_CPY_z_i(DisasContext *s, arg_CPY_z_i *a)
         gen_helper_sve_cpy_z_s, gen_helper_sve_cpy_z_d,
     };
 
+    if (!dc_isar_feature(aa64_sve, s)) {
+        return false;
+    }
     if (sve_access_check(s)) {
         unsigned vsz = vec_full_reg_size(s);
         tcg_gen_gvec_2i_ool(vec_full_reg_offset(s, a->rd),
@@ -2250,6 +2308,9 @@ TRANS_FEAT(EXT_sve2, aa64_sve2, do_EXT, a->rd, a->rn, (a->rn + 1) % 32, a->imm)
 
 static bool trans_DUP_s(DisasContext *s, arg_DUP_s *a)
 {
+    if (!dc_isar_feature(aa64_sve, s)) {
+        return false;
+    }
     if (sve_access_check(s)) {
         unsigned vsz = vec_full_reg_size(s);
         tcg_gen_gvec_dup_i64(a->esz, vec_full_reg_offset(s, a->rd),
@@ -2260,6 +2321,9 @@ static bool trans_DUP_s(DisasContext *s, arg_DUP_s *a)
 
 static bool trans_DUP_x(DisasContext *s, arg_DUP_x *a)
 {
+    if (!dc_isar_feature(aa64_sve, s)) {
+        return false;
+    }
     if ((a->imm & 0x1f) == 0) {
         return false;
     }
@@ -2308,6 +2372,9 @@ static void do_insr_i64(DisasContext *s, arg_rrr_esz *a, TCGv_i64 val)
 
 static bool trans_INSR_f(DisasContext *s, arg_rrr_esz *a)
 {
+    if (!dc_isar_feature(aa64_sve, s)) {
+        return false;
+    }
     if (sve_access_check(s)) {
         TCGv_i64 t = tcg_temp_new_i64();
         tcg_gen_ld_i64(t, cpu_env, vec_reg_offset(s, a->rm, 0, MO_64));
@@ -2319,6 +2386,9 @@ static bool trans_INSR_f(DisasContext *s, arg_rrr_esz *a)
 
 static bool trans_INSR_r(DisasContext *s, arg_rrr_esz *a)
 {
+    if (!dc_isar_feature(aa64_sve, s)) {
+        return false;
+    }
     if (sve_access_check(s)) {
         do_insr_i64(s, a, cpu_reg(s, a->rm));
     }
@@ -2359,7 +2429,7 @@ static bool trans_UNPK(DisasContext *s, arg_UNPK *a)
         { gen_helper_sve_sunpk_d, gen_helper_sve_uunpk_d },
     };
 
-    if (a->esz == 0) {
+    if (a->esz == 0 || !dc_isar_feature(aa64_sve, s)) {
         return false;
     }
     if (sve_access_check(s)) {
@@ -2787,6 +2857,9 @@ TRANS_FEAT(LASTB_r, aa64_sve, do_last_general, a, true)
 
 static bool trans_CPY_m_r(DisasContext *s, arg_rpr_esz *a)
 {
+    if (!dc_isar_feature(aa64_sve, s)) {
+        return false;
+    }
     if (sve_access_check(s)) {
         do_cpy_m(s, a->esz, a->rd, a->rd, a->pg, cpu_reg_sp(s, a->rn));
     }
@@ -2795,6 +2868,9 @@ static bool trans_CPY_m_r(DisasContext *s, arg_rpr_esz *a)
 
 static bool trans_CPY_m_v(DisasContext *s, arg_rpr_esz *a)
 {
+    if (!dc_isar_feature(aa64_sve, s)) {
+        return false;
+    }
     if (sve_access_check(s)) {
         int ofs = vec_reg_offset(s, a->rn, 0, a->esz);
         TCGv_i64 t = load_esz(cpu_env, ofs, a->esz);
@@ -3102,6 +3178,9 @@ static void do_cntp(DisasContext *s, TCGv_i64 val, int esz, int pn, int pg)
 
 static bool trans_CNTP(DisasContext *s, arg_CNTP *a)
 {
+    if (!dc_isar_feature(aa64_sve, s)) {
+        return false;
+    }
     if (sve_access_check(s)) {
         do_cntp(s, cpu_reg(s, a->rd), a->esz, a->rn, a->pg);
     }
@@ -3110,6 +3189,9 @@ static bool trans_CNTP(DisasContext *s, arg_CNTP *a)
 
 static bool trans_INCDECP_r(DisasContext *s, arg_incdec_pred *a)
 {
+    if (!dc_isar_feature(aa64_sve, s)) {
+        return false;
+    }
     if (sve_access_check(s)) {
         TCGv_i64 reg = cpu_reg(s, a->rd);
         TCGv_i64 val = tcg_temp_new_i64();
@@ -3127,7 +3209,7 @@ static bool trans_INCDECP_r(DisasContext *s, arg_incdec_pred *a)
 
 static bool trans_INCDECP_z(DisasContext *s, arg_incdec2_pred *a)
 {
-    if (a->esz == 0) {
+    if (a->esz == 0 || !dc_isar_feature(aa64_sve, s)) {
         return false;
     }
     if (sve_access_check(s)) {
@@ -3144,6 +3226,9 @@ static bool trans_INCDECP_z(DisasContext *s, arg_incdec2_pred *a)
 
 static bool trans_SINCDECP_r_32(DisasContext *s, arg_incdec_pred *a)
 {
+    if (!dc_isar_feature(aa64_sve, s)) {
+        return false;
+    }
     if (sve_access_check(s)) {
         TCGv_i64 reg = cpu_reg(s, a->rd);
         TCGv_i64 val = tcg_temp_new_i64();
@@ -3156,6 +3241,9 @@ static bool trans_SINCDECP_r_32(DisasContext *s, arg_incdec_pred *a)
 
 static bool trans_SINCDECP_r_64(DisasContext *s, arg_incdec_pred *a)
 {
+    if (!dc_isar_feature(aa64_sve, s)) {
+        return false;
+    }
     if (sve_access_check(s)) {
         TCGv_i64 reg = cpu_reg(s, a->rd);
         TCGv_i64 val = tcg_temp_new_i64();
@@ -3168,7 +3256,7 @@ static bool trans_SINCDECP_r_64(DisasContext *s, arg_incdec_pred *a)
 
 static bool trans_SINCDECP_z(DisasContext *s, arg_incdec2_pred *a)
 {
-    if (a->esz == 0) {
+    if (a->esz == 0 || !dc_isar_feature(aa64_sve, s)) {
         return false;
     }
     if (sve_access_check(s)) {
@@ -3185,6 +3273,9 @@ static bool trans_SINCDECP_z(DisasContext *s, arg_incdec2_pred *a)
 
 static bool trans_CTERM(DisasContext *s, arg_CTERM *a)
 {
+    if (!dc_isar_feature(aa64_sve, s)) {
+        return false;
+    }
     if (!sve_access_check(s)) {
         return true;
     }
@@ -3221,7 +3312,9 @@ static bool trans_WHILE(DisasContext *s, arg_WHILE *a)
     bool eq = a->eq == a->lt;
 
     /* The greater-than conditions are all SVE2. */
-    if (!a->lt && !dc_isar_feature(aa64_sve2, s)) {
+    if (a->lt
+        ? !dc_isar_feature(aa64_sve, s)
+        : !dc_isar_feature(aa64_sve2, s)) {
         return false;
     }
     if (!sve_access_check(s)) {
@@ -3389,7 +3482,7 @@ static bool trans_WHILE_ptr(DisasContext *s, arg_WHILE_ptr *a)
 
 static bool trans_FDUP(DisasContext *s, arg_FDUP *a)
 {
-    if (a->esz == 0) {
+    if (a->esz == 0 || !dc_isar_feature(aa64_sve, s)) {
         return false;
     }
     if (sve_access_check(s)) {
@@ -3406,6 +3499,9 @@ static bool trans_FDUP(DisasContext *s, arg_FDUP *a)
 
 static bool trans_DUP_i(DisasContext *s, arg_DUP_i *a)
 {
+    if (!dc_isar_feature(aa64_sve, s)) {
+        return false;
+    }
     if (sve_access_check(s)) {
         unsigned vsz = vec_full_reg_size(s);
         int dofs = vec_full_reg_offset(s, a->rd);
@@ -3453,6 +3549,9 @@ static bool trans_SUBR_zzi(DisasContext *s, arg_rri_esz *a)
           .scalar_first = true }
     };
 
+    if (!dc_isar_feature(aa64_sve, s)) {
+        return false;
+    }
     if (sve_access_check(s)) {
         unsigned vsz = vec_full_reg_size(s);
         tcg_gen_gvec_2s(vec_full_reg_offset(s, a->rd),
@@ -3815,7 +3914,7 @@ static bool trans_FADDA(DisasContext *s, arg_rprr_esz *a)
     TCGv_i64 t_val;
     TCGv_i32 t_desc;
 
-    if (a->esz == 0) {
+    if (a->esz == 0 || !dc_isar_feature(aa64_sve, s)) {
         return false;
     }
     if (!sve_access_check(s)) {
@@ -4367,6 +4466,9 @@ static void do_str(DisasContext *s, uint32_t vofs, int len, int rn, int imm)
 
 static bool trans_LDR_zri(DisasContext *s, arg_rri *a)
 {
+    if (!dc_isar_feature(aa64_sve, s)) {
+        return false;
+    }
     if (sve_access_check(s)) {
         int size = vec_full_reg_size(s);
         int off = vec_full_reg_offset(s, a->rd);
@@ -4377,6 +4479,9 @@ static bool trans_LDR_zri(DisasContext *s, arg_rri *a)
 
 static bool trans_LDR_pri(DisasContext *s, arg_rri *a)
 {
+    if (!dc_isar_feature(aa64_sve, s)) {
+        return false;
+    }
     if (sve_access_check(s)) {
         int size = pred_full_reg_size(s);
         int off = pred_full_reg_offset(s, a->rd);
@@ -4387,6 +4492,9 @@ static bool trans_LDR_pri(DisasContext *s, arg_rri *a)
 
 static bool trans_STR_zri(DisasContext *s, arg_rri *a)
 {
+    if (!dc_isar_feature(aa64_sve, s)) {
+        return false;
+    }
     if (sve_access_check(s)) {
         int size = vec_full_reg_size(s);
         int off = vec_full_reg_offset(s, a->rd);
@@ -4397,6 +4505,9 @@ static bool trans_STR_zri(DisasContext *s, arg_rri *a)
 
 static bool trans_STR_pri(DisasContext *s, arg_rri *a)
 {
+    if (!dc_isar_feature(aa64_sve, s)) {
+        return false;
+    }
     if (sve_access_check(s)) {
         int size = pred_full_reg_size(s);
         int off = pred_full_reg_offset(s, a->rd);
@@ -4597,7 +4708,7 @@ static void do_ld_zpa(DisasContext *s, int zt, int pg,
 
 static bool trans_LD_zprr(DisasContext *s, arg_rprr_load *a)
 {
-    if (a->rm == 31) {
+    if (a->rm == 31 || !dc_isar_feature(aa64_sve, s)) {
         return false;
     }
     if (sve_access_check(s)) {
@@ -4611,6 +4722,9 @@ static bool trans_LD_zprr(DisasContext *s, arg_rprr_load *a)
 
 static bool trans_LD_zpri(DisasContext *s, arg_rpri_load *a)
 {
+    if (!dc_isar_feature(aa64_sve, s)) {
+        return false;
+    }
     if (sve_access_check(s)) {
         int vsz = vec_full_reg_size(s);
         int elements = vsz >> dtype_esz[a->dtype];
@@ -4712,6 +4826,9 @@ static bool trans_LDFF1_zprr(DisasContext *s, arg_rprr_load *a)
             gen_helper_sve_ldff1dd_be_r_mte } },
     };
 
+    if (!dc_isar_feature(aa64_sve, s)) {
+        return false;
+    }
     if (sve_access_check(s)) {
         TCGv_i64 addr = new_tmp_a64(s);
         tcg_gen_shli_i64(addr, cpu_reg(s, a->rm), dtype_msz(a->dtype));
@@ -4810,6 +4927,9 @@ static bool trans_LDNF1_zpri(DisasContext *s, arg_rpri_load *a)
             gen_helper_sve_ldnf1dd_be_r_mte } },
     };
 
+    if (!dc_isar_feature(aa64_sve, s)) {
+        return false;
+    }
     if (sve_access_check(s)) {
         int vsz = vec_full_reg_size(s);
         int elements = vsz >> dtype_esz[a->dtype];
@@ -4867,7 +4987,7 @@ static void do_ldrq(DisasContext *s, int zt, int pg, TCGv_i64 addr, int dtype)
 
 static bool trans_LD1RQ_zprr(DisasContext *s, arg_rprr_load *a)
 {
-    if (a->rm == 31) {
+    if (a->rm == 31 || !dc_isar_feature(aa64_sve, s)) {
         return false;
     }
     if (sve_access_check(s)) {
@@ -4882,6 +5002,9 @@ static bool trans_LD1RQ_zprr(DisasContext *s, arg_rprr_load *a)
 
 static bool trans_LD1RQ_zpri(DisasContext *s, arg_rpri_load *a)
 {
+    if (!dc_isar_feature(aa64_sve, s)) {
+        return false;
+    }
     if (sve_access_check(s)) {
         TCGv_i64 addr = new_tmp_a64(s);
         tcg_gen_addi_i64(addr, cpu_reg_sp(s, a->rn), a->imm * 16);
@@ -4993,6 +5116,9 @@ static bool trans_LD1R_zpri(DisasContext *s, arg_rpri_load *a)
     TCGLabel *over;
     TCGv_i64 temp, clean_addr;
 
+    if (!dc_isar_feature(aa64_sve, s)) {
+        return false;
+    }
     if (!sve_access_check(s)) {
         return true;
     }
@@ -5161,6 +5287,9 @@ static void do_st_zpa(DisasContext *s, int zt, int pg, TCGv_i64 addr,
 
 static bool trans_ST_zprr(DisasContext *s, arg_rprr_store *a)
 {
+    if (!dc_isar_feature(aa64_sve, s)) {
+        return false;
+    }
     if (a->rm == 31 || a->msz > a->esz) {
         return false;
     }
@@ -5175,6 +5304,9 @@ static bool trans_ST_zprr(DisasContext *s, arg_rprr_store *a)
 
 static bool trans_ST_zpri(DisasContext *s, arg_rpri_store *a)
 {
+    if (!dc_isar_feature(aa64_sve, s)) {
+        return false;
+    }
     if (a->msz > a->esz) {
         return false;
     }
@@ -5558,6 +5690,9 @@ static bool trans_LD1_zprz(DisasContext *s, arg_LD1_zprz *a)
     bool be = s->be_data == MO_BE;
     bool mte = s->mte_active[0];
 
+    if (!dc_isar_feature(aa64_sve, s)) {
+        return false;
+    }
     if (!sve_access_check(s)) {
         return true;
     }
@@ -5586,6 +5721,9 @@ static bool trans_LD1_zpiz(DisasContext *s, arg_LD1_zpiz *a)
     if (a->esz < a->msz || (a->esz == a->msz && !a->u)) {
         return false;
     }
+    if (!dc_isar_feature(aa64_sve, s)) {
+        return false;
+    }
     if (!sve_access_check(s)) {
         return true;
     }
@@ -5740,6 +5878,9 @@ static bool trans_ST1_zprz(DisasContext *s, arg_ST1_zprz *a)
     if (a->esz < a->msz || (a->msz == 0 && a->scale)) {
         return false;
     }
+    if (!dc_isar_feature(aa64_sve, s)) {
+        return false;
+    }
     if (!sve_access_check(s)) {
         return true;
     }
@@ -5767,6 +5908,9 @@ static bool trans_ST1_zpiz(DisasContext *s, arg_ST1_zpiz *a)
     if (a->esz < a->msz) {
         return false;
     }
+    if (!dc_isar_feature(aa64_sve, s)) {
+        return false;
+    }
     if (!sve_access_check(s)) {
         return true;
     }
@@ -5827,6 +5971,9 @@ static bool trans_STNT1_zprz(DisasContext *s, arg_ST1_zprz *a)
 
 static bool trans_PRF(DisasContext *s, arg_PRF *a)
 {
+    if (!dc_isar_feature(aa64_sve, s)) {
+        return false;
+    }
     /* Prefetch is a nop within QEMU.  */
     (void)sve_access_check(s);
     return true;
@@ -5834,7 +5981,7 @@ static bool trans_PRF(DisasContext *s, arg_PRF *a)
 
 static bool trans_PRF_rr(DisasContext *s, arg_PRF_rr *a)
 {
-    if (a->rm == 31) {
+    if (a->rm == 31 || !dc_isar_feature(aa64_sve, s)) {
         return false;
     }
     /* Prefetch is a nop within QEMU.  */
@@ -6070,7 +6217,9 @@ static bool do_trans_pmull(DisasContext *s, arg_rrr_esz *a, bool sel)
         gen_helper_gvec_pmull_q, gen_helper_sve2_pmull_h,
         NULL,                    gen_helper_sve2_pmull_d,
     };
-    if (a->esz == 0 && !dc_isar_feature(aa64_sve2_pmull128, s)) {
+    if (a->esz == 0
+        ? !dc_isar_feature(aa64_sve2_pmull128, s)
+        : !dc_isar_feature(aa64_sve, s)) {
         return false;
     }
     return gen_gvec_ool_arg_zzz(s, fns[a->esz], a, sel);
-- 
2.34.1



  parent reply	other threads:[~2022-05-27 20:26 UTC|newest]

Thread overview: 117+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-27 18:17 [PATCH 000/114] target/arm: Rewrite sve feature tests Richard Henderson
2022-05-27 18:17 ` [PATCH 001/114] target/arm: Introduce TRANS, TRANS_FEAT Richard Henderson
2022-05-27 18:17 ` [PATCH 002/114] target/arm: Move null function and sve check into gen_gvec_ool_zz Richard Henderson
2022-05-27 18:17 ` [PATCH 003/114] target/arm: Use TRANS_FEAT for gen_gvec_ool_zz Richard Henderson
2022-05-27 18:17 ` [PATCH 004/114] target/arm: Move null function and sve check into gen_gvec_ool_zzz Richard Henderson
2022-05-27 18:17 ` [PATCH 005/114] target/arm: Introduce gen_gvec_ool_arg_zzz Richard Henderson
2022-05-27 18:17 ` [PATCH 006/114] target/arm: Use TRANS_FEAT for gen_gvec_ool_arg_zzz Richard Henderson
2022-05-27 18:17 ` [PATCH 007/114] target/arm: Use TRANS_FEAT for do_sve2_zzz_ool Richard Henderson
2022-05-27 18:17 ` [PATCH 008/114] target/arm: Move null function and sve check into gen_gvec_ool_zzzz Richard Henderson
2022-05-27 18:17 ` [PATCH 009/114] target/arm: Use TRANS_FEAT for gen_gvec_ool_zzzz Richard Henderson
2022-05-27 18:17 ` [PATCH 010/114] target/arm: Introduce gen_gvec_ool_arg_zzzz Richard Henderson
2022-05-27 18:17 ` [PATCH 011/114] target/arm: Use TRANS_FEAT for do_sve2_zzzz_ool Richard Henderson
2022-05-27 18:17 ` [PATCH 012/114] target/arm: Use TRANS_FEAT for gen_gvec_ool_arg_zzzz Richard Henderson
2022-05-27 18:17 ` [PATCH 013/114] target/arm: Rename do_zzxz_ool to gen_gvec_ool_arg_zzxz Richard Henderson
2022-05-27 18:17 ` [PATCH 014/114] target/arm: Use TRANS_FEAT for gen_gvec_ool_arg_zzxz Richard Henderson
2022-05-27 18:17 ` [PATCH 015/114] target/arm: Use TRANS_FEAT for do_sve2_zzz_data Richard Henderson
2022-05-27 18:17 ` [PATCH 016/114] target/arm: Use TRANS_FEAT for do_sve2_zzzz_data Richard Henderson
2022-05-27 18:17 ` [PATCH 017/114] target/arm: Use TRANS_FEAT for do_sve2_zzw_data Richard Henderson
2022-05-27 18:17 ` [PATCH 018/114] target/arm: Use TRANS_FEAT for USDOT_zzzz Richard Henderson
2022-05-27 18:17 ` [PATCH 019/114] target/arm: Move null function and sve check into gen_gvec_ool_zzp Richard Henderson
2022-05-27 18:17 ` [PATCH 020/114] target/arm: Introduce gen_gvec_ool_arg_zpz Richard Henderson
2022-05-27 18:17 ` [PATCH 021/114] target/arm: Use TRANS_FEAT for gen_gvec_ool_arg_zpz Richard Henderson
2022-05-27 18:17 ` [PATCH 022/114] target/arm: Use TRANS_FEAT for do_sve2_zpz_data Richard Henderson
2022-05-27 18:17 ` [PATCH 023/114] target/arm: Rename do_zpzi_ool to gen_gvec_ool_arg_zpzi Richard Henderson
2022-05-27 18:17 ` [PATCH 024/114] target/arm: Use TRANS_FEAT for gen_gvec_ool_arg_zpzi Richard Henderson
2022-05-27 18:17 ` [PATCH 025/114] target/arm: Move null function and sve check into gen_gvec_ool_zzzp Richard Henderson
2022-05-27 18:17 ` [PATCH 026/114] target/arm: Introduce gen_gvec_ool_arg_zpzz Richard Henderson
2022-05-27 18:17 ` [PATCH 027/114] target/arm: Use TRANS_FEAT for gen_gvec_ool_arg_zpzz Richard Henderson
2022-05-27 18:17 ` [PATCH 028/114] target/arm: Use TRANS_FEAT for do_sve2_zpzz_ool Richard Henderson
2022-05-27 18:17 ` [PATCH 029/114] target/arm: Merge gen_gvec_fn_zz into do_mov_z Richard Henderson
2022-05-27 18:17 ` [PATCH 030/114] target/arm: Move null function and sve check into gen_gvec_fn_zzz Richard Henderson
2022-05-27 18:17 ` [PATCH 031/114] target/arm: Rename do_zzz_fn to gen_gvec_fn_arg_zzz Richard Henderson
2022-05-27 18:17 ` [PATCH 032/114] target/arm: More use of gen_gvec_fn_arg_zzz Richard Henderson
2022-05-27 18:17 ` [PATCH 033/114] target/arm: Use TRANS_FEAT for gen_gvec_fn_arg_zzz Richard Henderson
2022-05-27 18:17 ` [PATCH 034/114] target/arm: Use TRANS_FEAT for do_sve2_fn_zzz Richard Henderson
2022-05-27 18:17 ` [PATCH 035/114] target/arm: Use TRANS_FEAT for RAX1 Richard Henderson
2022-05-27 18:17 ` [PATCH 036/114] target/arm: Introduce gen_gvec_fn_arg_zzzz Richard Henderson
2022-05-27 18:17 ` [PATCH 037/114] target/arm: Use TRANS_FEAT for do_sve2_zzzz_fn Richard Henderson
2022-05-27 18:17 ` [PATCH 038/114] target/arm: Introduce gen_gvec_fn_zzi Richard Henderson
2022-05-27 18:17 ` [PATCH 039/114] target/arm: Use TRANS_FEAT for do_zz_dbm Richard Henderson
2022-05-27 18:17 ` [PATCH 040/114] target/arm: Hoist sve access check through do_sel_z Richard Henderson
2022-05-27 18:17 ` [PATCH 041/114] target/arm: Introduce gen_gvec_fn_arg_zzi Richard Henderson
2022-05-27 18:17 ` [PATCH 042/114] target/arm: Use TRANS_FEAT for do_sve2_fn2i Richard Henderson
2022-05-27 18:17 ` [PATCH 043/114] target/arm: Use TRANS_FEAT for do_vpz_ool Richard Henderson
2022-05-27 18:17 ` [PATCH 044/114] target/arm: Use TRANS_FEAT for do_shift_imm Richard Henderson
2022-05-27 18:17 ` [PATCH 045/114] target/arm: Introduce do_shift_zpzi Richard Henderson
2022-05-27 18:17 ` [PATCH 046/114] target/arm: Use TRANS_FEAT for do_shift_zpzi Richard Henderson
2022-05-27 18:18 ` [PATCH 047/114] target/arm: Use TRANS_FEAT for do_zpzzz_ool Richard Henderson
2022-05-27 18:18 ` [PATCH 048/114] target/arm: Move sve check into do_index Richard Henderson
2022-05-27 18:18 ` [PATCH 049/114] target/arm: Use TRANS_FEAT for do_index Richard Henderson
2022-05-27 18:18 ` [PATCH 050/114] target/arm: Use TRANS_FEAT for do_adr Richard Henderson
2022-05-27 18:18 ` [PATCH 051/114] target/arm: Use TRANS_FEAT for do_predset Richard Henderson
2022-05-27 18:18 ` [PATCH 052/114] target/arm: Use TRANS_FEAT for RDFFR, WRFFR Richard Henderson
2022-05-27 18:18 ` [PATCH 053/114] target/arm: Use TRANS_FEAT for do_pfirst_pnext Richard Henderson
2022-05-27 18:18 ` [PATCH 054/114] target/arm: Use TRANS_FEAT for do_EXT Richard Henderson
2022-05-27 18:18 ` [PATCH 055/114] target/arm: Use TRANS_FEAT for do_perm_pred3 Richard Henderson
2022-05-27 18:18 ` [PATCH 056/114] target/arm: Use TRANS_FEAT for do_perm_pred2 Richard Henderson
2022-05-27 18:18 ` [PATCH 057/114] target/arm: Move sve zip high_ofs into simd_data Richard Henderson
2022-10-27 17:29   ` Idan Horowitz
2022-05-27 18:18 ` [PATCH 058/114] target/arm: Use gen_gvec_ool_arg_zzz for do_zip, do_zip_q Richard Henderson
2022-05-27 18:18 ` [PATCH 059/114] target/arm: Use TRANS_FEAT " Richard Henderson
2022-05-27 18:18 ` [PATCH 060/114] target/arm: Use TRANS_FEAT for do_clast_vector Richard Henderson
2022-05-27 18:18 ` [PATCH 061/114] target/arm: Use TRANS_FEAT for do_clast_fp Richard Henderson
2022-05-27 18:18 ` [PATCH 062/114] target/arm: Use TRANS_FEAT for do_clast_general Richard Henderson
2022-05-27 18:18 ` [PATCH 063/114] target/arm: Use TRANS_FEAT for do_last_fp Richard Henderson
2022-05-27 18:18 ` [PATCH 064/114] target/arm: Use TRANS_FEAT for do_last_general Richard Henderson
2022-05-27 18:18 ` [PATCH 065/114] target/arm: Use TRANS_FEAT for SPLICE Richard Henderson
2022-05-27 18:18 ` [PATCH 066/114] target/arm: Use TRANS_FEAT for do_ppzz_flags Richard Henderson
2022-05-27 18:18 ` [PATCH 067/114] target/arm: Use TRANS_FEAT for do_sve2_ppzz_flags Richard Henderson
2022-05-27 18:18 ` [PATCH 068/114] target/arm: Use TRANS_FEAT for do_ppzi_flags Richard Henderson
2022-05-27 18:18 ` [PATCH 069/114] target/arm: Use TRANS_FEAT for do_brk2, do_brk3 Richard Henderson
2022-05-27 18:18 ` [PATCH 070/114] target/arm: Use TRANS_FEAT for MUL_zzi Richard Henderson
2022-05-27 18:18 ` [PATCH 071/114] target/arm: Reject dup_i w/ shifted byte early Richard Henderson
2022-05-27 18:18 ` [PATCH 072/114] target/arm: Reject add/sub " Richard Henderson
2022-05-27 18:18 ` [PATCH 073/114] target/arm: Reject copy " Richard Henderson
2022-05-27 18:18 ` [PATCH 074/114] target/arm: Use TRANS_FEAT for ADD_zzi Richard Henderson
2022-05-27 18:18 ` [PATCH 075/114] target/arm: Use TRANS_FEAT for do_zzi_sat Richard Henderson
2022-05-27 18:18 ` [PATCH 076/114] target/arm: Use TRANS_FEAT for do_zzi_ool Richard Henderson
2022-05-27 18:18 ` [PATCH 077/114] target/arm: Introduce gen_gvec_{ptr,fpst}_zzzz Richard Henderson
2022-05-27 18:18 ` [PATCH 078/114] target/arm: Use TRANS_FEAT for FMMLA Richard Henderson
2022-05-27 18:18 ` [PATCH 079/114] target/arm: Move sve check into gen_gvec_fn_ppp Richard Henderson
2022-05-27 18:18 ` [PATCH 080/114] target/arm: Implement NOT (prediates) alias Richard Henderson
2022-05-27 18:18 ` [PATCH 081/114] target/arm: Use TRANS_FEAT for SEL_zpzz Richard Henderson
2022-05-27 18:18 ` [PATCH 082/114] target/arm: Use TRANS_FEAT for MOVPRFX Richard Henderson
2022-05-27 18:18 ` [PATCH 083/114] target/arm: Use TRANS_FEAT for FMLA Richard Henderson
2022-05-27 18:18 ` [PATCH 084/114] target/arm: Use TRANS_FEAT for BFMLA Richard Henderson
2022-05-27 18:18 ` [PATCH 085/114] target/arm: Rename do_zzz_fp to gen_gvec_ool_fpst_arg_zzz Richard Henderson
2022-05-27 18:18 ` [PATCH 086/114] target/arm: Use TRANS_FEAT for DO_FP3 Richard Henderson
2022-05-27 18:18 ` [PATCH 087/114] target/arm: Use TRANS_FEAT for FMUL_zzx Richard Henderson
2022-05-27 18:18 ` [PATCH 088/114] target/arm: Use TRANS_FEAT for FTMAD Richard Henderson
2022-05-27 18:18 ` [PATCH 089/114] target/arm: Move null function and sve check into do_reduce Richard Henderson
2022-05-27 18:18 ` [PATCH 090/114] target/arm: Use TRANS_FEAT for do_reduce Richard Henderson
2022-05-27 18:18 ` [PATCH 091/114] target/arm: Use TRANS_FEAT for FRECPE, FRSQRTE Richard Henderson
2022-05-27 18:18 ` [PATCH 092/114] target/arm: Expand frint_fns for MO_8 Richard Henderson
2022-05-27 18:18 ` [PATCH 093/114] target/arm: Rename do_zpz_ptr to gen_gvec_ool_fpst_arg_zpz Richard Henderson
2022-05-27 18:18 ` [PATCH 094/114] target/arm: Move null function and sve check into do_frint_mode Richard Henderson
2022-05-27 18:18 ` [PATCH 095/114] target/arm: Use TRANS_FEAT for do_frint_mode Richard Henderson
2022-05-27 18:18 ` [PATCH 096/114] target/arm: Use TRANS_FEAT for FLOGB Richard Henderson
2022-05-27 18:18 ` [PATCH 097/114] target/arm: Use TRANS_FEAT for do_ppz_fp Richard Henderson
2022-05-27 18:18 ` [PATCH 098/114] target/arm: Rename do_zpzz_ptr to gen_gvec_fpst_arg_zpzz Richard Henderson
2022-05-27 18:18 ` [PATCH 099/114] target/arm: Use TRANS_FEAT for gen_gvec_fpst_arg_zpzz Richard Henderson
2022-05-27 18:18 ` [PATCH 100/114] target/arm: Use TRANS_FEAT for FCADD Richard Henderson
2022-05-27 18:18 ` [PATCH 101/114] target/arm: Introduce gen_gvec_fpst_zzzzp Richard Henderson
2022-05-27 18:18 ` [PATCH 102/114] target/arm: Use TRANS_FEAT for gen_gvec_fpst_zzzzp Richard Henderson
2022-05-27 18:18 ` [PATCH 103/114] target/arm: Move null function and sve check into do_fp_imm Richard Henderson
2022-05-27 18:18 ` [PATCH 104/114] target/arm: Use TRANS_FEAT for DO_FP_IMM Richard Henderson
2022-05-27 18:18 ` [PATCH 105/114] target/arm: Use TRANS_FEAT for DO_FPCMP Richard Henderson
2022-05-27 18:18 ` [PATCH 106/114] target/arm: Remove assert in trans_FCMLA_zzxz Richard Henderson
2022-05-27 18:19 ` [PATCH 107/114] target/arm: Use TRANS_FEAT for FCMLA_zzxz Richard Henderson
2022-05-27 18:19 ` [PATCH 108/114] target/arm: Use TRANS_FEAT for do_narrow_extract Richard Henderson
2022-05-27 18:19 ` [PATCH 109/114] target/arm: Use TRANS_FEAT for do_shll_tb Richard Henderson
2022-05-27 18:19 ` [PATCH 110/114] target/arm: Use TRANS_FEAT for do_shr_narrow Richard Henderson
2022-05-27 18:19 ` [PATCH 111/114] target/arm: Use TRANS_FEAT for do_FMLAL_zzzw Richard Henderson
2022-05-27 18:19 ` [PATCH 112/114] target/arm: Use TRANS_FEAT for do_FMLAL_zzxw Richard Henderson
2022-05-27 18:19 ` Richard Henderson [this message]
2022-05-27 18:19 ` [PATCH 114/114] target/arm: Remove aa64_sve check from before disas_sve Richard Henderson
2022-05-30 15:11 ` [PATCH 000/114] target/arm: Rewrite sve feature tests Peter Maydell

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=20220527181907.189259-114-richard.henderson@linaro.org \
    --to=richard.henderson@linaro.org \
    --cc=qemu-arm@nongnu.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.