aboutsummaryrefslogtreecommitdiff
path: root/libgcc
diff options
context:
space:
mode:
Diffstat (limited to 'libgcc')
-rw-r--r--libgcc/ChangeLog15
-rw-r--r--libgcc/config/i386/32/sfp-machine.h8
-rw-r--r--libgcc/config/i386/64/sfp-machine.h8
-rw-r--r--libgcc/config/i386/sfp-machine.h5
4 files changed, 26 insertions, 10 deletions
diff --git a/libgcc/ChangeLog b/libgcc/ChangeLog
index adb7422..7e15a8c 100644
--- a/libgcc/ChangeLog
+++ b/libgcc/ChangeLog
@@ -1,3 +1,10 @@
+2012-12-06 Uros Bizjak <ubizjak@gmail.com>
+
+ * config/i386/sfp-machine.h (FP_EX_ALL): Define.
+ (FP_TRAPPING_EXCEPTIONS): Define.
+ * config/i386/32/sfp-machine.h (FP_EX_SHIFT): Define.
+ * config/i386/64/sfp-machine.h (FP_EX_SHIFT): Ditto.
+
2012-12-04 Richard Henderson <rth@redhat.com>
PR bootstrap/55571
@@ -5,7 +12,7 @@
2012-12-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
- * config/aarch64/sfp-machine.h (FP_EX_ALL): Define.
+ * config/aarch64/sfp-machine.h (FP_EX_ALL): Define.
(FP_EX_SHIFT): Define.
(FP_TRAPPING_EXCEPTIONS): Define.
@@ -46,7 +53,7 @@
PR libgcc/48076
* emutls.c (__emutls_get_address): Avoid race condition between
obj->loc.offset read and emutls_key initialization.
-
+
2012-11-22 Georg-Johann Lay <avr@gjlay.de>
Adjust decimal point of signed accum mode to GCC default.
@@ -58,8 +65,8 @@
(__fractsasf, __fractsfha, __fractusqsf, __fractsfsa)
(__mulha3, __mulsa3)
(__divqq3, __divha3, __divsa3): Adjust to new position of
- decimal point of signed accum types.
-
+ decimal point of signed accum types.
+
(__mulusa3_round): New function.
(__mulusa3): Use it.
(__divqq_helper): New function.
diff --git a/libgcc/config/i386/32/sfp-machine.h b/libgcc/config/i386/32/sfp-machine.h
index d81d9a3..143296d 100644
--- a/libgcc/config/i386/32/sfp-machine.h
+++ b/libgcc/config/i386/32/sfp-machine.h
@@ -78,6 +78,11 @@
#define _FP_NANFRAC_Q _FP_QNANBIT_Q, 0, 0, 0
#ifndef _SOFT_FLOAT
+#define FP_EX_SHIFT 0
+
+#define _FP_DECL_EX \
+ unsigned short _fcw __attribute__ ((unused)) = FP_RND_NEAREST;
+
#define FP_RND_NEAREST 0
#define FP_RND_ZERO 0xc00
#define FP_RND_PINF 0x800
@@ -85,9 +90,6 @@
#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)); \
diff --git a/libgcc/config/i386/64/sfp-machine.h b/libgcc/config/i386/64/sfp-machine.h
index 21c9edc..1ff94c2 100644
--- a/libgcc/config/i386/64/sfp-machine.h
+++ b/libgcc/config/i386/64/sfp-machine.h
@@ -19,6 +19,11 @@ typedef unsigned int UTItype __attribute__ ((mode (TI)));
#define _FP_NANFRAC_Q _FP_QNANBIT_Q, 0
#ifndef _SOFT_FLOAT
+#define FP_EX_SHIFT 7
+
+#define _FP_DECL_EX \
+ unsigned int _fcw __attribute__ ((unused)) = FP_RND_NEAREST;
+
#define FP_RND_NEAREST 0
#define FP_RND_ZERO 0x6000
#define FP_RND_PINF 0x4000
@@ -26,9 +31,6 @@ typedef unsigned int UTItype __attribute__ ((mode (TI)));
#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)); \
diff --git a/libgcc/config/i386/sfp-machine.h b/libgcc/config/i386/sfp-machine.h
index 9afbbcb..b19d94b 100644
--- a/libgcc/config/i386/sfp-machine.h
+++ b/libgcc/config/i386/sfp-machine.h
@@ -47,6 +47,9 @@ typedef int __gcc_CMPtype __attribute__ ((mode (__libgcc_cmp_return__)));
#define FP_EX_OVERFLOW 0x08
#define FP_EX_UNDERFLOW 0x10
#define FP_EX_INEXACT 0x20
+#define FP_EX_ALL \
+ (FP_EX_INVALID | FP_EX_DENORM | FP_EX_DIVZERO | FP_EX_OVERFLOW \
+ | FP_EX_UNDERFLOW | FP_EX_INEXACT)
void __sfp_handle_exceptions (int);
@@ -56,6 +59,8 @@ void __sfp_handle_exceptions (int);
__sfp_handle_exceptions (_fex); \
} while (0);
+#define FP_TRAPPING_EXCEPTIONS ((_fcw >> FP_EX_SHIFT) & FP_EX_ALL)
+
#define FP_ROUNDMODE (_fcw & FP_RND_MASK)
#endif