qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH] Softfloat: Add support to softfloat to return f


From: Peter Maydell
Subject: Re: [Qemu-devel] [PATCH] Softfloat: Add support to softfloat to return floatxx_default_nan when the corresponding target status flag is set.
Date: Mon, 7 Feb 2011 10:33:36 +0000

On 7 February 2011 10:17, Christophe Lyon <address@hidden> wrote:
> I was also wondering about the float16 case? The ARM ARM describes it
> uses default_nan too, but I couldn't find that right piece of code to patch
> in softfloat. Any idea? It seems to behave a bit differently from other FP
> formats.

Hm. My suggestion is that the bit of code in float32_to_float16() that does:
        if (aSig) {
            /* Make sure correct exceptions are raised.  */
            float32ToCommonNaN(a STATUS_VAR);
            aSig |= 0x00400000;
        }
        return packFloat16(aSign, 0x1f, aSig >> 13);

should be brought into line with the other float*_to_float* functions
by having it use a new commonNaNToFloat16() function rather
than hand-coding the conversion.

AFAICT only ARM uses float16, and that only for float16<->float32
conversions, so the softfloat code support for it is limited to only
what was needed for that.

-- PMM



reply via email to

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