]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
sfp-machine.h (ASM_INVALID): New define.
authorUros Bizjak <uros@gcc.gnu.org>
Tue, 23 Aug 2011 19:49:57 +0000 (21:49 +0200)
committerUros Bizjak <uros@gcc.gnu.org>
Tue, 23 Aug 2011 19:49:57 +0000 (21:49 +0200)
* config/i386/64/sfp-machine.h (ASM_INVALID): New define.
(ASM_DIVZERO): Ditto.
(FP_HANLDE_EXCEPTIONS): Use ASM_INVALID and ASM_DIVZERO.

From-SVN: r178009

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

index e6e6eade9d3a4d332cfcbd728764e38625930321..f69d09804c4ace06050e0bd5d6583900e07829d8 100644 (file)
@@ -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-04-28  Release Manager
 
        * GCC 4.5.3 released.
@@ -21,7 +27,7 @@
 2010-09-12  Gerald Pfeifer  <gerald@pfeifer.com>
            Andrew Pinski  <pinskia@gmail.com>
 
-       PR target/40959 
+       PR target/40959
        * config.host (ia64*-*-freebsd*): Set extra_parts.  Set tmake_file.
 
 2010-07-31  Release Manager
index c5f3d6e070edc4af9d90325445f7904f86bf125d..1536eef342ac0403fa38b89497229e39bc4b814c 100644 (file)
@@ -134,6 +134,9 @@ s390*-*-*)
 sh[123456789lbe]*-*-*)
        cpu_type=sh
        ;;
+ba-*)
+       cpu_type=ba
+       ;;
 esac
 
 # Common parts for widely ported systems.
@@ -253,6 +256,14 @@ fr30-*-elf)
        ;;
 frv-*-elf)
        ;;
+ba-*-elf*)
+       extra_parts="crtbegin.o crtbeginS.o crtbeginT.o crtend.o crti.o crtn.o"
+       tmake_file="ba/t-default"
+       ;;
+ba-*linux*)
+       extra_parts="$extra_parts crti.o crtn.o"
+       tmake_file="ba/t-default"
+       ;;
 frv-*-*linux*)
        ;;
 h8300-*-rtems*)
index 5adf6dbbaa46d102db963762f46f79203d6141f8..5186c24ffc7cf4700ddfa607b401877462796167 100644 (file)
@@ -79,17 +79,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)                                         \
       {                                                                        \