qemu-arm
[Top][All Lists]
Advanced

[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: Maciej W. Rozycki
Subject: Re: [Qemu-arm] [PATCH v6 8/9] target-mips: Add nan2008 flavor of <CEIL|CVT|FLOOR|ROUND|TRUNC>.<L|W>.<S|D>
Date: Tue, 7 Jun 2016 12:39:29 +0100
User-agent: Alpine 2.00 (DEB 1167 2008-08-23)

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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]