summaryrefslogtreecommitdiff
path: root/libgcc
diff options
context:
space:
mode:
authoruros <uros@138bc75d-0d04-0410-961f-82ee72b054a4>2011-08-22 23:13:57 +0000
committeruros <uros@138bc75d-0d04-0410-961f-82ee72b054a4>2011-08-22 23:13:57 +0000
commit047a5c569454531659505201f30b19db6eee3f64 (patch)
treeb7ad7e6b4c587c0b32621d6f79b9939257a6a7c9 /libgcc
parentc498d21e43b6be23abce06a4f962b69fe0fd791b (diff)
downloadgcc-047a5c569454531659505201f30b19db6eee3f64.tar.gz
* config/i386/64/sfp-machine.h (ASM_INVALID): New define.
(ASM_DIVZERO): Ditto. (FP_HANLDE_EXCEPTIONS): Use ASM_INVALID and ASM_DIVZERO. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@177978 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgcc')
-rw-r--r--libgcc/ChangeLog6
-rw-r--r--libgcc/config/i386/64/sfp-machine.h12
2 files changed, 16 insertions, 2 deletions
diff --git a/libgcc/ChangeLog b/libgcc/ChangeLog
index 828f2c2e8f2..98f85ad3281 100644
--- a/libgcc/ChangeLog
+++ b/libgcc/ChangeLog
@@ -1,3 +1,9 @@
+2011-08-23 Uros Bizjak <ubizjak@gmail.com>
+
+ * config/i386/64/sfp-machine.h (ASM_INVALID): New define.
+ (ASM_DIVZERO): Ditto.
+ (FP_HANLDE_EXCEPTIONS): Use ASM_INVALID and ASM_DIVZERO.
+
2011-08-18 Richard Sandiford <richard.sandiford@linaro.org>
* config/arm/bpabi-lib.h (RENAME_LIBRARY_SET): Delete.
diff --git a/libgcc/config/i386/64/sfp-machine.h b/libgcc/config/i386/64/sfp-machine.h
index 5debf5ae44a..7a2a4beaaaf 100644
--- a/libgcc/config/i386/64/sfp-machine.h
+++ b/libgcc/config/i386/64/sfp-machine.h
@@ -73,17 +73,25 @@ struct fenv
unsigned short int __unused5;
};
+#ifdef __AVX__
+ #define ASM_INVALID "vdivss %0, %0, %0"
+ #define ASM_DIVZERO "vdivss %1, %0, %0"
+#else
+ #define ASM_INVALID "divss %0, %0"
+ #define ASM_DIVZERO "divss %1, %0"
+#endif
+
#define FP_HANDLE_EXCEPTIONS \
do { \
if (_fex & FP_EX_INVALID) \
{ \
float f = 0.0; \
- __asm__ __volatile__ ("divss %0, %0 " : : "x" (f)); \
+ __asm__ __volatile__ (ASM_INVALID : : "x" (f)); \
} \
if (_fex & FP_EX_DIVZERO) \
{ \
float f = 1.0, g = 0.0; \
- __asm__ __volatile__ ("divss %1, %0" : : "x" (f), "x" (g)); \
+ __asm__ __volatile__ (ASM_DIVZERO : : "x" (f), "x" (g)); \
} \
if (_fex & FP_EX_OVERFLOW) \
{ \