aboutsummaryrefslogtreecommitdiff
path: root/winsup/mingw/mingwex/log2.c
diff options
context:
space:
mode:
Diffstat (limited to 'winsup/mingw/mingwex/log2.c')
-rw-r--r--winsup/mingw/mingwex/log2.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/winsup/mingw/mingwex/log2.c b/winsup/mingw/mingwex/log2.c
new file mode 100644
index 0000000..4f14f26
--- /dev/null
+++ b/winsup/mingw/mingwex/log2.c
@@ -0,0 +1,8 @@
+#include <math.h>
+double
+log2 (double _x)
+{
+ double retval;
+ __asm__ ("fyl2x;" : "=t" (retval) : "0" (_x), "u" (1.0L) : "st(1)");
+ return retval;
+}