aboutsummaryrefslogtreecommitdiff
path: root/fpu
diff options
context:
space:
mode:
authorSong Gao <gaosong@loongson.cn>2022-09-30 10:45:10 +0800
committerSong Gao <gaosong@loongson.cn>2022-10-17 10:28:35 +0800
commit3cf71969095a99f840cd4b3f4aae696ce44b8078 (patch)
tree4e7c32f19d11e2168c1e922a8bf40acc3955b9ff /fpu
parent153620126add5c4868308cc5831d400c7e7029ad (diff)
downloadqemu-3cf71969095a99f840cd4b3f4aae696ce44b8078.zip
qemu-3cf71969095a99f840cd4b3f4aae696ce44b8078.tar.gz
qemu-3cf71969095a99f840cd4b3f4aae696ce44b8078.tar.bz2
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>
Diffstat (limited to 'fpu')
-rw-r--r--fpu/softfloat-parts.c.inc1
1 files changed, 1 insertions, 0 deletions
diff --git a/fpu/softfloat-parts.c.inc b/fpu/softfloat-parts.c.inc
index a9f268f..2474000 100644
--- a/fpu/softfloat-parts.c.inc
+++ b/fpu/softfloat-parts.c.inc
@@ -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;