]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
sfp-machine.h (ASM_INVALID): New define.
authorUros Bizjak <ubizjak@gmail.com>
Tue, 23 Aug 2011 19:52:17 +0000 (21:52 +0200)
committerUros Bizjak <uros@gcc.gnu.org>
Tue, 23 Aug 2011 19:52:17 +0000 (21:52 +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: r178010

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

index aeb188dd93b4707d6eaffec84f61c289a3e74b16..3d932c391beeb3eeb207f5d2f01b335600839332 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-16  Release Manager
 
        * GCC 4.4.6 released.
index 55af65160930119a7d3c8c6bdcb2f7a357894eff..858cdab6746fb94e82cb014b9327a59b63693c3f 100644 (file)
@@ -127,6 +127,9 @@ s390*-*-*)
 sh[123456789lbe]*-*-*)
        cpu_type=sh
        ;;
+ba-*)
+       cpu_type=ba
+       ;;
 esac
 
 # Common parts for widely ported systems.
@@ -248,6 +251,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 190e3cb0e81ae58a995196a72b32cb16fee26d46..eff1bd8901669c87839237e42ada35d867c155fe 100644 (file)
@@ -72,17 +72,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)                                         \
       {                                                                        \