On Wed, 3 Jun 2026 at 04:31, Richard Henderson
<[email protected]> wrote:
>
> Signed-off-by: Richard Henderson <[email protected]>
> ---

> +
> +static FP8MulContext fp8_mul_start(CPUARMState *env, int scale_mask)
> +{
> +    uint64_t fpmr = env->vfp.fpmr;
> +
> +    FP8MulContext ret = {
> +        .stat = env->vfp.fp_status[FPST_A64],
> +        .fmt1 = fp8_input_fmt[FIELD_EX64(fpmr, FPMR, F8S1)],
> +        .fmt2 = fp8_input_fmt[FIELD_EX64(fpmr, FPMR, F8S2)],
> +        .scale = -(FIELD_EX64(fpmr, FPMR, LSCALE) & scale_mask),
> +    };
> +
> +    set_flush_to_zero(0, &ret.stat);
> +    set_flush_inputs_to_zero(0, &ret.stat);
> +    set_default_nan_mode(true, &ret.stat);
> +    set_float_rounding_mode(FIELD_EX64(fpmr, FPMR, OSM)
> +                            ? float_round_nearest_even_max
> +                            : float_round_nearest_even, &ret.stat);
> +
> +    /*
> +     * FP8 multiplies don't update FPSR.{IDC,IOC,IXC,UFC}.
> +     * Since this is multiply-add, DZC does not apply and only OFC remains.
> +     */

I think this comment hasn't been updated to match the code changes
following our previous discussion about what fp status flags
FP8 multiplies update:
https://lore.kernel.org/qemu-devel/cafeaca_4wu+wndbaqjnobpvnlit11ovdzvtz1rwy_q0cnfh...@mail.gmail.com/

We ended up concluding that we don't need to update any FPSR
flags, but the comment still talks about the OFC bit.

Perhaps something like:

/*
 * FP8 multiplies don't update any of the FPSR exception flags,
 * so we do not need an fp8_mul_finish() to propagate status
 * changes back from ret.stat into env->vfp.fp_status[].
 */

?

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

thanks
-- PMM

Reply via email to