[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v8 00/23] RISC-V QEMU Port Submission
From: |
Alex Bennée |
Subject: |
Re: [Qemu-devel] [PATCH v8 00/23] RISC-V QEMU Port Submission |
Date: |
Mon, 05 Mar 2018 10:02:41 +0000 |
User-agent: |
mu4e 1.1.0; emacs 26.0.91 |
Richard W.M. Jones <address@hidden> writes:
> The attached patch is also needed to avoid crashes during various
> math-heavy test suites.
>
> Rich.
>
> --
<snip>
> From: Stef O'Rear <address@hidden>
> Date: Sat, 3 Mar 2018 03:46:00 -0800
> Subject: [PATCH] softfloat: fix crash on int conversion of SNaN
>
> Signed-off-by: Stef O'Rear <address@hidden>
> ---
> fpu/softfloat.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/fpu/softfloat.c b/fpu/softfloat.c
> index e7fb0d357a..1da1db377e 100644
> --- a/fpu/softfloat.c
> +++ b/fpu/softfloat.c
> @@ -1342,6 +1342,8 @@ static int64_t round_to_int_and_pack(FloatParts in, int
> rmode,
> switch (p.cls) {
> case float_class_snan:
> case float_class_qnan:
> + case float_class_dnan:
> + case float_class_msnan:
> return max;
> case float_class_inf:
> return p.sign ? min : max;
> @@ -1430,6 +1432,8 @@ static uint64_t round_to_uint_and_pack(FloatParts in,
> int rmode, uint64_t max,
> switch (p.cls) {
> case float_class_snan:
> case float_class_qnan:
> + case float_class_dnan:
> + case float_class_msnan:
> s->float_exception_flags = orig_flags | float_flag_invalid;
> return max;
> case float_class_inf:
Obviously I wasn't exercising the NaN exit paths enough and we added the
return_nan() common code fairly late in the series.
Reviewed-by: Alex Bennée <address@hidden>
--
Alex Bennée
- [Qemu-devel] [PATCH v8 20/23] SiFive RISC-V PRCI Block, (continued)
- [Qemu-devel] [PATCH v8 20/23] SiFive RISC-V PRCI Block, Michael Clark, 2018/03/02
- [Qemu-devel] [PATCH v8 21/23] SiFive Freedom E Series RISC-V Machine, Michael Clark, 2018/03/02
- [Qemu-devel] [PATCH v8 22/23] SiFive Freedom U Series RISC-V Machine, Michael Clark, 2018/03/02
- [Qemu-devel] [PATCH v8 23/23] RISC-V Build Infrastructure, Michael Clark, 2018/03/02
- Re: [Qemu-devel] [PATCH v8 23/23] RISC-V Build Infrastructure, Philippe Mathieu-Daudé, 2018/03/09
- Re: [Qemu-devel] [PATCH v8 00/23] RISC-V QEMU Port Submission, no-reply, 2018/03/02
- Re: [Qemu-devel] [PATCH v8 00/23] RISC-V QEMU Port Submission, Richard W.M. Jones, 2018/03/05