提交 a6e7c184 编写于 作者: R Richard Sandiford 提交者: Blue Swirl

softfloat: Handle float_muladd_negate_c when product is zero

Honour float_muladd_negate_c in the case where the product is zero and
c is nonzero.  Previously we would fail to negate c.

Seen in (and tested against) the gfortran testsuite on MIPS.
Signed-off-by: NRichard Sandiford <rdsandiford@googlemail.com>
Reviewed-by: NPeter Maydell <peter.maydell@linaro.org>
Signed-off-by: NBlue Swirl <blauwirbel@gmail.com>
上级 de16017d
......@@ -2234,7 +2234,7 @@ float32 float32_muladd(float32 a, float32 b, float32 c, int flags STATUS_PARAM)
}
}
/* Zero plus something non-zero : just return the something */
return make_float32(float32_val(c) ^ (signflip << 31));
return packFloat32(cSign ^ signflip, cExp, cSig);
}
if (aExp == 0) {
......@@ -3787,7 +3787,7 @@ float64 float64_muladd(float64 a, float64 b, float64 c, int flags STATUS_PARAM)
}
}
/* Zero plus something non-zero : just return the something */
return make_float64(float64_val(c) ^ ((uint64_t)signflip << 63));
return packFloat64(cSign ^ signflip, cExp, cSig);
}
if (aExp == 0) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册