All of lore.kernel.org
 help / color / mirror / Atom feed
From: Song Gao <gaosong@loongson.cn>
To: qemu-devel@nongnu.org
Cc: richard.henderson@linaro.org, stefanha@gmail.com
Subject: [PULL 3/5] softfloat: logB(0) should raise divideByZero exception
Date: Mon, 17 Oct 2022 14:39:42 +0800	[thread overview]
Message-ID: <20221017063944.1443723-4-gaosong@loongson.cn> (raw)
In-Reply-To: <20221017063944.1443723-1-gaosong@loongson.cn>

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>
---
 fpu/softfloat-parts.c.inc | 1 +
 1 file changed, 1 insertion(+)

diff --git a/fpu/softfloat-parts.c.inc b/fpu/softfloat-parts.c.inc
index a9f268fcab..247400031c 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;
-- 
2.31.1



  parent reply	other threads:[~2022-10-17  6:57 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-17  6:39 [PULL 0/5] loongarch-to-apply queue Song Gao
2022-10-17  6:39 ` [PULL 1/5] target/loongarch: bstrins.w src register need EXT_NONE Song Gao
2022-10-17  6:39 ` [PULL 2/5] target/loongarch: Fix fnm{sub/add}_{s/d} set wrong flags Song Gao
2022-10-17  6:39 ` Song Gao [this message]
2022-10-17  6:39 ` [PULL 4/5] linux-user: Fix struct statfs ABI on loongarch64 Song Gao
2022-10-17  6:39 ` [PULL 5/5] hw/intc: Fix LoongArch ipi device emulation Song Gao
2022-10-17 21:22 ` [PULL 0/5] loongarch-to-apply queue Stefan Hajnoczi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20221017063944.1443723-4-gaosong@loongson.cn \
    --to=gaosong@loongson.cn \
    --cc=qemu-devel@nongnu.org \
    --cc=richard.henderson@linaro.org \
    --cc=stefanha@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.