git: 1e25cda7f069 - main - libc: fix strtold NaN representation on riscv
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 10 Jun 2026 23:32:33 UTC
The branch main has been updated by siva:
URL: https://cgit.FreeBSD.org/src/commit/?id=1e25cda7f06923d05e28dac8eb1c1c428a5c92dc
commit 1e25cda7f06923d05e28dac8eb1c1c428a5c92dc
Author: Siva Mahadevan <siva@FreeBSD.org>
AuthorDate: 2026-06-10 22:29:02 +0000
Commit: Siva Mahadevan <siva@FreeBSD.org>
CommitDate: 2026-06-10 23:30:40 +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
---
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