On 18.3.19. 19:30, Peter Maydell wrote:
On Mon, 18 Mar 2019 at 18:26, Mateja Marjanovic
<mateja.marjano...@rt-rk.com> wrote:
From: Mateja Marjanovic <mateja.marjano...@rt-rk.com>
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 <mateja.marjano...@rt-rk.com>
@@ -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