qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 02/11] softfloat: Inline pickNaNMulAdd


From: Peter Maydell
Subject: Re: [PATCH 02/11] softfloat: Inline pickNaNMulAdd
Date: Thu, 5 Dec 2024 13:30:23 +0000

On Tue, 3 Dec 2024 at 20:39, Richard Henderson
<richard.henderson@linaro.org> wrote:
>
> Inline pickNaNMulAdd into its only caller.  This makes
> one assert redundant with the immediately preceding IF.
>
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
> ---
>  fpu/softfloat-parts.c.inc      | 35 +++++++++++++++++++++-
>  fpu/softfloat-specialize.c.inc | 54 ----------------------------------
>  2 files changed, 34 insertions(+), 55 deletions(-)

> -/*----------------------------------------------------------------------------
> -| Select which NaN to propagate for a three-input operation.
> -| For the moment we assume that no CPU needs the 'larger significand'
> -| information.
> -| Return values : 0 : a; 1 : b; 2 : c; 3 : default-NaN
> -*----------------------------------------------------------------------------*/
> -static int pickNaNMulAdd(FloatClass a_cls, FloatClass b_cls, FloatClass 
> c_cls,
> -                         bool infzero, bool have_snan, float_status *status)
> -{
> -    FloatClass cls[3] = { a_cls, b_cls, c_cls };
> -    Float3NaNPropRule rule = status->float_3nan_prop_rule;
> -    int which;
> -
> -    /*
> -     * We guarantee not to require the target to tell us how to
> -     * pick a NaN if we're always returning the default NaN.
> -     * But if we're not in default-NaN mode then the target must
> -     * specify.
> -     */

This comment has got lost in the refactoring. Since it's
documenting a guarantee we make to the target, I think
it's worth retaining.

thanks
-- PMM



reply via email to

[Prev in Thread] Current Thread [Next in Thread]