qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v2 01/24] softfloat: Fix exception flag handling


From: Richard Henderson
Subject: Re: [Qemu-devel] [PATCH v2 01/24] softfloat: Fix exception flag handling for float32_to_float16()
Date: Mon, 06 Jan 2014 10:18:41 -0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0

On 01/06/2014 05:10 AM, Peter Maydell wrote:
> Our float32 to float16 conversion routine was generating the correct
> numerical answers, but not always setting the right set of exception
> flags. Fix this, mostly by rearranging the code to more closely
> resemble RoundAndPackFloat*, and in particular:
>  * non-IEEE halfprec always raises Invalid for input NaNs
>  * we need to check for the overflow case before underflow
>  * we weren't getting the tininess-detected-after-rounding
>    case correct (somewhat academic since only ARM uses halfprec
>    and it is always tininess-detected-before-rounding)
>  * non-IEEE halfprec overflow raises only Invalid, not
>    Invalid + Inexact
>  * we weren't setting Inexact when we should
> 
> Also add some clarifying comments about what the code is doing.
> 
> Signed-off-by: Peter Maydell <address@hidden>
> ---
>  fpu/softfloat.c | 105 
> +++++++++++++++++++++++++++++++++++---------------------
>  1 file changed, 66 insertions(+), 39 deletions(-)

Reviewed-by: Richard Henderson <address@hidden>


r~



reply via email to

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