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? > + } > /* Prefer sNaN over qNaN, in the c, a, b order. */ > if (is_snan(c_cls)) { > return 2; thanks -- PMM