qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v2 01/16] softfloat: define 680x0 specific value


From: Peter Maydell
Subject: Re: [Qemu-devel] [PATCH v2 01/16] softfloat: define 680x0 specific values
Date: Mon, 30 Jan 2017 19:19:34 +0000

On 30 January 2017 at 18:16, Laurent Vivier <address@hidden> wrote:
> Signed-off-by: Laurent Vivier <address@hidden>
> +#elif defined(TARGET_M68K)
> +static int pickNaN(flag aIsQNaN, flag aIsSNaN, flag bIsQNaN, flag bIsSNaN,
> +                   flag aIsLargerSignificand)
> +{
> +    /* If either operand, but not both operands, of an operation is a
> +     * nonsignaling NAN, then that NAN is returned as the result. If both
> +     * operands are nonsignaling NANs, then the destination operand
> +     * nonsignaling NAN is returned as the result.
> +     */
> +
> +    if (aIsSNaN) {
> +        return 0;
> +    } else if (bIsSNaN) {
> +        return 1;
> +    } else if (bIsQNaN) {
> +        return 1;
> +    } else {
> +        return 0;
> +    }
> +}

This function doesn't seem to quite do what the comment says (in
particular the comment doesn't say anything about handling
of signaling NaNs but the code makes decisions based on
which inputs are signaling).

PS: NaN is conventionally capitalized with a lowercase 'a'.

thanks
-- PMM



reply via email to

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