config.gcc: Support --with-fpmath=avx for x86.
authorUros Bizjak <uros@gcc.gnu.org>
Fri, 5 Nov 2010 18:33:19 +0000 (19:33 +0100)
committerUros Bizjak <uros@gcc.gnu.org>
Fri, 5 Nov 2010 18:33:19 +0000 (19:33 +0100)
* config.gcc: Support --with-fpmath=avx for x86.
* config/i386/avxmath.h: New.
* doc/install.texi (--with-fpmath=): Document --with-fpmath=avx.

From-SVN: r166369

gcc/ChangeLog
gcc/config.gcc
gcc/config/i386/avxmath.h [new file with mode: 0644]
gcc/doc/install.texi
gcc/testsuite/ChangeLog

index 814e02d..1dc12a1 100644 (file)
@@ -1,7 +1,12 @@
+2010-11-05  Uros Bizjak  <ubizjak@gmail.com>
+
+       * config.gcc: Support --with-fpmath=avx for x86.
+       * config/i386/avxmath.h: New.
+       * doc/install.texi (--with-fpmath=): Document --with-fpmath=avx.
+
 2010-11-05  Ian Lance Taylor  <iant@google.com>
 
-       * tree.h (struct tree_type): Don't use descbits in GTY
-       annotation.
+       * tree.h (struct tree_type): Don't use descbits in GTY annotation.
        * gengtype.c (walk_type): Don't recognize descbits option.
 
 2010-11-05  Joseph Myers  <joseph@codesourcery.com>
@@ -15,8 +20,7 @@
        * opts-common.c: Update comment on tm.h include.
        (decode_cmdline_option): Handle options with multiple arguments.
        Don't check WORD_SWITCH_TAKES_ARG for unknown options.
-       * opts.h (CL_SEPARATE_NARGS_SHIFT, CL_SEPARATE_NARGS_MASK):
-       Define.
+       * opts.h (CL_SEPARATE_NARGS_SHIFT, CL_SEPARATE_NARGS_MASK): Define.
        (CL_PARAMS, CL_WARNING, CL_OPTIMIZATION, CL_DRIVER, CL_TARGET,
        CL_COMMON): Update values.
        * system.h (WORD_SWITCH_TAKES_ARG): Poison.
@@ -79,8 +83,8 @@
 2010-11-04  Paul Koning  <ni1d@arrl.net>
 
        * doc/md.texi (Machine Constraints): Correct formatting in PDP-11
-       constraints. 
-       
+       constraints.
+
 2010-11-04  Chao-ying Fu  <fu@mips.com>
 
        * configure.ac: Test assembler support for DSP Rev1 mult.
        Use (!TARGET_FIX_R4000 || ISA_HAS_DSP), instead of
        (!TARGET_FIX_R4000 && !ISA_HAS_DSPR2).
        Emit the accumulator destination when ISA_HAS_DSP_MULT.
-       (<u>msubsidi4): Add comments.
-       Test ISA_HAS_DSP.
+       (<u>msubsidi4): Add comments.  Test ISA_HAS_DSP.
        Emit the accumulator destination when ISA_HAS_DSP_MULT.
        (<u>maddsidi4): Likewise.
        * doc/extend.texi (MIPS DSP Built-in Functions): Move madd, maddu,
 2010-11-04  Paul Koning  <ni1d@arrl.net>
 
        * doc/md.texi (Machine Constraints): Add PDP-11 constraints.
-       
+
 2010-11-04  Paul Koning  <ni1d@arrl.net>
 
        * doc/invoke.texi (PDP-11 Options): Delete -msplit, -mno-split.
        MINUS_EXPR only if the first operand is reduction operand.
 
 2010-11-04  Richard Guenther  <rguenther@suse.de>
-       Richard Henderson  <rth@redhat.com>
+           Richard Henderson  <rth@redhat.com>
 
        * tree.def (FMA_EXPR): New tree code.
        * expr.c (expand_expr_real_2): Add FMA_EXPR expansion code.
        operations.
 
 2010-11-04  Artjoms Sinkarovs <artyom.shinakroff@gmail.com>
-       Richard Guenther  <rguenther@suse.de>
+           Richard Guenther  <rguenther@suse.de>
 
        * passes.c (init_optimization_passes): Move veclower after SSA.
        * tree-vect-generic.c (uniform_vector_p): New function.
 
 2010-11-03  Kaz Kojima  <kkojima@gcc.gnu.org>
 
-       * config.gcc (sh64*) <tm_file>: Add newlib-stdint.h for
-       newlib targets.
+       * config.gcc (sh64*) <tm_file>: Add newlib-stdint.h for newlib targets.
 
 2010-11-03  Kaz Kojima  <kkojima@gcc.gnu.org>
 
 
 2010-11-02  H.J. Lu  <hongjiu.lu@intel.com>
 
-       * config/i386/i386-protos.h (ix86_split_call_pop_vzeroupper):
-       Removed.
+       * config/i386/i386-protos.h (ix86_split_call_pop_vzeroupper): Removed.
        * config/i386/i386.c (ix86_split_call_pop_vzeroupper): Likewise.
 
        * config/i386/i386.md (*call_pop_0_vzeroupper): Use parallel
 
 2010-11-02  H.J. Lu  <hongjiu.lu@intel.com>
 
-       * config/i386/i386.md (*sibcall_1_rex64_vzeroupper): Fix a
-       typo.
+       * config/i386/i386.md (*sibcall_1_rex64_vzeroupper): Fix a typo.
 
 2010-11-02  Eric Botcazou  <ebotcazou@adacore.com>
 
index 44d7014..95ca650 100644 (file)
@@ -2994,6 +2994,9 @@ if test x$with_fpmath != x; then
   case ${target} in
     i[34567]86-*-* | x86_64-*-*)
       case ${with_fpmath} in
+      avx)
+       tm_file="${tm_file} i386/avxmath.h"
+       ;;
       sse)
        tm_file="${tm_file} i386/ssemath.h"
        ;;
diff --git a/gcc/config/i386/avxmath.h b/gcc/config/i386/avxmath.h
new file mode 100644 (file)
index 0000000..997842b
--- /dev/null
@@ -0,0 +1,29 @@
+/* Copyright (C) 2010
+   Free Software Foundation, Inc.
+
+This file is part of GCC.
+
+GCC is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 3, or (at your option)
+any later version.
+
+GCC is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GCC; see the file COPYING3.  If not see
+<http://www.gnu.org/licenses/>.  */
+
+#undef TARGET_FPMATH_DEFAULT
+#define TARGET_FPMATH_DEFAULT FPMATH_SSE
+
+#undef TARGET_SUBTARGET_ISA_DEFAULT
+#define TARGET_SUBTARGET_ISA_DEFAULT                                   \
+  (OPTION_MASK_ISA_MMX | OPTION_MASK_ISA_SSE | OPTION_MASK_ISA_SSE2    \
+   | OPTION_MASK_ISA_SSE3 | OPTION_MASK_ISA_SSSE3                      \
+   | OPTION_MASK_ISA_SSE4_1 | OPTION_MASK_ISA_SSE4_2                   \
+   | OPTION_MASK_ISA_AVX)
+
index 77d36eb..1c9d463 100644 (file)
@@ -1166,10 +1166,11 @@ of the arguments depend on the target.
 Specify if the compiler should default to @option{-marm} or @option{-mthumb}.
 This option is only supported on ARM targets.
 
-@item --with-fpmath=sse
-Specify if the compiler should default to @option{-msse2} and
-@option{-mfpmath=sse}.  This option is only supported on i386 and
-x86-64 targets.
+@item --with-fpmath=@var{isa}
+This options sets @option{-mfpmath=sse} by default and specifies the default
+ISA for floating-point arithmetics.  You can select either @samp{sse} which
+enables @option{-msse2} or @samp{avx} which enables @option{-mavx} by default.
+This option is only supported on i386 and x86-64 targets.
 
 @item --with-divide=@var{type}
 Specify how the compiler should generate code for checking for
index 359bc49..4c6ac67 100644 (file)
@@ -20,7 +20,7 @@
 2010-11-05  Iain Sandoe  <iains@gcc.gnu.org>
 
        * objc.dg/torture/forward-1.m: Restore for m32 NeXT.
-       * objc.dg/demangle-1.m: Remove NeXT ifdef around +initialize 
+       * objc.dg/demangle-1.m: Remove NeXT ifdef around +initialize
        declaration and implementation.
        * objc.dg/property/dotsyntax-3.m: XFAIL NeXT m64 run.
        * obj-c++.dg/property/at-property-13.mm: Likewise.
@@ -59,7 +59,7 @@
 
 2010-11-04  Bud Davis  <jimmied@smu.edu>
 
-       * gfortran.dg/intrinsic_numeric_arg.f: Add test to check 
+       * gfortran.dg/intrinsic_numeric_arg.f: Add test to check
        error message.
 
 2010-11-04  Chao-ying Fu  <fu@mips.com>
        * objc.dg/property/dotsyntax-3.m: New.
        * objc.dg/property/dotsyntax-4.m: New.
        * obj-c++.dg/property/dotsyntax-3.mm: New.
-       * obj-c++.dg/property/dotsyntax-4.mm: New.      
+       * obj-c++.dg/property/dotsyntax-4.mm: New.
 
        * objc.dg/fobjc-std-1.m: Added test for warnings when the
        Objective-C 2.0 dot-syntax is used with class names.
        * obj-c++.dg/fobjc-std-1.mm: Same change.
-       
+
 2010-11-04  Pat Haugen  <pthaugen@us.ibm.com>
 
        * gcc.target/powerpc/loop_align.c: New.
 
        * objc.dg/property/property-2.m: Deleted.
        * objc.dg/property/property-3.m: Deleted.
-       
+
 2010-11-04  Iain Sandoe  <iains@gcc.gnu.org>
 
        * objc-obj-c++-shared/next-mapping.h: Ensure a GNU-compatible nil is
        * objc.dg/property/fsf-property-method-access.m: Likewise.
        * objc.dg/torture/strings/const-cfstring-1.m: Cater for bogus Darwin10
        linker warning.
-       * objc.dg/encode-7-next.m: Use next-mapping.h, ignore deprecation 
+       * objc.dg/encode-7-next.m: Use next-mapping.h, ignore deprecation
        warnings.
-       * objc.dg/encode-7-next-64bit.m: Use next-mapping.h, ignore 
+       * objc.dg/encode-7-next-64bit.m: Use next-mapping.h, ignore
        deprecation warnings.  Use Object1 implementation.
        * objc.dg/demangle-1.m: Provide +initialize.  XFAIL m64 NeXT run.
        * objc/execute/forward-1.m: Remove.
        * objc/execute/forward-1.x: Remove.
-       
+
 2010-11-04  Jason Merrill  <jason@redhat.com>
 
        * g++.dg/cpp0x/constexpr-access.C: New.
        * gcc.dg/lto/pr28706_1.c: ... split.
 
 2010-11-04  Richard Guenther  <rguenther@suse.de>
-       Richard Henderson  <rth@redhat.com>
+           Richard Henderson  <rth@redhat.com>
 
        * gcc.target/i386/fma4-vector-2.c: New testcase.
 
 2010-11-04  Artjoms Sinkarovs <artyom.shinakroff@gmail.com>
-       Richard Guenther  <rguenther@suse.de>
+           Richard Guenther  <rguenther@suse.de>
 
        * gcc.dg/vec-scal-opt.c: New testcase.
        * gcc.dg/vec-scal-opt1.c: New testcase.
        * gfortran.dg/proc_ptr_comp_25.f90: New.
 
 2010-10-21  Richard Guenther  <rguenther@suse.de>
-       Michael Matz  <matz@suse.de>
+           Michael Matz  <matz@suse.de>
 
        PR tree-optimization/45764
        * gcc.dg/torture/pr45764.c: New testcase.