qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] target/mips: Fix minor bug in FPU


From: Mateja Marjanovic
Subject: Re: [Qemu-devel] [PATCH] target/mips: Fix minor bug in FPU
Date: Tue, 19 Mar 2019 10:12:14 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.5.1


On 18.3.19. 19:30, Peter Maydell wrote:
On Mon, 18 Mar 2019 at 18:26, Mateja Marjanovic
<address@hidden> wrote:
From: Mateja Marjanovic <address@hidden>

Wrong type of NaN was generated for IEEE754-2008 by maddf and
msubf insturctions when the arguments were inf, zero, nan or
zero, inf, nan respectively.

Signed-off-by: Mateja Marjanovic <address@hidden>
@@ -519,6 +519,14 @@ static int pickNaNMulAdd(FloatClass a_cls, FloatClass 
b_cls, FloatClass c_cls,
              return 2;
          }
      } else {
+        /*
+         * For MIPS systems that conform to IEEE754-2008, the (inf,zero,qnan)
+         * case sets InvalidOp and returns the default NaN
+         */
+        if (infzero) {
+            float_raise(float_flag_invalid, status);
+            return 2;
The comment says we return the default NaN, but the code says
we return the input NaN (ie the input value 'c'). Which is correct?
It should be the input value 'c', I wrote that by mistake. It will be corrected in v3.
+        }
          /* Prefer sNaN over qNaN, in the c, a, b order. */
          if (is_snan(c_cls)) {
              return 2;
thanks
-- PMM
Thanks for noticing.
Regards,
Mateja



reply via email to

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