All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com>
To: "Alex Bennée" <alex.bennee@linaro.org>, qemu-devel@nongnu.org
Cc: "Daniel P. Berrangé" <berrange@redhat.com>,
	"Yoshinori Sato" <yoshinori.sato@nifty.com>,
	"Liu Zhiwei" <zhiwei_liu@linux.alibaba.com>,
	qemu-s390x@nongnu.org, "Aleksandar Rikalo" <arikalo@gmail.com>,
	"David Hildenbrand" <david@kernel.org>,
	"Laurent Vivier" <laurent@vivier.eu>,
	"Song Gao" <17746591750@163.com>,
	"Jiaxun Yang" <jiaxun.yang@flygoat.com>,
	"Marc-André Lureau" <marcandre.lureau@redhat.com>,
	"Peter Maydell" <peter.maydell@linaro.org>,
	"Philippe Mathieu-Daudé" <philmd@oss.qualcomm.com>,
	"Xianglai Li" <lixianglai@loongson.cn>,
	qemu-riscv@nongnu.org, qemu-arm@nongnu.org,
	"Daniel Henrique Barboza" <daniel.barboza@oss.qualcomm.com>,
	qemu-ppc@nongnu.org, "Brian Cain" <brian.cain@oss.qualcomm.com>,
	"Nicholas Piggin" <npiggin@gmail.com>,
	"Ilya Leoshkevich" <iii@linux.ibm.com>,
	"Alistair Francis" <alistair.francis@wdc.com>,
	"Helge Deller" <deller@gmx.de>, "Weiwei Li" <liwei1518@gmail.com>,
	"Richard Henderson" <richard.henderson@linaro.org>,
	"Aurelien Jarno" <aurelien@aurel32.net>,
	"Chao Liu" <chao.liu@processmission.com>,
	"Palmer Dabbelt" <palmer@dabbelt.com>,
	"Stafford Horne" <shorne@gmail.com>,
	"Glenn Miles" <milesg@linux.ibm.com>,
	"Harsh Prateek Bora" <harshpb@linux.ibm.com>,
	"Chinmay Rath" <rathc@linux.ibm.com>,
	"Paolo Bonzini" <pbonzini@redhat.com>,
	"Bibo Mao" <maobibo@loongson.cn>
Subject: Re: [PATCH 4/4] fpu/softfloat: gate hardfloat on working fmaf
Date: Mon, 30 Nov 2026 12:35:32 -0800	[thread overview]
Message-ID: <ebc418ee-ce35-4e58-b3ef-91c1cd328876@oss.qualcomm.com> (raw)
In-Reply-To: <20261130201623.159433-5-alex.bennee@linaro.org>

On 11/30/2026 12:16 PM, Alex Bennée wrote:
> We already had a test against fma to catch broken glibc's but
> apparently there are mingw64 cases that are broken for fmaf on
> Windows. Add a test to softfloat_init so we can disable if we detect
> the brokenness.
> 
> Resolves: https://gitlab.com/qemu-project/qemu/-/work_items/5023
> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
> ---
>  fpu/softfloat.c | 10 ++++++++++
>  1 file changed, 10 insertions(+)
> 
> diff --git a/fpu/softfloat.c b/fpu/softfloat.c
> index bc244a44ffb..4531de5e6cf 100644
> --- a/fpu/softfloat.c
> +++ b/fpu/softfloat.c
> @@ -5161,4 +5161,14 @@ static void __attribute__((constructor)) softfloat_init(void)
>      if (ur.s != 0x0020000000000001ULL) {
>          force_soft_fma = true;
>      }
> +
> +    /*
> +     * Test that the host's fmaf is not obviously broken. For example,
> +     * mingw-w64 can perform an incorrect fmaf on certain hosts; see
> +     *   https://gitlab.com/qemu-project/qemu/-/issues/5023
> +     *   https://sourceforge.net/p/mingw-w64/bugs/848/
> +     */
> +    if (fmaf(FLT_MAX, 2.0f, -FLT_MAX) != FLT_MAX) {
> +        force_soft_fma = true;
> +    }
>  }

Reviewed-by: Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com>



  reply	other threads:[~2026-11-30 20:36 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-30 20:16 [PATCH 0/4] [soft|hard]float: tests and bug fix for #5203 Alex Bennée
2026-11-30 20:16 ` [PATCH 1/4] meson: expose MESON_SOURCE_ROOT to scripts Alex Bennée
2026-11-30 20:34   ` Pierrick Bouvier
2026-11-30 20:16 ` [PATCH 2/4] scripts/tests: add regen-reference.sh Alex Bennée
2026-11-30 20:34   ` Pierrick Bouvier
2026-11-30 20:16 ` [PATCH 3/4] tests/tcg: extend the float_madds test case Alex Bennée
2026-11-30 20:34   ` Pierrick Bouvier
2026-11-30 20:16 ` [PATCH 4/4] fpu/softfloat: gate hardfloat on working fmaf Alex Bennée
2026-11-30 20:35   ` Pierrick Bouvier [this message]
2026-11-30 20:36 ` [PATCH 0/4] [soft|hard]float: tests and bug fix for #5203 Pierrick Bouvier
2026-11-30 22:27   ` Alex Bennée

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=ebc418ee-ce35-4e58-b3ef-91c1cd328876@oss.qualcomm.com \
    --to=pierrick.bouvier@oss.qualcomm.com \
    --cc=17746591750@163.com \
    --cc=alex.bennee@linaro.org \
    --cc=alistair.francis@wdc.com \
    --cc=arikalo@gmail.com \
    --cc=aurelien@aurel32.net \
    --cc=berrange@redhat.com \
    --cc=brian.cain@oss.qualcomm.com \
    --cc=chao.liu@processmission.com \
    --cc=daniel.barboza@oss.qualcomm.com \
    --cc=david@kernel.org \
    --cc=deller@gmx.de \
    --cc=harshpb@linux.ibm.com \
    --cc=iii@linux.ibm.com \
    --cc=jiaxun.yang@flygoat.com \
    --cc=laurent@vivier.eu \
    --cc=liwei1518@gmail.com \
    --cc=lixianglai@loongson.cn \
    --cc=maobibo@loongson.cn \
    --cc=marcandre.lureau@redhat.com \
    --cc=milesg@linux.ibm.com \
    --cc=npiggin@gmail.com \
    --cc=palmer@dabbelt.com \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=philmd@oss.qualcomm.com \
    --cc=qemu-arm@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@nongnu.org \
    --cc=qemu-riscv@nongnu.org \
    --cc=qemu-s390x@nongnu.org \
    --cc=rathc@linux.ibm.com \
    --cc=richard.henderson@linaro.org \
    --cc=shorne@gmail.com \
    --cc=yoshinori.sato@nifty.com \
    --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.