qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Richard Henderson <richard.henderson@linaro.org>
To: Song Gao <gaosong@loongson.cn>, qemu-devel@nongnu.org
Cc: yangxiaojuan@loongson.cn, huqi@loongson.cn,
	peter.maydell@linaro.org, alex.bennee@linaro.org,
	maobibo@loongson.cn
Subject: Re: [PATCH v2 4/4] target/loongarch: flogb_{s/d} add set float_flag_divbyzero
Date: Wed, 28 Sep 2022 08:24:44 -0700	[thread overview]
Message-ID: <673a8e64-31f4-99a6-2e1d-ffb833237e16@linaro.org> (raw)
In-Reply-To: <20220927064838.3570928-5-gaosong@loongson.cn>

On 9/26/22 23:48, Song Gao wrote:
> if fj ==0 or fj == INT32_MIN/INT64_MIN, LoongArch host set fcsr cause exception FP_DIV0,
> So we need set exception flags float_flagdivbyzero if fj ==0.

You are correct that ieee754 says that logB(0) should raise divbyzero.
This should be fixed in softfloat-parts.c.inc, not here, within

         case float_class_zero:

             /* log2(0) = -inf */

             a->cls = float_class_inf;

             a->sign = 1;

             return;



r~


  reply	other threads:[~2022-09-28 15:30 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-27  6:48 [PATCH v2 0/4] Fix some loongarch tcg bugs Song Gao
2022-09-27  6:48 ` [PATCH v2 1/4] target/loongarch: ftint_xxx insns set the result high 32bit 0xffffffff Song Gao
2022-09-28 15:14   ` Richard Henderson
2022-09-29  3:24     ` gaosong
2022-09-27  6:48 ` [PATCH v2 2/4] target/loongarch: bstrins.w need set dest register EXT_SIGN Song Gao
2022-09-28 15:13   ` Richard Henderson
2022-09-29  7:27     ` gaosong
2022-09-29 15:14       ` Richard Henderson
2022-09-27  6:48 ` [PATCH v2 3/4] target/loongarch: Fix fnm{sub/add}_{s/d} set wrong flags Song Gao
2022-09-28 15:16   ` Richard Henderson
2022-09-27  6:48 ` [PATCH v2 4/4] target/loongarch: flogb_{s/d} add set float_flag_divbyzero Song Gao
2022-09-28 15:24   ` Richard Henderson [this message]
2022-09-29  7:27     ` gaosong

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=673a8e64-31f4-99a6-2e1d-ffb833237e16@linaro.org \
    --to=richard.henderson@linaro.org \
    --cc=alex.bennee@linaro.org \
    --cc=gaosong@loongson.cn \
    --cc=huqi@loongson.cn \
    --cc=maobibo@loongson.cn \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=yangxiaojuan@loongson.cn \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).