summaryrefslogtreecommitdiffstats
path: root/newlib/libc/stdlib/gd_qnan.h
diff options
context:
space:
mode:
authorJeff Johnston <jjohnstn@redhat.com>2006-06-22 17:59:52 +0000
committerJeff Johnston <jjohnstn@redhat.com>2006-06-22 17:59:52 +0000
commitf489b5943c8f8655b0a3caddd38114111576ab35 (patch)
treee5db470212203f6eb28752047e58cb287418bc1b /newlib/libc/stdlib/gd_qnan.h
parent09fd280ca40c0b1211d3e8b31c3a813150c57c6b (diff)
downloadcygnal-f489b5943c8f8655b0a3caddd38114111576ab35.tar.gz
cygnal-f489b5943c8f8655b0a3caddd38114111576ab35.tar.bz2
cygnal-f489b5943c8f8655b0a3caddd38114111576ab35.zip
2006-06-22 Jeff Johnston <jjohnstn@redhat.com>
* libc/stdlib/Makefile.am: Add new gdtoa routines. * libc/stdlib/Makefile.in: Regenerated. * libc/stdlib/gd_qnan.h: New file. * libc/stdlib/gdtoa-gethex.c: Ditto. * libc/stdlib/gdtoa-hexnan.c: Ditto. * libc/stdlib/gdtoa.h: Ditto. * libc/stdlib/mprec.c: Add new helper routines needed by the new gdtoa code. * libc/stdlib/mprec.h: Integrate some defines and prototypes used by gdtoa routines here. * libc/stdlib/strtod.c: Rebased on David M. Gay's gdtoa-strtod.c which adds C99 support such as nan, inf, and hexadecimal input format.
Diffstat (limited to 'newlib/libc/stdlib/gd_qnan.h')
-rw-r--r--newlib/libc/stdlib/gd_qnan.h33
1 files changed, 33 insertions, 0 deletions
diff --git a/newlib/libc/stdlib/gd_qnan.h b/newlib/libc/stdlib/gd_qnan.h
new file mode 100644
index 000000000..68f16cd12
--- /dev/null
+++ b/newlib/libc/stdlib/gd_qnan.h
@@ -0,0 +1,33 @@
+#ifdef __IEEE_BIG_ENDIAN
+
+#define f_QNAN 0x7fc00000
+#define d_QNAN0 0x7ff80000
+#define d_QNAN1 0x0
+#define ld_QNAN0 0x7ff80000
+#define ld_QNAN1 0x0
+#define ld_QNAN2 0x0
+#define ld_QNAN3 0x0
+#define ldus_QNAN0 0x7ff8
+#define ldus_QNAN1 0x0
+#define ldus_QNAN2 0x0
+#define ldus_QNAN3 0x0
+#define ldus_QNAN4 0x0
+
+#elif defined(__IEEE_LITTLE_ENDIAN)
+
+#define f_QNAN 0xffc00000
+#define d_QNAN0 0x0
+#define d_QNAN1 0xfff80000
+#define ld_QNAN0 0x0
+#define ld_QNAN1 0xc0000000
+#define ld_QNAN2 0xffff
+#define ld_QNAN3 0x0
+#define ldus_QNAN0 0x0
+#define ldus_QNAN1 0x0
+#define ldus_QNAN2 0x0
+#define ldus_QNAN3 0xc000
+#define ldus_QNAN4 0xffff
+
+#else
+#error IEEE endian not defined
+#endif