On Wed, 2 Jul 2025 at 13:42, Richard Henderson <richard.hender...@linaro.org> wrote: > > Signed-off-by: Richard Henderson <richard.hender...@linaro.org> > ---
> diff --git a/target/arm/tcg/vec_internal.h b/target/arm/tcg/vec_internal.h > index 236927c640..ad3bfabc34 100644 > --- a/target/arm/tcg/vec_internal.h > +++ b/target/arm/tcg/vec_internal.h > @@ -337,6 +337,22 @@ bfloat16 helper_sme2_ah_fmin_b16(bfloat16 a, bfloat16 b, > float_status *fpst); > float32 sve_f16_to_f32(float16 f, float_status *fpst); > float16 sve_f32_to_f16(float32 f, float_status *fpst); > > +/* Extract @len bits from an array of uint64_t at offset @pos bits. */ > +static inline uint64_t extractn(uint64_t *p, unsigned pos, unsigned len) > +{ > + uint64_t x; > + > + p += pos / 64; > + pos = pos % 64; > + > + x = p[0]; > + if (pos + len > 64) { > + x = (x >> pos) | (p[1] << (-pos & 63)); > + pos = 0; > + } > + return extract64(x, pos, len); > +} We added this in patch 79, I think, so we could put it in vec_internal.h from the start (with the comment). Otherwise Reviewed-by: Peter Maydell <peter.mayd...@linaro.org> thanks -- PMM