[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v3 23/51] target/arm: Implement SME RDSVL, ADDSVL, ADDSPL
From: |
Peter Maydell |
Subject: |
Re: [PATCH v3 23/51] target/arm: Implement SME RDSVL, ADDSVL, ADDSPL |
Date: |
Thu, 23 Jun 2022 11:12:23 +0100 |
On Wed, 22 Jun 2022 at 01:58, Richard Henderson
<richard.henderson@linaro.org> wrote:
>
> On 6/21/22 10:23, Peter Maydell wrote:
> >> +static bool trans_RDSVL(DisasContext *s, arg_RDSVL *a)
> >> +{
> >> + if (!dc_isar_feature(aa64_sme, s)) {
> >> + return false;
> >> + }
> >> + if (sme_enabled_check(s)) {
> >> + TCGv_i64 reg = cpu_reg(s, a->rd);
> >> + tcg_gen_movi_i64(reg, a->imm * s->svl);
> >> + }
> >> + return true;
> >> +}
> >
> > I think we should define functions that parallel the SVE
> > vec_full_reg_size() and pred_full_reg_size() rather than directly
> > looking at s->svl, for consistency with how we did the SVE code.
>
> I had actually been thinking of removing vec_full_reg_size, at least within
> SVE.
> However... done. I've propagated the new predicates forward through the
> following patches
> as well.
I don't strongly care whether we use vec_full_reg_size() or
look at s->vl, as long as we do the same thing in both SVE
and SME.
I do think that it's worth wrapping up the '/ 8' in a
function that describes what it's doing, so the other
option I guess would be to use s->vl and s->svl directly
when we want the vector length, and have a function like
/* Predicates have 1 bit per byte in the vector */
static int veclen_to_predlen(int veclen)
{
return veclen / 8;
}
and then use veclen_to_predlen(s->svl);
(Adjust function name, types, / 8 vs >> 3, to taste.)
thanks
-- PMM
- [PATCH v3 09/51] target/arm: Add the SME ZA storage to CPUARMState, (continued)
- [PATCH v3 09/51] target/arm: Add the SME ZA storage to CPUARMState, Richard Henderson, 2022/06/20
- [PATCH v3 10/51] target/arm: Implement SMSTART, SMSTOP, Richard Henderson, 2022/06/20
- [PATCH v3 14/51] target/arm: Generalize cpu_arm_{get, set}_default_vec_len, Richard Henderson, 2022/06/20
- [PATCH v3 15/51] target/arm: Move arm_cpu_*_finalize to internals.h, Richard Henderson, 2022/06/20
- [PATCH v3 11/51] target/arm: Move error for sve%d property to arm_cpu_sve_finalize, Richard Henderson, 2022/06/20
- [PATCH v3 21/51] target/arm: Add infrastructure for disas_sme, Richard Henderson, 2022/06/20
- [PATCH v3 23/51] target/arm: Implement SME RDSVL, ADDSVL, ADDSPL, Richard Henderson, 2022/06/20
- [PATCH v3 22/51] target/arm: Trap AdvSIMD usage when Streaming SVE is active, Richard Henderson, 2022/06/20
[PATCH v3 25/51] target/arm: Implement SME MOVA, Richard Henderson, 2022/06/20
[PATCH v3 20/51] target/arm: Move pred_{full, gvec}_reg_{offset, size} to translate-a64.h, Richard Henderson, 2022/06/20
[PATCH v3 28/51] target/arm: Implement SME LDR, STR, Richard Henderson, 2022/06/20