From: uros Date: Fri, 5 Nov 2010 18:33:19 +0000 (+0000) Subject: * config.gcc: Support --with-fpmath=avx for x86. X-Git-Url: http://git.sourceforge.jp/view?p=pf3gnuchains%2Fgcc-fork.git;a=commitdiff_plain;h=e69704a51856c53bcef6884c4607d6e9b9c0289d * config.gcc: Support --with-fpmath=avx for x86. * config/i386/avxmath.h: New. * doc/install.texi (--with-fpmath=): Document --with-fpmath=avx. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@166369 138bc75d-0d04-0410-961f-82ee72b054a4 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 814e02d6a7b..1dc12a18ba4 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,7 +1,12 @@ +2010-11-05 Uros Bizjak + + * 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 - * 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 @@ -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 * doc/md.texi (Machine Constraints): Correct formatting in PDP-11 - constraints. - + constraints. + 2010-11-04 Chao-ying Fu * configure.ac: Test assembler support for DSP Rev1 mult. @@ -104,8 +108,7 @@ Use (!TARGET_FIX_R4000 || ISA_HAS_DSP), instead of (!TARGET_FIX_R4000 && !ISA_HAS_DSPR2). Emit the accumulator destination when ISA_HAS_DSP_MULT. - (msubsidi4): Add comments. - Test ISA_HAS_DSP. + (msubsidi4): Add comments. Test ISA_HAS_DSP. Emit the accumulator destination when ISA_HAS_DSP_MULT. (maddsidi4): Likewise. * doc/extend.texi (MIPS DSP Built-in Functions): Move madd, maddu, @@ -114,7 +117,7 @@ 2010-11-04 Paul Koning * doc/md.texi (Machine Constraints): Add PDP-11 constraints. - + 2010-11-04 Paul Koning * doc/invoke.texi (PDP-11 Options): Delete -msplit, -mno-split. @@ -249,7 +252,7 @@ MINUS_EXPR only if the first operand is reduction operand. 2010-11-04 Richard Guenther - Richard Henderson + Richard Henderson * tree.def (FMA_EXPR): New tree code. * expr.c (expand_expr_real_2): Add FMA_EXPR expansion code. @@ -285,7 +288,7 @@ operations. 2010-11-04 Artjoms Sinkarovs - Richard Guenther + Richard Guenther * passes.c (init_optimization_passes): Move veclower after SSA. * tree-vect-generic.c (uniform_vector_p): New function. @@ -306,8 +309,7 @@ 2010-11-03 Kaz Kojima - * config.gcc (sh64*) : Add newlib-stdint.h for - newlib targets. + * config.gcc (sh64*) : Add newlib-stdint.h for newlib targets. 2010-11-03 Kaz Kojima @@ -516,8 +518,7 @@ 2010-11-02 H.J. Lu - * 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 @@ -531,8 +532,7 @@ 2010-11-02 H.J. Lu - * 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 diff --git a/gcc/config.gcc b/gcc/config.gcc index 44d70147cdb..95ca6505ba3 100644 --- a/gcc/config.gcc +++ b/gcc/config.gcc @@ -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 index 00000000000..997842b1085 --- /dev/null +++ b/gcc/config/i386/avxmath.h @@ -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 +. */ + +#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) + diff --git a/gcc/doc/install.texi b/gcc/doc/install.texi index 77d36eb243b..1c9d4630513 100644 --- a/gcc/doc/install.texi +++ b/gcc/doc/install.texi @@ -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 diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 359bc49b3c2..4c6ac67e5c2 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -20,7 +20,7 @@ 2010-11-05 Iain Sandoe * 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 - * 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 @@ -74,12 +74,12 @@ * 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 * gcc.target/powerpc/loop_align.c: New. @@ -100,7 +100,7 @@ * objc.dg/property/property-2.m: Deleted. * objc.dg/property/property-3.m: Deleted. - + 2010-11-04 Iain Sandoe * objc-obj-c++-shared/next-mapping.h: Ensure a GNU-compatible nil is @@ -122,14 +122,14 @@ * 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 * g++.dg/cpp0x/constexpr-access.C: New. @@ -183,12 +183,12 @@ * gcc.dg/lto/pr28706_1.c: ... split. 2010-11-04 Richard Guenther - Richard Henderson + Richard Henderson * gcc.target/i386/fma4-vector-2.c: New testcase. 2010-11-04 Artjoms Sinkarovs - Richard Guenther + Richard Guenther * gcc.dg/vec-scal-opt.c: New testcase. * gcc.dg/vec-scal-opt1.c: New testcase. @@ -1111,7 +1111,7 @@ * gfortran.dg/proc_ptr_comp_25.f90: New. 2010-10-21 Richard Guenther - Michael Matz + Michael Matz PR tree-optimization/45764 * gcc.dg/torture/pr45764.c: New testcase.