qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v2 1/6] softfloat: Add float16 type and float16


From: Peter Maydell
Subject: Re: [Qemu-devel] [PATCH v2 1/6] softfloat: Add float16 type and float16 NaN handling functions
Date: Wed, 9 Feb 2011 19:25:32 +0000

On 9 February 2011 18:40, Aurelien Jarno <address@hidden> wrote:
> You should also add it in the USE_SOFTFLOAT_STRUCT_TYPES case, so that
> we can check the type correctness. Last time I tried, it was not
> compiling in this mode

Yeah, it doesn't compile, but it's not too hard to fix (at least for ARM
targets). It looks like we need a new macro:
#ifdef USE_SOFTFLOAT_STRUCT_TYPES
#define const_float32(x) { x }
#else
#define const_float32(x) x
#endif

so you can define arrays of float32 etc:
static const float32 my_array[] = {
    const_float32(0x00000000),                          /* single 0.0 */
    const_float32(0x3f800000),                          /* single 1.0 */
 };

as there are a couple of places that do this and complain otherwise.

...unless anybody can come up with a cleverer fix.

-- PMM



reply via email to

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