[Top][All Lists]
[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
- Re: [Qemu-devel] [PATCH v2 2/6] softfloat: Honour default_nan_mode for float-to-float conversions, (continued)
- [Qemu-devel] [PATCH v2 4/6] softfloat: Correctly handle NaNs in float16_to_float32(), Peter Maydell, 2011/02/09
- [Qemu-devel] [PATCH v2 6/6] target-arm: Use standard FPSCR for Neon half-precision operations, Peter Maydell, 2011/02/09
- [Qemu-devel] [PATCH v2 3/6] softfloat: Fix single-to-half precision float conversions, Peter Maydell, 2011/02/09
- [Qemu-devel] [PATCH v2 1/6] softfloat: Add float16 type and float16 NaN handling functions, Peter Maydell, 2011/02/09
- [Qemu-devel] [PATCH v2 5/6] target-arm: Silence NaNs resulting from half-precision conversions, Peter Maydell, 2011/02/09