summaryrefslogtreecommitdiff
path: root/lib/libc/arch/sparc64/gen/fpgetmask.c
diff options
context:
space:
mode:
authorArtur Grabowski <art@cvs.openbsd.org>2001-08-29 01:34:57 +0000
committerArtur Grabowski <art@cvs.openbsd.org>2001-08-29 01:34:57 +0000
commita0e342cbcdc6c3e7bdae4f0dc1bab6d367701b8c (patch)
tree7c822597dff56a255b9a48a5128f065c2335b556 /lib/libc/arch/sparc64/gen/fpgetmask.c
parentf5d8187cfb4c3d0b278a368c31497bc47f8c0d23 (diff)
bunch of files from sparc.
Diffstat (limited to 'lib/libc/arch/sparc64/gen/fpgetmask.c')
-rw-r--r--lib/libc/arch/sparc64/gen/fpgetmask.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/lib/libc/arch/sparc64/gen/fpgetmask.c b/lib/libc/arch/sparc64/gen/fpgetmask.c
new file mode 100644
index 00000000000..b47875d6695
--- /dev/null
+++ b/lib/libc/arch/sparc64/gen/fpgetmask.c
@@ -0,0 +1,17 @@
+/* $OpenBSD: fpgetmask.c,v 1.1 2001/08/29 01:34:56 art Exp $ */
+
+/*
+ * Written by J.T. Conklin, Apr 10, 1995
+ * Public domain.
+ */
+
+#include <ieeefp.h>
+
+fp_except
+fpgetmask()
+{
+ int x;
+
+ __asm__("st %%fsr,%0" : "=m" (*&x));
+ return (x >> 23) & 0x1f;
+}