[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v2 01/16] softfloat: define 680x0 specific value
From: |
Peter Maydell |
Subject: |
Re: [Qemu-devel] [PATCH v2 01/16] softfloat: define 680x0 specific values |
Date: |
Mon, 30 Jan 2017 19:19:34 +0000 |
On 30 January 2017 at 18:16, Laurent Vivier <address@hidden> wrote:
> Signed-off-by: Laurent Vivier <address@hidden>
> +#elif defined(TARGET_M68K)
> +static int pickNaN(flag aIsQNaN, flag aIsSNaN, flag bIsQNaN, flag bIsSNaN,
> + flag aIsLargerSignificand)
> +{
> + /* If either operand, but not both operands, of an operation is a
> + * nonsignaling NAN, then that NAN is returned as the result. If both
> + * operands are nonsignaling NANs, then the destination operand
> + * nonsignaling NAN is returned as the result.
> + */
> +
> + if (aIsSNaN) {
> + return 0;
> + } else if (bIsSNaN) {
> + return 1;
> + } else if (bIsQNaN) {
> + return 1;
> + } else {
> + return 0;
> + }
> +}
This function doesn't seem to quite do what the comment says (in
particular the comment doesn't say anything about handling
of signaling NaNs but the code makes decisions based on
which inputs are signaling).
PS: NaN is conventionally capitalized with a lowercase 'a'.
thanks
-- PMM
- [Qemu-devel] [PATCH v2 00/16] target-m68k: implement 680x0 FPU, Laurent Vivier, 2017/01/30
- [Qemu-devel] [PATCH v2 01/16] softfloat: define 680x0 specific values, Laurent Vivier, 2017/01/30
- Re: [Qemu-devel] [PATCH v2 01/16] softfloat: define 680x0 specific values,
Peter Maydell <=
- [Qemu-devel] [PATCH v2 02/16] softloat: disable floatx80_invalid_encoding() for m68k, Laurent Vivier, 2017/01/30
- [Qemu-devel] [PATCH v2 04/16] target-m68k: define ext_opsize, Laurent Vivier, 2017/01/30
- [Qemu-devel] [PATCH v2 07/16] target-m68k: manage FPU exceptions, Laurent Vivier, 2017/01/30
- [Qemu-devel] [PATCH v2 03/16] target-m68k: move FPU helpers to fpu_helper.c, Laurent Vivier, 2017/01/30
- [Qemu-devel] [PATCH v2 13/16] target-m68k: add fsglmul and fsgldiv, Laurent Vivier, 2017/01/30
- [Qemu-devel] [PATCH v2 08/16] target-m68k: define 96bit FP registers for gdb on 680x0, Laurent Vivier, 2017/01/30
- [Qemu-devel] [PATCH v2 06/16] target-m68k: add FPCR and FPSR, Laurent Vivier, 2017/01/30
- [Qemu-devel] [PATCH v2 10/16] target-m68k: add fscc., Laurent Vivier, 2017/01/30