On Fri, 5 Jun 2026 at 00:50, Richard Henderson
<[email protected]> wrote:
>
> Prepare for needing a non-zero value.
>
> Signed-off-by: Richard Henderson <[email protected]>
> ---
>  target/arm/tcg/translate-sve.c | 19 ++++++++++---------
>  1 file changed, 10 insertions(+), 9 deletions(-)
>
> diff --git a/target/arm/tcg/translate-sve.c b/target/arm/tcg/translate-sve.c
> index 083b70b487..e9c0a73e90 100644
> --- a/target/arm/tcg/translate-sve.c
> +++ b/target/arm/tcg/translate-sve.c
> @@ -4656,7 +4656,8 @@ TRANS_FEAT(FRINTX_m, aa64_sme_or_sve, 
> gen_gvec_fpst_arg_zpz,
>             a->esz == MO_16 ? FPST_A64_F16 : FPST_A64);
>
>  static bool do_frint_mode(DisasContext *s, arg_rpr_esz *a,
> -                          ARMFPRounding mode, gen_helper_gvec_3_ptr *fn)
> +                          ARMFPRounding mode, int data,
> +                          gen_helper_gvec_3_ptr *fn)
>  {
>      unsigned vsz;
>      TCGv_i32 tmode;
> @@ -4676,22 +4677,22 @@ static bool do_frint_mode(DisasContext *s, 
> arg_rpr_esz *a,
>      tcg_gen_gvec_3_ptr(vec_full_reg_offset(s, a->rd),
>                         vec_full_reg_offset(s, a->rn),
>                         pred_full_reg_offset(s, a->pg),
> -                       status, vsz, vsz, 0, fn);
> +                       status, vsz, vsz, data, fn);
>
>      gen_restore_rmode(tmode, status);
>      return true;
>  }
>
>  TRANS_FEAT(FRINTN_m, aa64_sme_or_sve, do_frint_mode, a,
> -           FPROUNDING_TIEEVEN, frint_fns[a->esz])
> +           FPROUNDING_TIEEVEN, 0, frint_fns[a->esz])
>  TRANS_FEAT(FRINTP_m, aa64_sme_or_sve, do_frint_mode, a,
> -           FPROUNDING_POSINF, frint_fns[a->esz])
> +           FPROUNDING_POSINF, 0, frint_fns[a->esz])

We seem to not be very consistent about whether the function
pointer comes at the end or before the extra data args in
these TRANS_FEAT invocations, which is particularly noticeable
in this patchset where the earlier "add a 0/1 indicator of
zeroing" patches added the 0/1 at the end, and this one puts
it in the middle. However, this is the arrangement that
the existing arguments to do_frint_mode() have, so

Reviewed-by: Peter Maydell <[email protected]>

thanks
-- PMM

Reply via email to