git: 1ae396e2adae - stable/14 - libc: fix strtold NaN representation on riscv
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 26 Jun 2026 16:59:41 UTC
The branch stable/14 has been updated by siva:
URL: https://cgit.FreeBSD.org/src/commit/?id=1ae396e2adaebb4fc71d29628789804ac9b0be44
commit 1ae396e2adaebb4fc71d29628789804ac9b0be44
Author: Siva Mahadevan <siva@FreeBSD.org>
AuthorDate: 2026-06-10 22:29:02 +0000
Commit: Siva Mahadevan <siva@FreeBSD.org>
CommitDate: 2026-06-26 15:59:48 +0000
libc: fix strtold NaN representation on riscv
Regenerate gd_qnan.h on riscv using the qnan.c
config tool found in contrib/gdtoa.
This fixes the following tests in CI:
lib/libc/stdio/scanfloat_test:infinities_and_nans
lib/libc/stdlib/strtod_test:strtold_nan
Reviewed by: jrtc27
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D57405
(cherry picked from commit 1e25cda7f06923d05e28dac8eb1c1c428a5c92dc)
---
lib/libc/riscv/gd_qnan.h | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/lib/libc/riscv/gd_qnan.h b/lib/libc/riscv/gd_qnan.h
index 66e48706d6bb..d4e3baeed108 100644
--- a/lib/libc/riscv/gd_qnan.h
+++ b/lib/libc/riscv/gd_qnan.h
@@ -9,11 +9,11 @@
#define d_QNAN0 0x0
#define d_QNAN1 0x7ff80000
#define ld_QNAN0 0x0
-#define ld_QNAN1 0x7ff80000
+#define ld_QNAN1 0x0
#define ld_QNAN2 0x0
-#define ld_QNAN3 0x0
+#define ld_QNAN3 0x7fff8000
#define ldus_QNAN0 0x0
#define ldus_QNAN1 0x0
#define ldus_QNAN2 0x0
-#define ldus_QNAN3 0x7ff8
+#define ldus_QNAN3 0x0
#define ldus_QNAN4 0x0