On Wed, 20 May 2026 at 19:26, Richard Henderson
<[email protected]> wrote:
>
> Signed-off-by: Richard Henderson <[email protected]>
> ---
>  target/arm/cpu-features.h        |  6 ++++++
>  target/arm/tcg/helper-fp8-defs.h |  1 +
>  target/arm/tcg/fp8_helper.c      | 16 ++++++++++++++++
>  target/arm/tcg/translate-sve.c   | 23 +++++++++++++++++++++++
>  target/arm/tcg/sve.decode        |  6 ++++++
>  5 files changed, 52 insertions(+)

> +static bool do_f8cvt(DisasContext *s, arg_rr_esz *a,
> +                     gen_helper_gvec_2_ptr *fn, bool issrc2, bool isodd)
> +{
> +    if (fpmr_access_check(s) && sve_access_check(s)) {
> +        unsigned vsz = vec_full_reg_size(s);
> +        tcg_gen_gvec_2_ptr(vec_full_reg_offset(s, a->rd),
> +                           vec_full_reg_offset(s, a->rn),
> +                           tcg_env, vsz, vsz,
> +                           issrc2 | (isodd << 1) | (FPST_A64 << 2), fn);
> +    }
> +    return true;
> +}
> +
> +TRANS_FEAT(BF1CVT, aa64_sme2_or_sve2_f8cvt, do_f8cvt, a,
> +           gen_helper_sve2_bfcvt, false, false)
> +TRANS_FEAT(BF2CVT, aa64_sme2_or_sve2_f8cvt, do_f8cvt, a,
> +           gen_helper_sve2_bfcvt, true, false)
> +TRANS_FEAT(BF1CVTLT, aa64_sme2_or_sve2_f8cvt, do_f8cvt, a,
> +           gen_helper_sve2_bfcvt, false, true)
> +TRANS_FEAT(BF2CVTLT, aa64_sme2_or_sve2_f8cvt, do_f8cvt, a,
> +           gen_helper_sve2_bfcvt, true, true)

Again, I'm not sure if this gets the "only legal in streaming
mode from SME2" logic right, but otherwise this looks good.

-- PMM

Reply via email to