qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 7/8] softfloat: Support halving the result of mu


From: Richard Henderson
Subject: Re: [Qemu-devel] [PATCH 7/8] softfloat: Support halving the result of muladd operation
Date: Mon, 10 Feb 2014 12:15:05 -0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.3.0

On 02/07/2014 01:49 PM, Peter Maydell wrote:
>          /* Zero plus something non-zero : just return the something */
> +        if (flags & float_muladd_halve_result) {
> +            if (cExp == 0) {
> +                shift32RightJamming(cSig, 1, &cSig);
> +            } else if (cExp == 1) {
> +                shift32RightJamming(cSig, 1, &cSig);
> +                cSig |= (1 << 22);
> +                cExp = 0;
> +            } else {
> +                cExp--;
> +            }

Surely better to just use roundAndPackFloat for this case.  Looks to me that
you're missing inexact and underflow exceptions at least.

> +        }
>          return packFloat32(cSign ^ signflip, cExp, cSig);
>      }


r~




reply via email to

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