summaryrefslogtreecommitdiff
path: root/lib/libc/arch/mips64
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libc/arch/mips64')
-rw-r--r--lib/libc/arch/mips64/gen/Makefile.inc4
-rw-r--r--lib/libc/arch/mips64/gen/isfinitel.c3
-rw-r--r--lib/libc/arch/mips64/gen/isinfl.c3
-rw-r--r--lib/libc/arch/mips64/gen/isnanl.c3
-rw-r--r--lib/libc/arch/mips64/gen/isnormall.c3
-rw-r--r--lib/libc/arch/mips64/gen/signbitl.c28
6 files changed, 38 insertions, 6 deletions
diff --git a/lib/libc/arch/mips64/gen/Makefile.inc b/lib/libc/arch/mips64/gen/Makefile.inc
index 2098bcc4d93..2e12b8d105f 100644
--- a/lib/libc/arch/mips64/gen/Makefile.inc
+++ b/lib/libc/arch/mips64/gen/Makefile.inc
@@ -1,9 +1,9 @@
-# $OpenBSD: Makefile.inc,v 1.6 2008/09/07 20:36:07 martynas Exp $
+# $OpenBSD: Makefile.inc,v 1.7 2008/12/09 19:52:33 martynas Exp $
SRCS+= _setjmp.S fabs.S infinity.c ldexp.S modf.S nan.c
SRCS+= flt_rounds.c fpgetmask.c fpgetround.c fpgetsticky.c fpsetmask.c \
fpsetround.c fpsetsticky.c
-SRCS+= fpclassifyl.c isfinitel.c isinfl.c isnanl.c isnormall.c
+SRCS+= fpclassifyl.c isfinitel.c isinfl.c isnanl.c isnormall.c signbitl.c
SRCS+= setjmp.S sigsetjmp.S
SRCS+= alloca.c
diff --git a/lib/libc/arch/mips64/gen/isfinitel.c b/lib/libc/arch/mips64/gen/isfinitel.c
index c86b9309da4..02a5602ea84 100644
--- a/lib/libc/arch/mips64/gen/isfinitel.c
+++ b/lib/libc/arch/mips64/gen/isfinitel.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: isfinitel.c,v 1.1 2008/09/07 20:36:07 martynas Exp $ */
+/* $OpenBSD: isfinitel.c,v 1.2 2008/12/09 19:52:33 martynas Exp $ */
/*
* Copyright (c) 2008 Martynas Venckus <martynas@openbsd.org>
*
@@ -17,6 +17,7 @@
#include <sys/types.h>
#include <machine/ieee.h>
+#include <math.h>
int
__isfinitel(long double e)
diff --git a/lib/libc/arch/mips64/gen/isinfl.c b/lib/libc/arch/mips64/gen/isinfl.c
index c529a91cd2f..1a96c5ef0f3 100644
--- a/lib/libc/arch/mips64/gen/isinfl.c
+++ b/lib/libc/arch/mips64/gen/isinfl.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: isinfl.c,v 1.1 2008/09/07 20:36:07 martynas Exp $ */
+/* $OpenBSD: isinfl.c,v 1.2 2008/12/09 19:52:34 martynas Exp $ */
/*
* Copyright (c) 2008 Martynas Venckus <martynas@openbsd.org>
*
@@ -17,6 +17,7 @@
#include <sys/types.h>
#include <machine/ieee.h>
+#include <math.h>
int
__isinfl(long double e)
diff --git a/lib/libc/arch/mips64/gen/isnanl.c b/lib/libc/arch/mips64/gen/isnanl.c
index 1838fcfe3fa..480677dce4e 100644
--- a/lib/libc/arch/mips64/gen/isnanl.c
+++ b/lib/libc/arch/mips64/gen/isnanl.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: isnanl.c,v 1.1 2008/09/07 20:36:07 martynas Exp $ */
+/* $OpenBSD: isnanl.c,v 1.2 2008/12/09 19:52:34 martynas Exp $ */
/*
* Copyright (c) 2008 Martynas Venckus <martynas@openbsd.org>
*
@@ -17,6 +17,7 @@
#include <sys/types.h>
#include <machine/ieee.h>
+#include <math.h>
int
__isnanl(long double e)
diff --git a/lib/libc/arch/mips64/gen/isnormall.c b/lib/libc/arch/mips64/gen/isnormall.c
index a8b4314afc9..df6cdc52efd 100644
--- a/lib/libc/arch/mips64/gen/isnormall.c
+++ b/lib/libc/arch/mips64/gen/isnormall.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: isnormall.c,v 1.1 2008/09/07 20:36:07 martynas Exp $ */
+/* $OpenBSD: isnormall.c,v 1.2 2008/12/09 19:52:34 martynas Exp $ */
/*
* Copyright (c) 2008 Martynas Venckus <martynas@openbsd.org>
*
@@ -17,6 +17,7 @@
#include <sys/types.h>
#include <machine/ieee.h>
+#include <math.h>
int
__isnormall(long double e)
diff --git a/lib/libc/arch/mips64/gen/signbitl.c b/lib/libc/arch/mips64/gen/signbitl.c
new file mode 100644
index 00000000000..a57ea9731d5
--- /dev/null
+++ b/lib/libc/arch/mips64/gen/signbitl.c
@@ -0,0 +1,28 @@
+/* $OpenBSD: signbitl.c,v 1.1 2008/12/09 19:52:34 martynas Exp $ */
+/*
+ * Copyright (c) 2008 Martynas Venckus <martynas@openbsd.org>
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#include <sys/types.h>
+#include <machine/ieee.h>
+#include <math.h>
+
+int
+__signbitl(long double e)
+{
+ struct ieee_ext *p = (struct ieee_ext *)&e;
+
+ return p->ext_sign;
+}