mirror of
https://github.com/xemu-project/xemu.git
synced 2024-11-26 21:10:42 +00:00
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);
|
parts_return_nan(a, s);
|
||||||
return;
|
return;
|
||||||
case float_class_zero:
|
case float_class_zero:
|
||||||
|
float_raise(float_flag_divbyzero, s);
|
||||||
/* log2(0) = -inf */
|
/* log2(0) = -inf */
|
||||||
a->cls = float_class_inf;
|
a->cls = float_class_inf;
|
||||||
a->sign = 1;
|
a->sign = 1;
|
||||||
|
Loading…
Reference in New Issue
Block a user