NetBSD Problem Report #59853
From www@netbsd.org Sun Dec 21 17:49:40 2025
Return-Path: <www@netbsd.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256
client-signature RSA-PSS (2048 bits) client-digest SHA256)
(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
by mollari.NetBSD.org (Postfix) with ESMTPS id DDE1E1A9239
for <gnats-bugs@gnats.NetBSD.org>; Sun, 21 Dec 2025 17:49:40 +0000 (UTC)
Message-Id: <20251221174939.932B41A923A@mollari.NetBSD.org>
Date: Sun, 21 Dec 2025 17:49:39 +0000 (UTC)
From: campbell+netbsd@mumble.net
Reply-To: campbell+netbsd@mumble.net
To: gnats-bugs@NetBSD.org
Subject: compiler-rt softfloat lacks floating-point exceptions
X-Send-Pr-Version: www-1.0
>Number: 59853
>Category: lib
>Synopsis: compiler-rt softfloat lacks floating-point exceptions
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: lib-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sun Dec 21 17:50:01 +0000 2025
>Last-Modified: Tue Dec 23 17:15:02 +0000 2025
>Originator: Taylor R Campbell
>Release: current, 11, 10, 9, ...
>Organization:
The NetBSD Exception, Inclangorated
>Environment:
>Description:
The softfloat code in compiler-rt never raises floating-point exceptions, neither as sticky bits by fetestexcept nor as traps with SIGFPE.
(The gcc softfloat code and the libc softfloat code, in contrast, do.)
>How-To-Repeat:
test fp exceptions in clang builds
>Fix:
Yes, please!
>Audit-Trail:
From: "Taylor R Campbell" <riastradh@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/59853 CVS commit: src/tests/lib/libc/gen
Date: Sun, 21 Dec 2025 19:07:50 +0000
Module Name: src
Committed By: riastradh
Date: Sun Dec 21 19:07:49 UTC 2025
Modified Files:
src/tests/lib/libc/gen: t_fpclassify.c
Log Message:
t_fpclassify: Fix long double mistakes.
1. Handle >64-bit long double with `union ieee_ext_u'.
2. Operationally verify the quiet vs signalling NaN bits.
3. xfail for softfloat and softfloat-long-double bugs on clang.
4. Print NaN encodings in hexadecimal to make diagnostics easier.
5. Add RCS id.
PR standards/59336: C23: Annex F and math.h extensions
PR lib/59853: compiler-rt softfloat lacks floating-point exceptions
To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/tests/lib/libc/gen/t_fpclassify.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
From: Nathanial Sloss <nathanialsloss@yahoo.com.au>
To: gnats-bugs@netbsd.org
Cc: campbell+netbsd@mumble.net
Subject: Re: lib/59853: compiler-rt softfloat lacks floating-point exceptions
Date: Mon, 22 Dec 2025 22:56:06 +1100
Hi Taylor,
Given the fact that clang build don't raise floating point exceptions and for a
more streamlined approach to soft-float in NetBSD, I think it's better to cut
the softfloat functions out of compiler-rt (where they are coverted by libc's
softfloat) and prefer libc's softfloat for all supported archs.
It would make softfloat maintence centralized and more managable.
I've cut the gcc softfloat funcs out of the default m68ksf builds so that
maintanence falls on us in libc and no need to upstream to gcc when we find
bugs in soft-float.
If all softfloat build (gcc or clang) use libc's softfloat I beleive things will
get a lot easier.
Anyway that's my 2 cents.
Best regards,
Nat
From: "Taylor R Campbell" <riastradh@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/59853 CVS commit: src/tests/lib/libc/gen
Date: Tue, 23 Dec 2025 17:11:43 +0000
Module Name: src
Committed By: riastradh
Date: Tue Dec 23 17:11:42 UTC 2025
Modified Files:
src/tests/lib/libc/gen: t_fpclassify.c
Log Message:
t_fpclassify: Fix build properly without __HAVE_LONG_DOUBLE.
Centralize use of union ieee_ext_u, used on machines where double is
not the same as long double, so most of the long double code doesn't
need __HAVE_LONG_DOUBLE conditionals (reminder: __HAVE_LONG_DOUBLE
means long double is _larger_ than double, not just that long double
exists; long double always exists and should work either way).
PR standards/59336: C23: Annex F and math.h extensions
PR lib/59853: compiler-rt softfloat lacks floating-point exceptions
To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/tests/lib/libc/gen/t_fpclassify.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
(Contact us)
$NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.