summaryrefslogtreecommitdiffstats
path: root/winsup/mingw/mingwex/fucom.c
diff options
context:
space:
mode:
Diffstat (limited to 'winsup/mingw/mingwex/fucom.c')
-rw-r--r--winsup/mingw/mingwex/fucom.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/winsup/mingw/mingwex/fucom.c b/winsup/mingw/mingwex/fucom.c
new file mode 100644
index 000000000..80c937262
--- /dev/null
+++ b/winsup/mingw/mingwex/fucom.c
@@ -0,0 +1,11 @@
+int
+__fp_unordered_compare (long double x, long double y){
+ unsigned short retval;
+ __asm__ (
+ "fucom %%st(1);"
+ "fnstsw;"
+ : "=a" (retval)
+ : "t" (x), "u" (y)
+ );
+ return retval;
+}