target/arm: Implement SME2p1 Multiple Zero

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20250704142112.1018902-70-richard.henderson@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
Richard Henderson 2025-07-04 08:20:32 -06:00 committed by Peter Maydell
parent e9b743947b
commit f8f65ebc0a
2 changed files with 43 additions and 0 deletions

View file

@ -877,3 +877,26 @@ UCLAMP 11000001 esz:2 1 zm:5 110001 zn:5 .... 1 \
&zzz_en zd=%zd_ax2 n=2
UCLAMP 11000001 esz:2 1 zm:5 110011 zn:5 ...0 1 \
&zzz_en zd=%zd_ax4 n=4
### SME Multiple Zero
&zero_za rv off ngrp nvec
ZERO_za 11000000 000011 000 .. 0000000000 off:3 \
&zero_za ngrp=2 nvec=1 rv=%mova_rv
ZERO_za 11000000 000011 100 .. 0000000000 off:3 \
&zero_za ngrp=4 nvec=1 rv=%mova_rv
ZERO_za 11000000 000011 001 .. 0000000000 ... \
&zero_za ngrp=1 nvec=2 rv=%mova_rv off=%off3_x2
ZERO_za 11000000 000011 010 .. 0000000000 0.. \
&zero_za ngrp=2 nvec=2 rv=%mova_rv off=%off2_x2
ZERO_za 11000000 000011 011 .. 0000000000 0.. \
&zero_za ngrp=4 nvec=2 rv=%mova_rv off=%off2_x2
ZERO_za 11000000 000011 101 .. 0000000000 0.. \
&zero_za ngrp=1 nvec=4 rv=%mova_rv off=%off2_x4
ZERO_za 11000000 000011 110 .. 0000000000 00. \
&zero_za ngrp=2 nvec=4 rv=%mova_rv off=%off1_x4
ZERO_za 11000000 000011 111 .. 0000000000 00. \
&zero_za ngrp=4 nvec=4 rv=%mova_rv off=%off1_x4

View file

@ -173,6 +173,26 @@ static bool trans_ZERO_zt0(DisasContext *s, arg_ZERO_zt0 *a)
return true;
}
static bool trans_ZERO_za(DisasContext *s, arg_ZERO_za *a)
{
if (!dc_isar_feature(aa64_sme2p1, s)) {
return false;
}
if (sme_smza_enabled_check(s)) {
int svl = streaming_vec_reg_size(s);
int vstride = svl / a->ngrp;
TCGv_ptr t_za = get_zarray(s, a->rv, a->off, a->ngrp, a->nvec);
for (int r = 0; r < a->ngrp; ++r) {
for (int i = 0; i < a->nvec; ++i) {
int o_za = (r * vstride + i) * sizeof(ARMVectorReg);
tcg_gen_gvec_dup_imm_var(MO_64, t_za, o_za, svl, svl, 0);
}
}
}
return true;
}
static bool do_mova_tile(DisasContext *s, arg_mova_p *a, bool to_vec)
{
static gen_helper_gvec_4 * const h_fns[5] = {