[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-arm] [PATCH v6 8/9] target-mips: Add nan2008 flavor of <CEIL|C
From: |
Aleksandar Markovic |
Subject: |
Re: [Qemu-arm] [PATCH v6 8/9] target-mips: Add nan2008 flavor of <CEIL|CVT|FLOOR|ROUND|TRUNC>.<L|W>.<S|D> |
Date: |
Fri, 10 Jun 2016 10:13:14 +0000 |
I referred to SoftFloat library in QEMU code, and the case "Operand is smaller
than INT_MIN" is different between SoftFloat and Mips-B, while the case
"Operand is a NaN" is different between SoftFloat and Mips-A.
Aleksandar
________________________________________
From: Maciej Rozycki
Sent: Tuesday, June 07, 2016 4:39 AM
To: Aleksandar Markovic
Cc: address@hidden; address@hidden; address@hidden; address@hidden;
address@hidden; address@hidden; address@hidden; address@hidden; Aleksandar
Markovic; address@hidden; address@hidden; Petar Jovanovic; address@hidden;
Miodrag Dinic; address@hidden; address@hidden; Leon Alrae; address@hidden;
Aurelien Jarno; address@hidden
Subject: Re: [PATCH v6 8/9] target-mips: Add nan2008 flavor of
<CEIL|CVT|FLOOR|ROUND|TRUNC>.<L|W>.<S|D>
On Mon, 16 May 2016, Aleksandar Markovic wrote:
> Here one can distinguish three cases:
>
> CASE MIPS-A: (FCR31.NAN2008 == 1)
>
> 1. Operand is a NaN, result should be 0;
> 2. Operand is larger than INT_MAX, result should be INT_MAX;
> 2. Operand is smaller than INT_MIN, result should be INT_MIN.
>
> CASE MIPS-B: (FCR31.NAN2008 == 0)
>
> 1. Operand is a NaN, result should be INT_MAX;
> 2. Operand is larger than INT_MAX, result should be INT_MAX;
> 2. Operand is smaller than INT_MIN, result should be INT_MAX.
>
> CASE SOFTFLOAT:
>
> 1. Operand is a NaN, result is INT_MAX;
> 2. Operand is larger than INT_MAX, result is INT_MAX;
> 2. Operand is smaller than INT_MIN, result is INT_MIN.
>
> It is interesting that neither MIPS-A nor MIPS-B desired behaviors
> are in this sense identical to correspondent SoftFloat behavior.
A bug in SoftFloat probably -- it has only been fixed quite recently to
handle all MIPS architecture's peculiarites correctly and this case must
have been missed then, making data produced not necessarily identical
between the legacy-NaN hard-float and the soft-float ABIs, even though
intent has been for it to be.
FAOD, you refer to SoftFloat in the most recent version of GCC, do you?
Maciej
- Re: [Qemu-arm] [PATCH v6 8/9] target-mips: Add nan2008 flavor of <CEIL|CVT|FLOOR|ROUND|TRUNC>.<L|W>.<S|D>, Maciej W. Rozycki, 2016/06/07
- Re: [Qemu-arm] [PATCH v6 8/9] target-mips: Add nan2008 flavor of <CEIL|CVT|FLOOR|ROUND|TRUNC>.<L|W>.<S|D>,
Aleksandar Markovic <=
- Re: [Qemu-arm] [PATCH v6 8/9] target-mips: Add nan2008 flavor of <CEIL|CVT|FLOOR|ROUND|TRUNC>.<L|W>.<S|D>, Maciej W. Rozycki, 2016/06/10
- Re: [Qemu-arm] [PATCH v6 8/9] target-mips: Add nan2008 flavor of <CEIL|CVT|FLOOR|ROUND|TRUNC>.<L|W>.<S|D>, Aleksandar Markovic, 2016/06/10
- Re: [Qemu-arm] [PATCH v6 8/9] target-mips: Add nan2008 flavor of <CEIL|CVT|FLOOR|ROUND|TRUNC>.<L|W>.<S|D>, Maciej W. Rozycki, 2016/06/10
- Re: [Qemu-arm] [PATCH v6 8/9] target-mips: Add nan2008 flavor of <CEIL|CVT|FLOOR|ROUND|TRUNC>.<L|W>.<S|D>, Leon Alrae, 2016/06/14
- Re: [Qemu-arm] [PATCH v6 8/9] target-mips: Add nan2008 flavor of <CEIL|CVT|FLOOR|ROUND|TRUNC>.<L|W>.<S|D>, Maciej W. Rozycki, 2016/06/14
- Re: [Qemu-arm] [PATCH v6 8/9] target-mips: Add nan2008 flavor of <CEIL|CVT|FLOOR|ROUND|TRUNC>.<L|W>.<S|D>, Aleksandar Markovic, 2016/06/20
- Re: [Qemu-arm] [PATCH v6 8/9] target-mips: Add nan2008 flavor of <CEIL|CVT|FLOOR|ROUND|TRUNC>.<L|W>.<S|D>, Maciej W. Rozycki, 2016/06/20