From: Uros Bizjak Date: Tue, 23 Aug 2011 19:52:17 +0000 (+0200) Subject: sfp-machine.h (ASM_INVALID): New define. X-Git-Tag: releases/gcc-4.4.7~268 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fbf1858b94bb20b98df661327e8bc22586fb6bcb;p=thirdparty%2Fgcc.git sfp-machine.h (ASM_INVALID): New define. * 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 --- diff --git a/libgcc/ChangeLog b/libgcc/ChangeLog index aeb188dd93b4..3d932c391bee 100644 --- a/libgcc/ChangeLog +++ b/libgcc/ChangeLog @@ -1,3 +1,9 @@ +2011-08-23 Uros Bizjak + + * 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. diff --git a/libgcc/config.host b/libgcc/config.host index 55af65160930..858cdab6746f 100644 --- a/libgcc/config.host +++ b/libgcc/config.host @@ -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*) diff --git a/libgcc/config/i386/64/sfp-machine.h b/libgcc/config/i386/64/sfp-machine.h index 190e3cb0e81a..eff1bd890166 100644 --- a/libgcc/config/i386/64/sfp-machine.h +++ b/libgcc/config/i386/64/sfp-machine.h @@ -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) \ { \