Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/lib/libc/arch/riscv/gdtoa Provide a definition of quiet NaN ...



details:   https://anonhg.NetBSD.org/src/rev/152db4b29d15
branches:  trunk
changeset: 455814:152db4b29d15
user:      maya <maya%NetBSD.org@localhost>
date:      Sun Apr 14 19:25:27 2019 +0000

description:
Provide a definition of quiet NaN for RISC-V, and a reference to where
it comes from.

diffstat:

 lib/libc/arch/riscv/gdtoa/gd_qnan.h |  20 +++++++++++++++++---
 1 files changed, 17 insertions(+), 3 deletions(-)

diffs (26 lines):

diff -r a613563b2190 -r 152db4b29d15 lib/libc/arch/riscv/gdtoa/gd_qnan.h
--- a/lib/libc/arch/riscv/gdtoa/gd_qnan.h       Sun Apr 14 19:21:37 2019 +0000
+++ b/lib/libc/arch/riscv/gdtoa/gd_qnan.h       Sun Apr 14 19:25:27 2019 +0000
@@ -1,5 +1,19 @@
-/* $NetBSD: gd_qnan.h,v 1.1 2014/09/19 17:36:25 matt Exp $ */
+/* $NetBSD: gd_qnan.h,v 1.2 2019/04/14 19:25:27 maya Exp $ */
 
-#define f_QNAN 0x7fe00000
+/* 
+ * The RISC-V Instruction Set Manual Volume I: User-Level ISA
+ * Document Version 2.2
+ *
+ * 8.3 NaN Generation and Propagation
+ *
+ * The canonical NaN has a positive sign and all significand bits clear except
+ * the MSB, aka the quiet bit.
+ */
+
+#define f_QNAN 0x7fc00000
 #define d_QNAN0 0x0
-#define d_QNAN1 0x7ffc0000
+#define d_QNAN1 0x7ff80000
+#define ld_QNAN0 0x0
+#define ld_QNAN1 0x0
+#define ld_QNAN2 0x0
+#define ld_QNAN3 0x7fff8000



Home | Main Index | Thread Index | Old Index