summaryrefslogtreecommitdiffstats
path: root/lib/libc/mips/gen/infinity.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libc/mips/gen/infinity.c')
-rw-r--r--lib/libc/mips/gen/infinity.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/lib/libc/mips/gen/infinity.c b/lib/libc/mips/gen/infinity.c
new file mode 100644
index 0000000..55cf25f
--- /dev/null
+++ b/lib/libc/mips/gen/infinity.c
@@ -0,0 +1,26 @@
+/*
+ * infinity.c
+ */
+
+#include <sys/cdefs.h>
+__FBSDID("$FreeBSD$");
+
+#include <math.h>
+
+/* bytes for +Infinity on a 387 */
+const union __infinity_un __infinity = {
+#if BYTE_ORDER == BIG_ENDIAN
+ { 0x7f, 0xf0, 0, 0, 0, 0, 0, 0 }
+#else
+ { 0, 0, 0, 0, 0, 0, 0xf0, 0x7f }
+#endif
+};
+
+/* bytes for NaN */
+const union __nan_un __nan = {
+#if BYTE_ORDER == BIG_ENDIAN
+ {0x7f, 0xa0, 0, 0}
+#else
+ { 0, 0, 0xa0, 0x7f }
+#endif
+};
OpenPOWER on IntegriCloud