[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v9 01/10] softfloat: Implement run-time-configur
From: |
Peter Maydell |
Subject: |
Re: [Qemu-devel] [PATCH v9 01/10] softfloat: Implement run-time-configurable meaning of signaling NaN bit |
Date: |
Thu, 23 Jun 2016 16:30:55 +0100 |
On 10 June 2016 at 10:57, Aleksandar Markovic
<address@hidden> wrote:
> From: Aleksandar Markovic <address@hidden>
>
> This patch modifies SoftFloat library so that it can be configured in
> run-time in relation to the meaning of signaling NaN bit, while, at the
> same time, strictly preserving its behavior on all existing platforms.
This doesn't compile:
In file included from
/home/petmay01/linaro/qemu-from-laptop/qemu/fpu/softfloat.c:106:0:
/home/petmay01/linaro/qemu-from-laptop/qemu/fpu/softfloat-specialize.h:
In function ‘commonNaNToFloat32’:
/home/petmay01/linaro/qemu-from-laptop/qemu/fpu/softfloat-specialize.h:398:9:
error: return makes integer from pointer without a cast [-Werror]
return float32_default_nan;
^
In file included from
/home/petmay01/linaro/qemu-from-laptop/qemu/fpu/softfloat.c:106:0:
/home/petmay01/linaro/qemu-from-laptop/qemu/fpu/softfloat-specialize.h:
In function ‘commonNaNToFloat64’:
/home/petmay01/linaro/qemu-from-laptop/qemu/fpu/softfloat-specialize.h:816:9:
error: return makes integer from pointer without a cast [-Werror]
return float64_default_nan;
^
This is because a couple of changes currently in patch 2 should
be in this patch:
@@ -391,11 +391,12 @@ static float32 commonNaNToFloat32(commonNaNT a,
float_status *status)
return float32_default_nan(status);
}
- if ( mantissa )
+ if (mantissa) {
return make_float32(
(((uint32_t)a.sign) << 31) | 0x7F800000 | (a.high >> 41));
- else
- return float32_default_nan;
+ } else {
+ return float32_default_nan(status);
+ }
}
and
@@ -807,13 +807,14 @@ static float64 commonNaNToFloat64(commonNaNT a,
float_status *status)
return float64_default_nan(status);
}
- if ( mantissa )
+ if (mantissa) {
return make_float64(
(((uint64_t) a.sign) << 63)
| LIT64(0x7FF0000000000000)
| (a.high >> 12));
- else
- return float64_default_nan;
+ } else {
+ return float64_default_nan(status);
+ }
}
Otherwise:
Reviewed-by: Peter Maydell <address@hidden>
(As an aside, this patch reveals a bug in scripts/checkpatch.pl, which
goes into an infinite loop if you try to run it on it.)
thanks
-- PMM
- [Qemu-devel] [PATCH v9 00/10] IEEE 754-2008 support for Mips, Aleksandar Markovic, 2016/06/10
- [Qemu-devel] [PATCH v9 02/10] softfloat: Clean code format in fpu/softfloat-specialize.h, Aleksandar Markovic, 2016/06/10
- [Qemu-devel] [PATCH v9 03/10] softfloat: For Mips only, correct default NaN values, Aleksandar Markovic, 2016/06/10
- [Qemu-devel] [PATCH v9 01/10] softfloat: Implement run-time-configurable meaning of signaling NaN bit, Aleksandar Markovic, 2016/06/10
- [Qemu-devel] [PATCH v9 04/10] softfloat: For Mips only, correct order in pickNaNMulAdd(), Aleksandar Markovic, 2016/06/10
- [Qemu-devel] [PATCH v9 05/10] linux-user: Update preprocessor constants for Mips-specific e_flags bits, Aleksandar Markovic, 2016/06/10
- [Qemu-devel] [PATCH v9 06/10] target-mips: Activate IEEE 754-2008 signaling NaN bit meaning for MSA, Aleksandar Markovic, 2016/06/10
- [Qemu-devel] [PATCH v9 07/10] target-mips: Add abs2008 flavor of <ABS|NEG>.<S|D>, Aleksandar Markovic, 2016/06/10
- [Qemu-devel] [PATCH v9 08/10] target-mips: Add nan2008 flavor of <CEIL|CVT|FLOOR|ROUND|TRUNC>.<L|W>.<S|D>, Aleksandar Markovic, 2016/06/10
- [Qemu-devel] [PATCH v9 09/10] target-mips: Implement FCR31's R/W bitmask and related functionalities, Aleksandar Markovic, 2016/06/10
- [Qemu-devel] [PATCH v9 10/10] target-mips: Add FCR31's FS bit definition, Aleksandar Markovic, 2016/06/10