about summary refs log tree commit diff
path: root/src/fenv/fegetexceptflag.c
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2011-06-12 15:58:15 -0400
committerRich Felker <dalias@aerifal.cx>2011-06-12 15:58:15 -0400
commitb09b78905b09016becda8df81a43e11bebd88208 (patch)
tree1242583c88f60a96f92f321b43d17c4bb358afb5 /src/fenv/fegetexceptflag.c
parent2afebbbcd16e8bfc5e008a40b2faf3bd8cf14e88 (diff)
downloadmusl-b09b78905b09016becda8df81a43e11bebd88208.tar.gz
musl-b09b78905b09016becda8df81a43e11bebd88208.tar.xz
musl-b09b78905b09016becda8df81a43e11bebd88208.zip
floating point environment, untested
at present the i386 code does not support sse floating point, which is
not part of the standard i386 abi. while it may be desirable to
support it later, doing so will reduce performance and require some
tricks to probe if sse support is present.

this first commit is i386-only, but it should be trivial to port the
asm to x86_64.
Diffstat (limited to 'src/fenv/fegetexceptflag.c')
-rw-r--r--src/fenv/fegetexceptflag.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/fenv/fegetexceptflag.c b/src/fenv/fegetexceptflag.c
new file mode 100644
index 00000000..bab0b44f
--- /dev/null
+++ b/src/fenv/fegetexceptflag.c
@@ -0,0 +1,7 @@
+#include <fenv.h>
+
+int fegetexceptflag(fexcept_t *fp, int mask)
+{
+	*fp = fetestexcept(mask);
+	return 0;
+}