aboutsummaryrefslogtreecommitdiff
path: root/libgcc/config/i386/64/sfp-machine.h
diff options
context:
space:
mode:
Diffstat (limited to 'libgcc/config/i386/64/sfp-machine.h')
-rw-r--r--libgcc/config/i386/64/sfp-machine.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/libgcc/config/i386/64/sfp-machine.h b/libgcc/config/i386/64/sfp-machine.h
index 8cc982e..fc9a38a 100644
--- a/libgcc/config/i386/64/sfp-machine.h
+++ b/libgcc/config/i386/64/sfp-machine.h
@@ -17,3 +17,18 @@ typedef unsigned int UTItype __attribute__ ((mode (TI)));
#define _FP_NANFRAC_D _FP_QNANBIT_D
#define _FP_NANFRAC_E _FP_QNANBIT_E, 0
#define _FP_NANFRAC_Q _FP_QNANBIT_Q, 0
+
+#define FP_RND_NEAREST 0
+#define FP_RND_ZERO 0x6000
+#define FP_RND_PINF 0x4000
+#define FP_RND_MINF 0x2000
+
+#define FP_RND_MASK 0x6000
+
+#define _FP_DECL_EX \
+ unsigned int _fcw __attribute__ ((unused)) = FP_RND_NEAREST;
+
+#define FP_INIT_ROUNDMODE \
+ do { \
+ __asm__ __volatile__ ("%vstmxcsr\t%0" : "=m" (_fcw)); \
+ } while (0)