Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'winsup/mingw/mingwex/math/signbitl.c')
-rw-r--r--winsup/mingw/mingwex/math/signbitl.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/winsup/mingw/mingwex/math/signbitl.c b/winsup/mingw/mingwex/math/signbitl.c
new file mode 100644
index 000000000..78f990350
--- /dev/null
+++ b/winsup/mingw/mingwex/math/signbitl.c
@@ -0,0 +1,11 @@
+#define __FP_SIGNBIT 0x0200
+
+int __signbitl (long double x) {
+ unsigned short sw;
+ __asm__ ("fxam; fstsw %%ax;"
+ : "=a" (sw)
+ : "t" (x) );
+ return sw & __FP_SIGNBIT;
+}
+
+int __attribute__ ((alias ("__signbitl"))) signbitl (long double);