All of lore.kernel.org
 help / color / mirror / Atom feed
From: Max Chou <max.chou@sifive.com>
To: Richard Henderson <richard.henderson@linaro.org>
Cc: qemu-devel@nongnu.org, qemu-riscv@nongnu.org,
	"Palmer Dabbelt" <palmer@dabbelt.com>,
	"Alistair Francis" <Alistair.Francis@wdc.com>,
	"Aurelien Jarno" <aurelien@aurel32.net>,
	"Peter Maydell" <peter.maydell@linaro.org>,
	"Alex Bennée" <alex.bennee@linaro.org>,
	"Paolo Bonzini" <pbonzini@redhat.com>,
	"Eduardo Habkost" <eduardo@habkost.net>,
	"Weiwei Li" <liwei1518@gmail.com>,
	"Daniel Henrique Barboza" <dbarboza@ventanamicro.com>,
	"Liu Zhiwei" <zhiwei_liu@linux.alibaba.com>
Subject: Re: [PATCH v3 05/19] fpu/softfloat: Support OCP(Open Compute Project) OFP8 data type
Date: Fri, 6 Feb 2026 00:37:09 +0800	[thread overview]
Message-ID: <aYTFLP1udcwS3F0H@sifive.com> (raw)
In-Reply-To: <797df006-5270-462d-a0a4-4e5951cbdb1d@linaro.org>

On 2026-02-05 14:36, Richard Henderson wrote:
> In particular, I think separating "no_infinity" and "limited_nan" leads to
> confusing checks, such as the one in parts_canonicalize where you test
> "limited_nan" in a context that is really testing for overflow to infinity.
> 
> Further, normal_frac_max is defined oddly, such that you have to test it
> twice, once vs frac_hi and once vs NORMAL_FRAC_MAX_ALL.  Since this is used
> for exactly one format, this is perhaps trying to be overly general.
> 
> I think better might be:
> 
>     typedef enum {
>         /* exp==max, frac==0 ? infinity : nan; this is ieee standard. */
>         float_maxexp_ieee,
>         /* exp==max is a normal number; no infinity or nan representation. */
>         float_maxexp_normal,
>         /* exp==max, frac==max ? nan : normal; no infinity. */
>         float_maxexp_e4m3,
>     } FloatFmtMaxExp;
> 
> We can stage in this behaviour without also including either FP8 format.
> Just changing Arm althp in a separate patch is large enough.
> 
> 
> r~

Hi Richard,

Thank you for the suggestions and v4 for softfloat part.
I agree that the original patch should be separated and the solution you
suggested is better.
I'll seperate the riscv isa part to another v4 patch based on the
softfloat v4.
And will also testing the softfloat v4 you provided and fix some
saturate issues on that.

Thanks a lot,
rnax


  reply	other threads:[~2026-02-05 16:37 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-04  5:17 [PATCH v3 00/19] Add OCP FP8/FP4 and RISC-V Zvfofp8min/Zvfofp4min extension support Max Chou
2026-02-04  5:17 ` [PATCH v3 01/19] target/riscv: rvv: Fix NOP_UU_B vs2 width Max Chou
2026-02-04  5:17 ` [PATCH v3 02/19] fpu/softfloat: Refactor IEEE format NaN classification to share code Max Chou
2026-02-05  3:29   ` Richard Henderson
2026-02-04  5:17 ` [PATCH v3 03/19] fpu/softfloat: Refactor floatx80 " Max Chou
2026-02-05  3:31   ` Richard Henderson
2026-02-04  5:17 ` [PATCH v3 04/19] target/i386: Fix pseudo-NaN handling in FPATAN/FYL2XP1/FYL2X helpers Max Chou
2026-02-05  3:34   ` Richard Henderson
2026-02-04  5:17 ` [PATCH v3 05/19] fpu/softfloat: Support OCP(Open Compute Project) OFP8 data type Max Chou
2026-02-05  4:36   ` Richard Henderson
2026-02-05 16:37     ` Max Chou [this message]
2026-02-05 13:21   ` Chao Liu
2026-02-05 16:48     ` Max Chou
2026-02-04  5:17 ` [PATCH v3 06/19] fpu/softfloat: Support OCP(Open Compute Project) OFP4 " Max Chou
2026-02-04  5:17 ` [PATCH v3 07/19] target/riscv: Add cfg properity for Zvfofp8min extension Max Chou
2026-02-04 16:29   ` Chao Liu
2026-02-05  7:33     ` Max Chou
2026-02-04  5:17 ` [PATCH v3 08/19] target/riscv: Add implied rules " Max Chou
2026-02-04  5:17 ` [PATCH v3 09/19] target/riscv: rvv: Make vfwcvtbf16.f.f.v support OFP8 to BF16 conversion " Max Chou
2026-02-04 16:34   ` Chao Liu
2026-02-04 16:54   ` Chao Liu
2026-02-04  5:17 ` [PATCH v3 10/19] target/riscv: rvv: Make vfncvtbf16.f.f.w support BF16 to OFP8 " Max Chou
2026-02-04  5:17 ` [PATCH v3 11/19] target/riscv: rvv: Add vfncvtbf16.sat.f.f.w instruction " Max Chou
2026-02-04  5:17 ` [PATCH v3 12/19] target/riscv: rvv: Add vfncvt.f.f.q and vfncvt.sat.f.f.q instructions " Max Chou
2026-02-04  5:17 ` [PATCH v3 13/19] target/riscv: Expose Zvfofp8min properity Max Chou
2026-02-04  5:17 ` [PATCH v3 14/19] disas/riscv: Add support of Zvfofp8min extension Max Chou
2026-02-04 16:35   ` Chao Liu
2026-02-04  5:17 ` [PATCH v3 15/19] target/riscv: Add cfg properity for Zvfofp4min extension Max Chou
2026-02-04  5:17 ` [PATCH v3 16/19] target/riscv: Add implied rules " Max Chou
2026-02-04  5:17 ` [PATCH v3 17/19] target/riscv: rvv: Add vfext.vf2 instruction " Max Chou
2026-02-05  4:06   ` Chao Liu
2026-02-04  5:17 ` [PATCH v3 18/19] target/riscv: Expose Zvfofp4min properity Max Chou
2026-02-04  5:17 ` [PATCH v3 19/19] disas/riscv: Add support of Zvfofp4min extension Max Chou
2026-02-04 16:43   ` Chao Liu
2026-02-04 16:46     ` Chao Liu
2026-02-04 16:59 ` [PATCH v3 00/19] Add OCP FP8/FP4 and RISC-V Zvfofp8min/Zvfofp4min extension support Chao Liu

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=aYTFLP1udcwS3F0H@sifive.com \
    --to=max.chou@sifive.com \
    --cc=Alistair.Francis@wdc.com \
    --cc=alex.bennee@linaro.org \
    --cc=aurelien@aurel32.net \
    --cc=dbarboza@ventanamicro.com \
    --cc=eduardo@habkost.net \
    --cc=liwei1518@gmail.com \
    --cc=palmer@dabbelt.com \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-riscv@nongnu.org \
    --cc=richard.henderson@linaro.org \
    --cc=zhiwei_liu@linux.alibaba.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.