summaryrefslogtreecommitdiff
path: root/libgcc
diff options
context:
space:
mode:
authoruros <uros@138bc75d-0d04-0410-961f-82ee72b054a4>2012-10-10 18:35:32 +0000
committeruros <uros@138bc75d-0d04-0410-961f-82ee72b054a4>2012-10-10 18:35:32 +0000
commit19a230126c201c6aafe3b89a2484f374a254a0ef (patch)
tree31a29ea54a43c124e7c3a8a1f3dab65bd2e90d06 /libgcc
parentbb38acc83a31cc7acf06cea0abeeae09b8e75063 (diff)
downloadgcc-19a230126c201c6aafe3b89a2484f374a254a0ef.tar.gz
* config/i386/sfp-machine.h (FP_RND_NEAREST, FP_RND_ZERO, FP_RND_PINF,
FP_RND_MINF, FP_RND_MASK, FP_INIT_ROUNDMODE, _FP_DECL_EX): Move to ... * config/i386/32/sfp-machine.h: ... here. * config/i386/64/sfp-machine.h (FP_RND_NEAREST, FP_RND_ZERO, FP_RND_PINF, FP_RND_MINF, FP_RND_MASK, FP_INIT_ROUNDMODE, _FP_DECL_EX): New defines. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@192324 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgcc')
-rw-r--r--libgcc/ChangeLog9
-rw-r--r--libgcc/config/i386/32/sfp-machine.h15
-rw-r--r--libgcc/config/i386/64/sfp-machine.h15
-rw-r--r--libgcc/config/i386/sfp-machine.h15
4 files changed, 39 insertions, 15 deletions
diff --git a/libgcc/ChangeLog b/libgcc/ChangeLog
index b09c22fe5f2..e521dfaf01d 100644
--- a/libgcc/ChangeLog
+++ b/libgcc/ChangeLog
@@ -1,3 +1,12 @@
+2012-10-10 Uros Bizjak <ubizjak@gmail.com>
+
+ * config/i386/sfp-machine.h (FP_RND_NEAREST, FP_RND_ZERO, FP_RND_PINF,
+ FP_RND_MINF, FP_RND_MASK, FP_INIT_ROUNDMODE, _FP_DECL_EX): Move to ...
+ * config/i386/32/sfp-machine.h: ... here.
+ * config/i386/64/sfp-machine.h (FP_RND_NEAREST, FP_RND_ZERO,
+ FP_RND_PINF, FP_RND_MINF, FP_RND_MASK, FP_INIT_ROUNDMODE, _FP_DECL_EX):
+ New defines.
+
2012-10-07 Matthias Klose <doko@ubuntu.com>
* config/arm/unwind-arm.h (__gnu_unwind_24bit): Mark parameters
diff --git a/libgcc/config/i386/32/sfp-machine.h b/libgcc/config/i386/32/sfp-machine.h
index 7f0c099414d..474ade0d503 100644
--- a/libgcc/config/i386/32/sfp-machine.h
+++ b/libgcc/config/i386/32/sfp-machine.h
@@ -76,3 +76,18 @@
16byte since soft-fp emulation is done in 16byte. */
#define _FP_NANFRAC_E _FP_QNANBIT_E, 0, 0, 0
#define _FP_NANFRAC_Q _FP_QNANBIT_Q, 0, 0, 0
+
+#define FP_RND_NEAREST 0
+#define FP_RND_ZERO 0xc00
+#define FP_RND_PINF 0x800
+#define FP_RND_MINF 0x400
+
+#define FP_RND_MASK 0xc00
+
+#define _FP_DECL_EX \
+ unsigned short _fcw __attribute__ ((unused)) = FP_RND_NEAREST;
+
+#define FP_INIT_ROUNDMODE \
+ do { \
+ __asm__ __volatile__ ("fnstcw\t%0" : "=m" (_fcw)); \
+ } while (0)
diff --git a/libgcc/config/i386/64/sfp-machine.h b/libgcc/config/i386/64/sfp-machine.h
index 8cc982ecc79..fc9a38af696 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)
diff --git a/libgcc/config/i386/sfp-machine.h b/libgcc/config/i386/sfp-machine.h
index 34b4ca10e14..01bf14ffbb0 100644
--- a/libgcc/config/i386/sfp-machine.h
+++ b/libgcc/config/i386/sfp-machine.h
@@ -55,21 +55,6 @@ void __sfp_handle_exceptions (int);
__sfp_handle_exceptions (_fex); \
} while (0);
-#define FP_RND_NEAREST 0
-#define FP_RND_ZERO 0xc00
-#define FP_RND_PINF 0x800
-#define FP_RND_MINF 0x400
-
-#define FP_RND_MASK 0xc00
-
-#define _FP_DECL_EX \
- unsigned short _fcw __attribute__ ((unused)) = FP_RND_NEAREST
-
-#define FP_INIT_ROUNDMODE \
- do { \
- __asm__ __volatile__ ("fnstcw\t%0" : "=m" (_fcw)); \
- } while (0)
-
#define FP_ROUNDMODE (_fcw & FP_RND_MASK)
#define __LITTLE_ENDIAN 1234