summaryrefslogtreecommitdiffstats
path: root/lib/libc/mips/gen/fpgetsticky.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libc/mips/gen/fpgetsticky.c')
-rw-r--r--lib/libc/mips/gen/fpgetsticky.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/lib/libc/mips/gen/fpgetsticky.c b/lib/libc/mips/gen/fpgetsticky.c
new file mode 100644
index 0000000..f7057ff
--- /dev/null
+++ b/lib/libc/mips/gen/fpgetsticky.c
@@ -0,0 +1,19 @@
+/*
+ * Written by J.T. Conklin, Apr 11, 1995
+ * Public domain.
+ */
+
+#if defined(LIBC_SCCS) && !defined(lint)
+static char rcsid[] = "$OpenBSD$";
+#endif /* LIBC_SCCS and not lint */
+
+#include <ieeefp.h>
+
+fp_except
+fpgetsticky()
+{
+ int x;
+
+ __asm__("cfc1 %0,$31" : "=r" (x));
+ return (x >> 2) & 0x1f;
+}
OpenPOWER on IntegriCloud