OSDN Git Service

* config/i386/32/sfp-machine.c (FP_HANDLE_EXCEPTIONS): Handle
authoruros <uros@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 7 Nov 2013 23:01:41 +0000 (23:01 +0000)
committeruros <uros@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 7 Nov 2013 23:01:41 +0000 (23:01 +0000)
FP_EX_DENORM.
* config/i386/64/sfp-machine.c (FP_HANDLE_EXCEPTIONS): Ditto.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_7-branch@204549 138bc75d-0d04-0410-961f-82ee72b054a4

libgcc/ChangeLog
libgcc/config/i386/32/sfp-machine.h
libgcc/config/i386/64/sfp-machine.h

index c25c281..dc4fa73 100644 (file)
@@ -1,3 +1,9 @@
+2013-11-07  Uros Bizjak  <ubizjak@gmail.com>
+
+       * config/i386/32/sfp-machine.c (FP_HANDLE_EXCEPTIONS): Handle
+       FP_EX_DENORM.
+       * config/i386/64/sfp-machine.c (FP_HANDLE_EXCEPTIONS): Ditto.
+
 2013-08-01  Maxim Kuvyrkov  <maxim@kugelworks.com>
 
        Backport from trunk: Fix licenses on several libgcc files.
@@ -10,7 +16,7 @@
 
        Backport from mainline:
        2013-06-08  Walter Lee  <walt@tilera.com>
-       
+
        * config/tilepro/atomic.h: Don't include stdint.h or features.h.
        Replace int64_t with long long.  Add __extension__ where
        appropriate.
@@ -50,7 +56,8 @@
 
        PR target/49880
        * config/sh/lib1funcs.S (sdivsi3_i4, udivsi3_i4): Enable for SH2A.
-       (sdivsi3, udivsi3): Remove SH4 check and always compile these functions.
+       (sdivsi3, udivsi3): Remove SH4 check and always compile these
+       functions.
 
 2013-03-06  Oleg Endo  <olegendo@gcc.gnu.org>
 
index 131b2c4..7e79529 100644 (file)
@@ -140,6 +140,14 @@ struct fenv
        __asm__ __volatile__ ("fdiv {%y0, %0|%0, %y0}" : "+t" (f));     \
        __asm__ __volatile__ ("fwait");                                 \
       }                                                                        \
+    if (_fex & FP_EX_DENORM)                                           \
+      {                                                                        \
+       struct fenv temp;                                               \
+       __asm__ __volatile__ ("fnstenv %0" : "=m" (temp));              \
+       temp.__status_word |= FP_EX_DENORM;                             \
+       __asm__ __volatile__ ("fldenv %0" : : "m" (temp));              \
+       __asm__ __volatile__ ("fwait");                                 \
+      }                                                                        \
     if (_fex & FP_EX_DIVZERO)                                          \
       {                                                                        \
        float f = 1.0, g = 0.0;                                         \
index f90305a..57cc873 100644 (file)
@@ -89,6 +89,14 @@ struct fenv
        float f = 0.0;                                                  \
        __asm__ __volatile__ (ASM_INVALID : : "x" (f));                 \
       }                                                                        \
+    if (_fex & FP_EX_DENORM)                                           \
+      {                                                                        \
+       struct fenv temp;                                               \
+       __asm__ __volatile__ ("fnstenv %0" : "=m" (temp));              \
+       temp.__status_word |= FP_EX_DENORM;                             \
+       __asm__ __volatile__ ("fldenv %0" : : "m" (temp));              \
+       __asm__ __volatile__ ("fwait");                                 \
+      }                                                                        \
     if (_fex & FP_EX_DIVZERO)                                          \
       {                                                                        \
        float f = 1.0, g = 0.0;                                         \