On Sun, 22 Jun 2025 at 00:53, Richard Henderson <richard.hender...@linaro.org> wrote: > > Add gen_helper_gvec_sudot_idx_4b as an expander which > swaps arguments and uses helper_gvec_usdot_idx_4b. > > Signed-off-by: Richard Henderson <richard.hender...@linaro.org> > --- > target/arm/tcg/helper.h | 2 -- > target/arm/tcg/translate.h | 3 +++ > target/arm/tcg/gengvec.c | 6 ++++++ > target/arm/tcg/vec_helper.c | 1 - > 4 files changed, 9 insertions(+), 3 deletions(-) > > diff --git a/target/arm/tcg/helper.h b/target/arm/tcg/helper.h > index c459eba079..2702627eab 100644 > --- a/target/arm/tcg/helper.h > +++ b/target/arm/tcg/helper.h > @@ -622,8 +622,6 @@ DEF_HELPER_FLAGS_5(gvec_sdot_idx_4h, TCG_CALL_NO_RWG, > void, ptr, ptr, ptr, ptr, i32) > DEF_HELPER_FLAGS_5(gvec_udot_idx_4h, TCG_CALL_NO_RWG, > void, ptr, ptr, ptr, ptr, i32) > -DEF_HELPER_FLAGS_5(gvec_sudot_idx_4b, TCG_CALL_NO_RWG, > - void, ptr, ptr, ptr, ptr, i32) > DEF_HELPER_FLAGS_5(gvec_usdot_idx_4b, TCG_CALL_NO_RWG, > void, ptr, ptr, ptr, ptr, i32) > > diff --git a/target/arm/tcg/translate.h b/target/arm/tcg/translate.h > index 8cf6324e2f..90a03a4642 100644 > --- a/target/arm/tcg/translate.h > +++ b/target/arm/tcg/translate.h > @@ -627,6 +627,9 @@ void gen_gvec_urecpe(unsigned vece, uint32_t rd_ofs, > uint32_t rn_ofs, > void gen_gvec_ursqrte(unsigned vece, uint32_t rd_ofs, uint32_t rn_ofs, > uint32_t opr_sz, uint32_t max_sz); > > +void gen_helper_gvec_sudot_idx_4b(TCGv_ptr d, TCGv_ptr n, TCGv_ptr m, > + TCGv_ptr a, TCGv_i32 desc); > + > /* > * Forward to the isar_feature_* tests given a DisasContext pointer. > */ > diff --git a/target/arm/tcg/gengvec.c b/target/arm/tcg/gengvec.c > index 01867f8ace..c182e5ab6f 100644 > --- a/target/arm/tcg/gengvec.c > +++ b/target/arm/tcg/gengvec.c > @@ -23,6 +23,12 @@ > #include "translate.h" > > > +void gen_helper_gvec_sudot_idx_4b(TCGv_ptr d, TCGv_ptr n, TCGv_ptr m, > + TCGv_ptr a, TCGv_i32 desc) > +{ > + gen_helper_gvec_usdot_idx_4b(d, m, n, a, desc); > +} > +
How does this work? In the DO_DOT_IDX() helper functions the 'm' argument is indexed, so I don't see how we can just flip the n and m arguments around. -- PMM