softfloat: logB(0) should raise divideByZero exception
logB(0) should raise divideByZero exception from IEEE 754-2008 spec 7.3 Suggested-by: Richard Henderson <richard.henderson@linaro.org> Signed-off-by: Song Gao <gaosong@loongson.cn> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-Id: <20220930024510.800005-4-gaosong@loongson.cn>
This commit is contained in:
parent
153620126a
commit
3cf7196909
@ -1436,6 +1436,7 @@ static void partsN(log2)(FloatPartsN *a, float_status *s, const FloatFmt *fmt)
|
||||
parts_return_nan(a, s);
|
||||
return;
|
||||
case float_class_zero:
|
||||
float_raise(float_flag_divbyzero, s);
|
||||
/* log2(0) = -inf */
|
||||
a->cls = float_class_inf;
|
||||
a->sign = 1;
|
||||
|
Loading…
Reference in New Issue
Block a user