gcc/gcc/testsuite/lib/target-supports.exp

2992 lines
88 KiB
Plaintext
Raw Normal View History

# Copyright (C) 1999, 2001, 2003, 2004, 2005, 2006, 2007, 2008, 2009
execute.exp: Change copyright header to refer to version 3 of the GNU General Public License... * gcc.c-torture/execute/execute.exp: Change copyright header to refer to version 3 of the GNU General Public License and to point readers at the COPYING3 file and the FSF's license web page. * gcc.c-torture/execute/ieee/ieee.exp, gcc.c-torture/unsorted/unsorted.exp, gcc.c-torture/compile/compile.exp, gcc.c-torture/compile/structs.c, gcc.target/powerpc/powerpc.exp, gcc.target/arm/neon/neon.exp, gcc.target/arm/arm.exp, gcc.target/cris/torture/cris-torture.exp, gcc.target/cris/cris.exp, gcc.target/ia64/ia64.exp, gcc.target/alpha/alpha.exp, gcc.target/m68k/m68k.exp, gcc.target/spu/spu.exp, gcc.target/mips/mips.exp, gcc.target/sparc/sparc.exp, gcc.target/i386/i386.exp, gcc.target/x86_64/abi/abi-x86_64.exp, gnat.dg/specs/specs.exp, gnat.dg/dg.exp, gnat.dg/style/style.exp, gcc.dg/special/mips-abi.exp, gcc.dg/special/special.exp, gcc.dg/pch/pch.exp, gcc.dg/vxworks/vxworks.exp, gcc.dg/dg.exp, gcc.dg/charset/charset.exp, gcc.dg/weak/weak.exp, gcc.dg/tree-ssa/tree-ssa.exp, gcc.dg/tls/tls.exp, gcc.dg/cpp/cpp.exp, gcc.dg/cpp/trad/trad.exp, gcc.dg/matrix/matrix.exp, gcc.dg/vmx/vmx.exp, gcc.dg/compat/struct-layout-1.exp, gcc.dg/compat/compat.exp, gcc.dg/compat/struct-layout-1_generate.c, gcc.dg/debug/debug.exp, gcc.dg/debug/dwarf2/dwarf2.exp, gcc.dg/tree-prof/tree-prof.exp, gcc.dg/ipa/ipa.exp, gcc.dg/dfp/dfp.exp, gcc.dg/noncompile/noncompile.exp, gcc.dg/vect/costmodel/ppc/ppc-costmodel-vect.exp, gcc.dg/vect/costmodel/spu/spu-costmodel-vect.exp, gcc.dg/vect/costmodel/i386/i386-costmodel-vect.exp, gcc.dg/vect/costmodel/x86_64/x86_64-costmodel-vect.exp, gcc.dg/vect/vect.exp, gcc.dg/format/format.exp, gcc.misc-tests/i386-prefetch.exp, gcc.misc-tests/sort2.exp, gcc.misc-tests/matrix1.exp, gcc.misc-tests/dectest.exp, gcc.misc-tests/options.exp, gcc.misc-tests/gcov.exp, gcc.misc-tests/mg-2.exp, gcc.misc-tests/mg.exp, gcc.misc-tests/bprob.exp, gcc.misc-tests/acker1.exp, gcc.misc-tests/dhry.exp, gcc.misc-tests/linkage.exp, gcc.misc-tests/arm-isr.exp, gcc.misc-tests/sieve.exp, g++.old-deja/g++.niklas/README, g++.old-deja/g++.gb/README, g++.old-deja/old-deja.exp, gfortran.fortran-torture/execute/execute.exp, gfortran.fortran-torture/compile/compile.exp, treelang/output/output-1.c, treelang/output/output-1.tree, treelang/execute/execute.exp, treelang/Makefile.in, treelang/compile/compile.exp, g++.dg/dg.exp, g++.dg/debug/debug.exp, g++.dg/debug/dwarf2/dwarf2.exp, g++.dg/charset/charset.exp, g++.dg/vect/vect.exp, g++.dg/tls/tls.exp, g++.dg/tree-prof/tree-prof.exp, g++.dg/pch/pch.exp, g++.dg/special/ecos.exp, g++.dg/compat/struct-layout-1.exp, g++.dg/compat/struct-layout-1_generate.c, g++.dg/compat/compat.exp, g++.dg/gcov/gcov.exp, g++.dg/bprob/bprob.exp, config/default.exp, gcc.test-framework/test-framework.awk, gcc.test-framework/gen_directive_tests, gcc.test-framework/test-framework.exp, objc.dg/special/special.exp, objc.dg/gnu-encoding/gnu-encoding.exp, objc.dg/gnu-encoding/struct-layout-encoding-1_generate.c, objc.dg/pch/pch.exp, objc.dg/dg.exp, lib/copy-file.exp, lib/profopt.exp, lib/gcc.exp, lib/mike-g++.exp, lib/c-compat.exp, lib/scanrtl.exp, lib/gfortran-dg.exp, lib/g++.exp, lib/obj-c++.exp, lib/wrapper.exp, lib/gnat-dg.exp, lib/compat.exp, lib/c-torture.exp, lib/gcc-dg.exp, lib/scanasm.exp, lib/gnat.exp, lib/treelang-dg.exp, lib/prune.exp, lib/gcov.exp, lib/treelang.exp, lib/dg-pch.exp, lib/scantree.exp, lib/g++-dg.exp, lib/objc-dg.exp, lib/file-format.exp, lib/target-libpath.exp, lib/obj-c++-dg.exp, lib/scandump.exp, lib/target-supports-dg.exp, lib/gcc-defs.exp, lib/fortran-torture.exp, lib/objc.exp, lib/scanipa.exp, lib/mike-gcc.exp, lib/objc-torture.exp, lib/gfortran.exp, lib/target-supports.exp, obj-c++.dg/dg.exp, gfortran.dg/dg.exp, gfortran.dg/vect/vect.exp, objc/execute/execute.exp, objc/execute/exceptions/exceptions.exp, objc/compile/compile.exp: Likewise. From-SVN: r127127
2007-08-01 18:25:11 +02:00
# Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
execute.exp: Change copyright header to refer to version 3 of the GNU General Public License... * gcc.c-torture/execute/execute.exp: Change copyright header to refer to version 3 of the GNU General Public License and to point readers at the COPYING3 file and the FSF's license web page. * gcc.c-torture/execute/ieee/ieee.exp, gcc.c-torture/unsorted/unsorted.exp, gcc.c-torture/compile/compile.exp, gcc.c-torture/compile/structs.c, gcc.target/powerpc/powerpc.exp, gcc.target/arm/neon/neon.exp, gcc.target/arm/arm.exp, gcc.target/cris/torture/cris-torture.exp, gcc.target/cris/cris.exp, gcc.target/ia64/ia64.exp, gcc.target/alpha/alpha.exp, gcc.target/m68k/m68k.exp, gcc.target/spu/spu.exp, gcc.target/mips/mips.exp, gcc.target/sparc/sparc.exp, gcc.target/i386/i386.exp, gcc.target/x86_64/abi/abi-x86_64.exp, gnat.dg/specs/specs.exp, gnat.dg/dg.exp, gnat.dg/style/style.exp, gcc.dg/special/mips-abi.exp, gcc.dg/special/special.exp, gcc.dg/pch/pch.exp, gcc.dg/vxworks/vxworks.exp, gcc.dg/dg.exp, gcc.dg/charset/charset.exp, gcc.dg/weak/weak.exp, gcc.dg/tree-ssa/tree-ssa.exp, gcc.dg/tls/tls.exp, gcc.dg/cpp/cpp.exp, gcc.dg/cpp/trad/trad.exp, gcc.dg/matrix/matrix.exp, gcc.dg/vmx/vmx.exp, gcc.dg/compat/struct-layout-1.exp, gcc.dg/compat/compat.exp, gcc.dg/compat/struct-layout-1_generate.c, gcc.dg/debug/debug.exp, gcc.dg/debug/dwarf2/dwarf2.exp, gcc.dg/tree-prof/tree-prof.exp, gcc.dg/ipa/ipa.exp, gcc.dg/dfp/dfp.exp, gcc.dg/noncompile/noncompile.exp, gcc.dg/vect/costmodel/ppc/ppc-costmodel-vect.exp, gcc.dg/vect/costmodel/spu/spu-costmodel-vect.exp, gcc.dg/vect/costmodel/i386/i386-costmodel-vect.exp, gcc.dg/vect/costmodel/x86_64/x86_64-costmodel-vect.exp, gcc.dg/vect/vect.exp, gcc.dg/format/format.exp, gcc.misc-tests/i386-prefetch.exp, gcc.misc-tests/sort2.exp, gcc.misc-tests/matrix1.exp, gcc.misc-tests/dectest.exp, gcc.misc-tests/options.exp, gcc.misc-tests/gcov.exp, gcc.misc-tests/mg-2.exp, gcc.misc-tests/mg.exp, gcc.misc-tests/bprob.exp, gcc.misc-tests/acker1.exp, gcc.misc-tests/dhry.exp, gcc.misc-tests/linkage.exp, gcc.misc-tests/arm-isr.exp, gcc.misc-tests/sieve.exp, g++.old-deja/g++.niklas/README, g++.old-deja/g++.gb/README, g++.old-deja/old-deja.exp, gfortran.fortran-torture/execute/execute.exp, gfortran.fortran-torture/compile/compile.exp, treelang/output/output-1.c, treelang/output/output-1.tree, treelang/execute/execute.exp, treelang/Makefile.in, treelang/compile/compile.exp, g++.dg/dg.exp, g++.dg/debug/debug.exp, g++.dg/debug/dwarf2/dwarf2.exp, g++.dg/charset/charset.exp, g++.dg/vect/vect.exp, g++.dg/tls/tls.exp, g++.dg/tree-prof/tree-prof.exp, g++.dg/pch/pch.exp, g++.dg/special/ecos.exp, g++.dg/compat/struct-layout-1.exp, g++.dg/compat/struct-layout-1_generate.c, g++.dg/compat/compat.exp, g++.dg/gcov/gcov.exp, g++.dg/bprob/bprob.exp, config/default.exp, gcc.test-framework/test-framework.awk, gcc.test-framework/gen_directive_tests, gcc.test-framework/test-framework.exp, objc.dg/special/special.exp, objc.dg/gnu-encoding/gnu-encoding.exp, objc.dg/gnu-encoding/struct-layout-encoding-1_generate.c, objc.dg/pch/pch.exp, objc.dg/dg.exp, lib/copy-file.exp, lib/profopt.exp, lib/gcc.exp, lib/mike-g++.exp, lib/c-compat.exp, lib/scanrtl.exp, lib/gfortran-dg.exp, lib/g++.exp, lib/obj-c++.exp, lib/wrapper.exp, lib/gnat-dg.exp, lib/compat.exp, lib/c-torture.exp, lib/gcc-dg.exp, lib/scanasm.exp, lib/gnat.exp, lib/treelang-dg.exp, lib/prune.exp, lib/gcov.exp, lib/treelang.exp, lib/dg-pch.exp, lib/scantree.exp, lib/g++-dg.exp, lib/objc-dg.exp, lib/file-format.exp, lib/target-libpath.exp, lib/obj-c++-dg.exp, lib/scandump.exp, lib/target-supports-dg.exp, lib/gcc-defs.exp, lib/fortran-torture.exp, lib/objc.exp, lib/scanipa.exp, lib/mike-gcc.exp, lib/objc-torture.exp, lib/gfortran.exp, lib/target-supports.exp, obj-c++.dg/dg.exp, gfortran.dg/dg.exp, gfortran.dg/vect/vect.exp, objc/execute/execute.exp, objc/execute/exceptions/exceptions.exp, objc/compile/compile.exp: Likewise. From-SVN: r127127
2007-08-01 18:25:11 +02:00
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
target-supports.exp (check-iconv-available): New function. 2004-02-26 Eric Christopher <echristo@redhat.com> * lib/target-supports.exp (check-iconv-available): New function. * lib/gcc-dg.exp (dg-require-iconv): New function. Use above. * gcc.dg/charset: New directory. * gcc.dg/charset/charset.exp: New file. * gcc.dg/charset/asm1.c: Ditto. * gcc.dg/charset/asm2.c: Ditto. * gcc.dg/charset/asm3.c: Ditto. * gcc.dg/charset/asm4.c: Ditto. * gcc.dg/charset/asm5.c: Ditto. * gcc.dg/charset/attribute1.c: Ditto. * gcc.dg/charset/attribute2.c: Ditto. * gcc.dg/charset/string1.c: Ditto. * g++.dg/charset: New directory. * g++.dg/dg.exp: Add here. Special options. * g++.dg/charset/charset.exp: New file. * g++.dg/charset/asm1.c: Ditto. * g++.dg/charset/asm2.c: Ditto. * g++.dg/charset/asm3.c: Ditto. * g++.dg/charset/asm4.c: Ditto. * g++.dg/charset/attribute1.c: Ditto. * g++.dg/charset/attribute2.c: Ditto. * g++.dg/charset/extern1.cc: Ditto. * g++.dg/charset/extern2.cc: Ditto. * g++.dg/charset/string1.c: Ditto. 2004-02-26 Eric Christopher <echristo@redhat.com> * c-lex.c (c_lex_string_translate): New variable. (lex_string): Use to determine string translation. * c-pragma.h: Prototype. * c-parse.in (start_string_translation): New. Set above. (stop_string_translation): Ditto. (attribute, attribute_list, asm_def, asm_stmt, asm_operand): Use above functions. * cp/parser.c (cp_parser_declaration): Translate strings unless token is RID_EXTERN. Set c_lex_string_translate for recursive use. (cp_parser_asm_definition): Only translate argument strings to asms. (cp_parser_asm_operand_list): Ditto. (cp_parser_attribute_list): Do not translate attribute strings. From-SVN: r78548
2004-02-27 03:01:10 +01:00
#
# This program 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.
target-supports.exp (check-iconv-available): New function. 2004-02-26 Eric Christopher <echristo@redhat.com> * lib/target-supports.exp (check-iconv-available): New function. * lib/gcc-dg.exp (dg-require-iconv): New function. Use above. * gcc.dg/charset: New directory. * gcc.dg/charset/charset.exp: New file. * gcc.dg/charset/asm1.c: Ditto. * gcc.dg/charset/asm2.c: Ditto. * gcc.dg/charset/asm3.c: Ditto. * gcc.dg/charset/asm4.c: Ditto. * gcc.dg/charset/asm5.c: Ditto. * gcc.dg/charset/attribute1.c: Ditto. * gcc.dg/charset/attribute2.c: Ditto. * gcc.dg/charset/string1.c: Ditto. * g++.dg/charset: New directory. * g++.dg/dg.exp: Add here. Special options. * g++.dg/charset/charset.exp: New file. * g++.dg/charset/asm1.c: Ditto. * g++.dg/charset/asm2.c: Ditto. * g++.dg/charset/asm3.c: Ditto. * g++.dg/charset/asm4.c: Ditto. * g++.dg/charset/attribute1.c: Ditto. * g++.dg/charset/attribute2.c: Ditto. * g++.dg/charset/extern1.cc: Ditto. * g++.dg/charset/extern2.cc: Ditto. * g++.dg/charset/string1.c: Ditto. 2004-02-26 Eric Christopher <echristo@redhat.com> * c-lex.c (c_lex_string_translate): New variable. (lex_string): Use to determine string translation. * c-pragma.h: Prototype. * c-parse.in (start_string_translation): New. Set above. (stop_string_translation): Ditto. (attribute, attribute_list, asm_def, asm_stmt, asm_operand): Use above functions. * cp/parser.c (cp_parser_declaration): Translate strings unless token is RID_EXTERN. Set c_lex_string_translate for recursive use. (cp_parser_asm_definition): Only translate argument strings to asms. (cp_parser_asm_operand_list): Ditto. (cp_parser_attribute_list): Do not translate attribute strings. From-SVN: r78548
2004-02-27 03:01:10 +01:00
#
# You should have received a copy of the GNU General Public License
execute.exp: Change copyright header to refer to version 3 of the GNU General Public License... * gcc.c-torture/execute/execute.exp: Change copyright header to refer to version 3 of the GNU General Public License and to point readers at the COPYING3 file and the FSF's license web page. * gcc.c-torture/execute/ieee/ieee.exp, gcc.c-torture/unsorted/unsorted.exp, gcc.c-torture/compile/compile.exp, gcc.c-torture/compile/structs.c, gcc.target/powerpc/powerpc.exp, gcc.target/arm/neon/neon.exp, gcc.target/arm/arm.exp, gcc.target/cris/torture/cris-torture.exp, gcc.target/cris/cris.exp, gcc.target/ia64/ia64.exp, gcc.target/alpha/alpha.exp, gcc.target/m68k/m68k.exp, gcc.target/spu/spu.exp, gcc.target/mips/mips.exp, gcc.target/sparc/sparc.exp, gcc.target/i386/i386.exp, gcc.target/x86_64/abi/abi-x86_64.exp, gnat.dg/specs/specs.exp, gnat.dg/dg.exp, gnat.dg/style/style.exp, gcc.dg/special/mips-abi.exp, gcc.dg/special/special.exp, gcc.dg/pch/pch.exp, gcc.dg/vxworks/vxworks.exp, gcc.dg/dg.exp, gcc.dg/charset/charset.exp, gcc.dg/weak/weak.exp, gcc.dg/tree-ssa/tree-ssa.exp, gcc.dg/tls/tls.exp, gcc.dg/cpp/cpp.exp, gcc.dg/cpp/trad/trad.exp, gcc.dg/matrix/matrix.exp, gcc.dg/vmx/vmx.exp, gcc.dg/compat/struct-layout-1.exp, gcc.dg/compat/compat.exp, gcc.dg/compat/struct-layout-1_generate.c, gcc.dg/debug/debug.exp, gcc.dg/debug/dwarf2/dwarf2.exp, gcc.dg/tree-prof/tree-prof.exp, gcc.dg/ipa/ipa.exp, gcc.dg/dfp/dfp.exp, gcc.dg/noncompile/noncompile.exp, gcc.dg/vect/costmodel/ppc/ppc-costmodel-vect.exp, gcc.dg/vect/costmodel/spu/spu-costmodel-vect.exp, gcc.dg/vect/costmodel/i386/i386-costmodel-vect.exp, gcc.dg/vect/costmodel/x86_64/x86_64-costmodel-vect.exp, gcc.dg/vect/vect.exp, gcc.dg/format/format.exp, gcc.misc-tests/i386-prefetch.exp, gcc.misc-tests/sort2.exp, gcc.misc-tests/matrix1.exp, gcc.misc-tests/dectest.exp, gcc.misc-tests/options.exp, gcc.misc-tests/gcov.exp, gcc.misc-tests/mg-2.exp, gcc.misc-tests/mg.exp, gcc.misc-tests/bprob.exp, gcc.misc-tests/acker1.exp, gcc.misc-tests/dhry.exp, gcc.misc-tests/linkage.exp, gcc.misc-tests/arm-isr.exp, gcc.misc-tests/sieve.exp, g++.old-deja/g++.niklas/README, g++.old-deja/g++.gb/README, g++.old-deja/old-deja.exp, gfortran.fortran-torture/execute/execute.exp, gfortran.fortran-torture/compile/compile.exp, treelang/output/output-1.c, treelang/output/output-1.tree, treelang/execute/execute.exp, treelang/Makefile.in, treelang/compile/compile.exp, g++.dg/dg.exp, g++.dg/debug/debug.exp, g++.dg/debug/dwarf2/dwarf2.exp, g++.dg/charset/charset.exp, g++.dg/vect/vect.exp, g++.dg/tls/tls.exp, g++.dg/tree-prof/tree-prof.exp, g++.dg/pch/pch.exp, g++.dg/special/ecos.exp, g++.dg/compat/struct-layout-1.exp, g++.dg/compat/struct-layout-1_generate.c, g++.dg/compat/compat.exp, g++.dg/gcov/gcov.exp, g++.dg/bprob/bprob.exp, config/default.exp, gcc.test-framework/test-framework.awk, gcc.test-framework/gen_directive_tests, gcc.test-framework/test-framework.exp, objc.dg/special/special.exp, objc.dg/gnu-encoding/gnu-encoding.exp, objc.dg/gnu-encoding/struct-layout-encoding-1_generate.c, objc.dg/pch/pch.exp, objc.dg/dg.exp, lib/copy-file.exp, lib/profopt.exp, lib/gcc.exp, lib/mike-g++.exp, lib/c-compat.exp, lib/scanrtl.exp, lib/gfortran-dg.exp, lib/g++.exp, lib/obj-c++.exp, lib/wrapper.exp, lib/gnat-dg.exp, lib/compat.exp, lib/c-torture.exp, lib/gcc-dg.exp, lib/scanasm.exp, lib/gnat.exp, lib/treelang-dg.exp, lib/prune.exp, lib/gcov.exp, lib/treelang.exp, lib/dg-pch.exp, lib/scantree.exp, lib/g++-dg.exp, lib/objc-dg.exp, lib/file-format.exp, lib/target-libpath.exp, lib/obj-c++-dg.exp, lib/scandump.exp, lib/target-supports-dg.exp, lib/gcc-defs.exp, lib/fortran-torture.exp, lib/objc.exp, lib/scanipa.exp, lib/mike-gcc.exp, lib/objc-torture.exp, lib/gfortran.exp, lib/target-supports.exp, obj-c++.dg/dg.exp, gfortran.dg/dg.exp, gfortran.dg/vect/vect.exp, objc/execute/execute.exp, objc/execute/exceptions/exceptions.exp, objc/compile/compile.exp: Likewise. From-SVN: r127127
2007-08-01 18:25:11 +02:00
# along with GCC; see the file COPYING3. If not see
# <http://www.gnu.org/licenses/>.
# Please email any bugs, comments, and/or additions to this file to:
# gcc-patches@gcc.gnu.org
# This file defines procs for determining features supported by the target.
target-supports.exp (get_compiler_messages): Replace with... gcc/testsuite/ * lib/target-supports.exp (get_compiler_messages): Replace with... (check_compile): ...this new procedure. Handle TYPE == executable. Use comments in the source to determine the correct extension. Return a pair containing the compiler output and the output filename. Don't delete the file here. (check_no_compiler_messages_nocache): New procedure. (check_no_compiler_messages): Use it. (check_no_messages_and_pattern_nocache): New procedure. (check_no_messages_and_pattern): Use it. (check_runtime_nocache, check_runtime): New procedures. (check_effective_target_tls): Use check_no_compiler_messages. (check_effective_target_tls_native): Use check_no_messages_and_pattern. (check_effective_target_tls_runtime): Use check_runtime. (check_effective_target_fstack_protector): Likewise. (check_iconv_available): Use check_runtime_nocache. (check_effective_target_fortran_large_real): Use check_no_compiler_messages. (check_effective_target_fortran_large_int): Likewise. (check_effective_target_static_libgfortran): Likewise. (check_750cl_hw_available): Use check_cached_effective_target and check_runtime_nocache. (check_vmx_hw_available): Likewise. (check_effective_target_broken_cplxf_arg): Likewise. (check_alpha_max_hw_available): Use check_runtime. (check_function_available): Use check_no_compiler_messages. (check_cxa_atexit_available): Use check_cached_effective_target and check_runtime_nocache. (check_effective_target_dfp_nocache): Use check_no_compiler_messages_nocache. (check_effective_target_dfprt_nocache): Use check_runtime_nocache. (check_effective_target_dfp): Use check_cached_effective_target. (check_effective_target_dfprt): Likewise. (check_effective_target_arm_neon_hw): Use check_runtime. (check_effective_target_ultrasparc_hw): Likewise. (check_effective_target_c99_runtime): Use check_no_compiler_messages_nocache. From-SVN: r130599
2007-12-04 11:16:17 +01:00
# Try to compile the code given by CONTENTS into an output file of
# type TYPE, where TYPE is as for target_compile. Return a list
# whose first element contains the compiler messages and whose
# second element is the name of the output file.
#
target-supports.exp (get_compiler_messages): Replace with... gcc/testsuite/ * lib/target-supports.exp (get_compiler_messages): Replace with... (check_compile): ...this new procedure. Handle TYPE == executable. Use comments in the source to determine the correct extension. Return a pair containing the compiler output and the output filename. Don't delete the file here. (check_no_compiler_messages_nocache): New procedure. (check_no_compiler_messages): Use it. (check_no_messages_and_pattern_nocache): New procedure. (check_no_messages_and_pattern): Use it. (check_runtime_nocache, check_runtime): New procedures. (check_effective_target_tls): Use check_no_compiler_messages. (check_effective_target_tls_native): Use check_no_messages_and_pattern. (check_effective_target_tls_runtime): Use check_runtime. (check_effective_target_fstack_protector): Likewise. (check_iconv_available): Use check_runtime_nocache. (check_effective_target_fortran_large_real): Use check_no_compiler_messages. (check_effective_target_fortran_large_int): Likewise. (check_effective_target_static_libgfortran): Likewise. (check_750cl_hw_available): Use check_cached_effective_target and check_runtime_nocache. (check_vmx_hw_available): Likewise. (check_effective_target_broken_cplxf_arg): Likewise. (check_alpha_max_hw_available): Use check_runtime. (check_function_available): Use check_no_compiler_messages. (check_cxa_atexit_available): Use check_cached_effective_target and check_runtime_nocache. (check_effective_target_dfp_nocache): Use check_no_compiler_messages_nocache. (check_effective_target_dfprt_nocache): Use check_runtime_nocache. (check_effective_target_dfp): Use check_cached_effective_target. (check_effective_target_dfprt): Likewise. (check_effective_target_arm_neon_hw): Use check_runtime. (check_effective_target_ultrasparc_hw): Likewise. (check_effective_target_c99_runtime): Use check_no_compiler_messages_nocache. From-SVN: r130599
2007-12-04 11:16:17 +01:00
# BASENAME is a prefix to use for source and output files.
# If ARGS is not empty, its first element is a string that
# should be added to the command line.
#
# Assume by default that CONTENTS is C code. C++ code should contain
# "// C++" and Fortran code should contain "! Fortran".
proc check_compile {basename type contents args} {
global tool
if { [llength $args] > 0 } {
set options [list "additional_flags=[lindex $args 0]"]
} else {
set options ""
}
target-supports.exp (get_compiler_messages): Replace with... gcc/testsuite/ * lib/target-supports.exp (get_compiler_messages): Replace with... (check_compile): ...this new procedure. Handle TYPE == executable. Use comments in the source to determine the correct extension. Return a pair containing the compiler output and the output filename. Don't delete the file here. (check_no_compiler_messages_nocache): New procedure. (check_no_compiler_messages): Use it. (check_no_messages_and_pattern_nocache): New procedure. (check_no_messages_and_pattern): Use it. (check_runtime_nocache, check_runtime): New procedures. (check_effective_target_tls): Use check_no_compiler_messages. (check_effective_target_tls_native): Use check_no_messages_and_pattern. (check_effective_target_tls_runtime): Use check_runtime. (check_effective_target_fstack_protector): Likewise. (check_iconv_available): Use check_runtime_nocache. (check_effective_target_fortran_large_real): Use check_no_compiler_messages. (check_effective_target_fortran_large_int): Likewise. (check_effective_target_static_libgfortran): Likewise. (check_750cl_hw_available): Use check_cached_effective_target and check_runtime_nocache. (check_vmx_hw_available): Likewise. (check_effective_target_broken_cplxf_arg): Likewise. (check_alpha_max_hw_available): Use check_runtime. (check_function_available): Use check_no_compiler_messages. (check_cxa_atexit_available): Use check_cached_effective_target and check_runtime_nocache. (check_effective_target_dfp_nocache): Use check_no_compiler_messages_nocache. (check_effective_target_dfprt_nocache): Use check_runtime_nocache. (check_effective_target_dfp): Use check_cached_effective_target. (check_effective_target_dfprt): Likewise. (check_effective_target_arm_neon_hw): Use check_runtime. (check_effective_target_ultrasparc_hw): Likewise. (check_effective_target_c99_runtime): Use check_no_compiler_messages_nocache. From-SVN: r130599
2007-12-04 11:16:17 +01:00
switch -glob -- $contents {
"*! Fortran*" { set src ${basename}[pid].f90 }
"*// C++*" { set src ${basename}[pid].cc }
default { set src ${basename}[pid].c }
}
set compile_type $type
switch -glob $type {
assembly { set output ${basename}[pid].s }
object { set output ${basename}[pid].o }
target-supports.exp (get_compiler_messages): Replace with... gcc/testsuite/ * lib/target-supports.exp (get_compiler_messages): Replace with... (check_compile): ...this new procedure. Handle TYPE == executable. Use comments in the source to determine the correct extension. Return a pair containing the compiler output and the output filename. Don't delete the file here. (check_no_compiler_messages_nocache): New procedure. (check_no_compiler_messages): Use it. (check_no_messages_and_pattern_nocache): New procedure. (check_no_messages_and_pattern): Use it. (check_runtime_nocache, check_runtime): New procedures. (check_effective_target_tls): Use check_no_compiler_messages. (check_effective_target_tls_native): Use check_no_messages_and_pattern. (check_effective_target_tls_runtime): Use check_runtime. (check_effective_target_fstack_protector): Likewise. (check_iconv_available): Use check_runtime_nocache. (check_effective_target_fortran_large_real): Use check_no_compiler_messages. (check_effective_target_fortran_large_int): Likewise. (check_effective_target_static_libgfortran): Likewise. (check_750cl_hw_available): Use check_cached_effective_target and check_runtime_nocache. (check_vmx_hw_available): Likewise. (check_effective_target_broken_cplxf_arg): Likewise. (check_alpha_max_hw_available): Use check_runtime. (check_function_available): Use check_no_compiler_messages. (check_cxa_atexit_available): Use check_cached_effective_target and check_runtime_nocache. (check_effective_target_dfp_nocache): Use check_no_compiler_messages_nocache. (check_effective_target_dfprt_nocache): Use check_runtime_nocache. (check_effective_target_dfp): Use check_cached_effective_target. (check_effective_target_dfprt): Likewise. (check_effective_target_arm_neon_hw): Use check_runtime. (check_effective_target_ultrasparc_hw): Likewise. (check_effective_target_c99_runtime): Use check_no_compiler_messages_nocache. From-SVN: r130599
2007-12-04 11:16:17 +01:00
executable { set output ${basename}[pid].exe }
"rtl-*" {
set output ${basename}[pid].s
lappend options "additional_flags=-fdump-$type"
set compile_type assembly
}
}
set f [open $src "w"]
puts $f $contents
close $f
set lines [${tool}_target_compile $src $output $compile_type "$options"]
file delete $src
set scan_output $output
# Don't try folding this into the switch above; calling "glob" before the
# file is created won't work.
if [regexp "rtl-(.*)" $type dummy rtl_type] {
set scan_output "[glob $src.\[0-9\]\[0-9\]\[0-9\]r.$rtl_type]"
file delete $output
}
return [list $lines $scan_output]
}
proc current_target_name { } {
global target_info
if [info exists target_info(target,name)] {
set answer $target_info(target,name)
} else {
set answer ""
}
return $answer
}
# Implement an effective-target check for property PROP by invoking
# the Tcl command ARGS and seeing if it returns true.
proc check_cached_effective_target { prop args } {
global et_cache
set target [current_target_name]
if {![info exists et_cache($prop,target)]
|| $et_cache($prop,target) != $target} {
verbose "check_cached_effective_target $prop: checking $target" 2
set et_cache($prop,target) $target
set et_cache($prop,value) [uplevel eval $args]
}
set value $et_cache($prop,value)
verbose "check_cached_effective_target $prop: returning $value for $target" 2
return $value
}
target-supports.exp (get_compiler_messages): Replace with... gcc/testsuite/ * lib/target-supports.exp (get_compiler_messages): Replace with... (check_compile): ...this new procedure. Handle TYPE == executable. Use comments in the source to determine the correct extension. Return a pair containing the compiler output and the output filename. Don't delete the file here. (check_no_compiler_messages_nocache): New procedure. (check_no_compiler_messages): Use it. (check_no_messages_and_pattern_nocache): New procedure. (check_no_messages_and_pattern): Use it. (check_runtime_nocache, check_runtime): New procedures. (check_effective_target_tls): Use check_no_compiler_messages. (check_effective_target_tls_native): Use check_no_messages_and_pattern. (check_effective_target_tls_runtime): Use check_runtime. (check_effective_target_fstack_protector): Likewise. (check_iconv_available): Use check_runtime_nocache. (check_effective_target_fortran_large_real): Use check_no_compiler_messages. (check_effective_target_fortran_large_int): Likewise. (check_effective_target_static_libgfortran): Likewise. (check_750cl_hw_available): Use check_cached_effective_target and check_runtime_nocache. (check_vmx_hw_available): Likewise. (check_effective_target_broken_cplxf_arg): Likewise. (check_alpha_max_hw_available): Use check_runtime. (check_function_available): Use check_no_compiler_messages. (check_cxa_atexit_available): Use check_cached_effective_target and check_runtime_nocache. (check_effective_target_dfp_nocache): Use check_no_compiler_messages_nocache. (check_effective_target_dfprt_nocache): Use check_runtime_nocache. (check_effective_target_dfp): Use check_cached_effective_target. (check_effective_target_dfprt): Likewise. (check_effective_target_arm_neon_hw): Use check_runtime. (check_effective_target_ultrasparc_hw): Likewise. (check_effective_target_c99_runtime): Use check_no_compiler_messages_nocache. From-SVN: r130599
2007-12-04 11:16:17 +01:00
# Like check_compile, but delete the output file and return true if the
# compiler printed no messages.
proc check_no_compiler_messages_nocache {args} {
set result [eval check_compile $args]
set lines [lindex $result 0]
set output [lindex $result 1]
remote_file build delete $output
return [string match "" $lines]
}
# Like check_no_compiler_messages_nocache, but cache the result.
# PROP is the property we're checking, and doubles as a prefix for
# temporary filenames.
proc check_no_compiler_messages {prop args} {
return [check_cached_effective_target $prop {
target-supports.exp (get_compiler_messages): Replace with... gcc/testsuite/ * lib/target-supports.exp (get_compiler_messages): Replace with... (check_compile): ...this new procedure. Handle TYPE == executable. Use comments in the source to determine the correct extension. Return a pair containing the compiler output and the output filename. Don't delete the file here. (check_no_compiler_messages_nocache): New procedure. (check_no_compiler_messages): Use it. (check_no_messages_and_pattern_nocache): New procedure. (check_no_messages_and_pattern): Use it. (check_runtime_nocache, check_runtime): New procedures. (check_effective_target_tls): Use check_no_compiler_messages. (check_effective_target_tls_native): Use check_no_messages_and_pattern. (check_effective_target_tls_runtime): Use check_runtime. (check_effective_target_fstack_protector): Likewise. (check_iconv_available): Use check_runtime_nocache. (check_effective_target_fortran_large_real): Use check_no_compiler_messages. (check_effective_target_fortran_large_int): Likewise. (check_effective_target_static_libgfortran): Likewise. (check_750cl_hw_available): Use check_cached_effective_target and check_runtime_nocache. (check_vmx_hw_available): Likewise. (check_effective_target_broken_cplxf_arg): Likewise. (check_alpha_max_hw_available): Use check_runtime. (check_function_available): Use check_no_compiler_messages. (check_cxa_atexit_available): Use check_cached_effective_target and check_runtime_nocache. (check_effective_target_dfp_nocache): Use check_no_compiler_messages_nocache. (check_effective_target_dfprt_nocache): Use check_runtime_nocache. (check_effective_target_dfp): Use check_cached_effective_target. (check_effective_target_dfprt): Likewise. (check_effective_target_arm_neon_hw): Use check_runtime. (check_effective_target_ultrasparc_hw): Likewise. (check_effective_target_c99_runtime): Use check_no_compiler_messages_nocache. From-SVN: r130599
2007-12-04 11:16:17 +01:00
eval [list check_no_compiler_messages_nocache $prop] $args
}]
}
target-supports.exp (get_compiler_messages): Replace with... gcc/testsuite/ * lib/target-supports.exp (get_compiler_messages): Replace with... (check_compile): ...this new procedure. Handle TYPE == executable. Use comments in the source to determine the correct extension. Return a pair containing the compiler output and the output filename. Don't delete the file here. (check_no_compiler_messages_nocache): New procedure. (check_no_compiler_messages): Use it. (check_no_messages_and_pattern_nocache): New procedure. (check_no_messages_and_pattern): Use it. (check_runtime_nocache, check_runtime): New procedures. (check_effective_target_tls): Use check_no_compiler_messages. (check_effective_target_tls_native): Use check_no_messages_and_pattern. (check_effective_target_tls_runtime): Use check_runtime. (check_effective_target_fstack_protector): Likewise. (check_iconv_available): Use check_runtime_nocache. (check_effective_target_fortran_large_real): Use check_no_compiler_messages. (check_effective_target_fortran_large_int): Likewise. (check_effective_target_static_libgfortran): Likewise. (check_750cl_hw_available): Use check_cached_effective_target and check_runtime_nocache. (check_vmx_hw_available): Likewise. (check_effective_target_broken_cplxf_arg): Likewise. (check_alpha_max_hw_available): Use check_runtime. (check_function_available): Use check_no_compiler_messages. (check_cxa_atexit_available): Use check_cached_effective_target and check_runtime_nocache. (check_effective_target_dfp_nocache): Use check_no_compiler_messages_nocache. (check_effective_target_dfprt_nocache): Use check_runtime_nocache. (check_effective_target_dfp): Use check_cached_effective_target. (check_effective_target_dfprt): Likewise. (check_effective_target_arm_neon_hw): Use check_runtime. (check_effective_target_ultrasparc_hw): Likewise. (check_effective_target_c99_runtime): Use check_no_compiler_messages_nocache. From-SVN: r130599
2007-12-04 11:16:17 +01:00
# Like check_compile, but return true if the compiler printed no
# messages and if the contents of the output file satisfy PATTERN.
# If PATTERN has the form "!REGEXP", the contents satisfy it if they
# don't match regular expression REGEXP, otherwise they satisfy it
# if they do match regular expression PATTERN. (PATTERN can start
# with something like "[!]" if the regular expression needs to match
# "!" as the first character.)
#
# Delete the output file before returning. The other arguments are
# as for check_compile.
proc check_no_messages_and_pattern_nocache {basename pattern args} {
global tool
set result [eval [list check_compile $basename] $args]
set lines [lindex $result 0]
set output [lindex $result 1]
set ok 0
if { [string match "" $lines] } {
set chan [open "$output"]
set invert [regexp {^!(.*)} $pattern dummy pattern]
set ok [expr { [regexp $pattern [read $chan]] != $invert }]
close $chan
}
remote_file build delete $output
return $ok
}
# Like check_no_messages_and_pattern_nocache, but cache the result.
# PROP is the property we're checking, and doubles as a prefix for
# temporary filenames.
proc check_no_messages_and_pattern {prop pattern args} {
return [check_cached_effective_target $prop {
target-supports.exp (get_compiler_messages): Replace with... gcc/testsuite/ * lib/target-supports.exp (get_compiler_messages): Replace with... (check_compile): ...this new procedure. Handle TYPE == executable. Use comments in the source to determine the correct extension. Return a pair containing the compiler output and the output filename. Don't delete the file here. (check_no_compiler_messages_nocache): New procedure. (check_no_compiler_messages): Use it. (check_no_messages_and_pattern_nocache): New procedure. (check_no_messages_and_pattern): Use it. (check_runtime_nocache, check_runtime): New procedures. (check_effective_target_tls): Use check_no_compiler_messages. (check_effective_target_tls_native): Use check_no_messages_and_pattern. (check_effective_target_tls_runtime): Use check_runtime. (check_effective_target_fstack_protector): Likewise. (check_iconv_available): Use check_runtime_nocache. (check_effective_target_fortran_large_real): Use check_no_compiler_messages. (check_effective_target_fortran_large_int): Likewise. (check_effective_target_static_libgfortran): Likewise. (check_750cl_hw_available): Use check_cached_effective_target and check_runtime_nocache. (check_vmx_hw_available): Likewise. (check_effective_target_broken_cplxf_arg): Likewise. (check_alpha_max_hw_available): Use check_runtime. (check_function_available): Use check_no_compiler_messages. (check_cxa_atexit_available): Use check_cached_effective_target and check_runtime_nocache. (check_effective_target_dfp_nocache): Use check_no_compiler_messages_nocache. (check_effective_target_dfprt_nocache): Use check_runtime_nocache. (check_effective_target_dfp): Use check_cached_effective_target. (check_effective_target_dfprt): Likewise. (check_effective_target_arm_neon_hw): Use check_runtime. (check_effective_target_ultrasparc_hw): Likewise. (check_effective_target_c99_runtime): Use check_no_compiler_messages_nocache. From-SVN: r130599
2007-12-04 11:16:17 +01:00
eval [list check_no_messages_and_pattern_nocache $prop $pattern] $args
}]
}
# Try to compile and run an executable from code CONTENTS. Return true
# if the compiler reports no messages and if execution "passes" in the
# usual DejaGNU sense. The arguments are as for check_compile, with
# TYPE implicitly being "executable".
proc check_runtime_nocache {basename contents args} {
global tool
set result [eval [list check_compile $basename executable $contents] $args]
set lines [lindex $result 0]
set output [lindex $result 1]
set ok 0
if { [string match "" $lines] } {
# No error messages, everything is OK.
set result [remote_load target "./$output" "" ""]
set status [lindex $result 0]
verbose "check_runtime_nocache $basename: status is <$status>" 2
if { $status == "pass" } {
set ok 1
}
}
remote_file build delete $output
return $ok
}
# Like check_runtime_nocache, but cache the result. PROP is the
# property we're checking, and doubles as a prefix for temporary
# filenames.
proc check_runtime {prop args} {
global tool
return [check_cached_effective_target $prop {
eval [list check_runtime_nocache $prop] $args
}]
}
###############################
# proc check_weak_available { }
###############################
# weak symbols are only supported in some configs/object formats
# this proc returns 1 if they're supported, 0 if they're not, or -1 if unsure
proc check_weak_available { } {
global target_triplet
global target_cpu
# All mips targets should support it
target-supports.exp (check-iconv-available): New function. 2004-02-26 Eric Christopher <echristo@redhat.com> * lib/target-supports.exp (check-iconv-available): New function. * lib/gcc-dg.exp (dg-require-iconv): New function. Use above. * gcc.dg/charset: New directory. * gcc.dg/charset/charset.exp: New file. * gcc.dg/charset/asm1.c: Ditto. * gcc.dg/charset/asm2.c: Ditto. * gcc.dg/charset/asm3.c: Ditto. * gcc.dg/charset/asm4.c: Ditto. * gcc.dg/charset/asm5.c: Ditto. * gcc.dg/charset/attribute1.c: Ditto. * gcc.dg/charset/attribute2.c: Ditto. * gcc.dg/charset/string1.c: Ditto. * g++.dg/charset: New directory. * g++.dg/dg.exp: Add here. Special options. * g++.dg/charset/charset.exp: New file. * g++.dg/charset/asm1.c: Ditto. * g++.dg/charset/asm2.c: Ditto. * g++.dg/charset/asm3.c: Ditto. * g++.dg/charset/asm4.c: Ditto. * g++.dg/charset/attribute1.c: Ditto. * g++.dg/charset/attribute2.c: Ditto. * g++.dg/charset/extern1.cc: Ditto. * g++.dg/charset/extern2.cc: Ditto. * g++.dg/charset/string1.c: Ditto. 2004-02-26 Eric Christopher <echristo@redhat.com> * c-lex.c (c_lex_string_translate): New variable. (lex_string): Use to determine string translation. * c-pragma.h: Prototype. * c-parse.in (start_string_translation): New. Set above. (stop_string_translation): Ditto. (attribute, attribute_list, asm_def, asm_stmt, asm_operand): Use above functions. * cp/parser.c (cp_parser_declaration): Translate strings unless token is RID_EXTERN. Set c_lex_string_translate for recursive use. (cp_parser_asm_definition): Only translate argument strings to asms. (cp_parser_asm_operand_list): Ditto. (cp_parser_attribute_list): Do not translate attribute strings. From-SVN: r78548
2004-02-27 03:01:10 +01:00
if { [ string first "mips" $target_cpu ] >= 0 } {
return 1
}
# All solaris2 targets should support it
target-supports.exp (check-iconv-available): New function. 2004-02-26 Eric Christopher <echristo@redhat.com> * lib/target-supports.exp (check-iconv-available): New function. * lib/gcc-dg.exp (dg-require-iconv): New function. Use above. * gcc.dg/charset: New directory. * gcc.dg/charset/charset.exp: New file. * gcc.dg/charset/asm1.c: Ditto. * gcc.dg/charset/asm2.c: Ditto. * gcc.dg/charset/asm3.c: Ditto. * gcc.dg/charset/asm4.c: Ditto. * gcc.dg/charset/asm5.c: Ditto. * gcc.dg/charset/attribute1.c: Ditto. * gcc.dg/charset/attribute2.c: Ditto. * gcc.dg/charset/string1.c: Ditto. * g++.dg/charset: New directory. * g++.dg/dg.exp: Add here. Special options. * g++.dg/charset/charset.exp: New file. * g++.dg/charset/asm1.c: Ditto. * g++.dg/charset/asm2.c: Ditto. * g++.dg/charset/asm3.c: Ditto. * g++.dg/charset/asm4.c: Ditto. * g++.dg/charset/attribute1.c: Ditto. * g++.dg/charset/attribute2.c: Ditto. * g++.dg/charset/extern1.cc: Ditto. * g++.dg/charset/extern2.cc: Ditto. * g++.dg/charset/string1.c: Ditto. 2004-02-26 Eric Christopher <echristo@redhat.com> * c-lex.c (c_lex_string_translate): New variable. (lex_string): Use to determine string translation. * c-pragma.h: Prototype. * c-parse.in (start_string_translation): New. Set above. (stop_string_translation): Ditto. (attribute, attribute_list, asm_def, asm_stmt, asm_operand): Use above functions. * cp/parser.c (cp_parser_declaration): Translate strings unless token is RID_EXTERN. Set c_lex_string_translate for recursive use. (cp_parser_asm_definition): Only translate argument strings to asms. (cp_parser_asm_operand_list): Ditto. (cp_parser_attribute_list): Do not translate attribute strings. From-SVN: r78548
2004-02-27 03:01:10 +01:00
if { [regexp ".*-solaris2.*" $target_triplet] } {
return 1
}
# DEC OSF/1/Digital UNIX/Tru64 UNIX supports it
if { [regexp "alpha.*osf.*" $target_triplet] } {
return 1
}
# Windows targets Cygwin and MingW32 support it
if { [regexp ".*mingw32|.*cygwin" $target_triplet] } {
return 1
}
# HP-UX 10.X doesn't support it
if { [istarget "hppa*-*-hpux10*"] } {
return 0
}
# ELF and ECOFF support it. a.out does with gas/gld but may also with
# other linkers, so we should try it
set objformat [gcc_target_object_format]
switch $objformat {
elf { return 1 }
ecoff { return 1 }
a.out { return 1 }
mach-o { return 1 }
som { return 1 }
unknown { return -1 }
default { return 0 }
}
}
###############################
# proc check_weak_override_available { }
###############################
# Like check_weak_available, but return 0 if weak symbol definitions
# cannot be overridden.
proc check_weak_override_available { } {
if { [istarget "*-*-mingw*"] } {
return 0
}
return [check_weak_available]
}
###############################
# proc check_visibility_available { what_kind }
###############################
# The visibility attribute is only support in some object formats
# This proc returns 1 if it is supported, 0 if not.
# The argument is the kind of visibility, default/protected/hidden/internal.
proc check_visibility_available { what_kind } {
global tool
global target_triplet
configure.in: Remove target-libstdc++-v3 from noconfigdirs for *-*-netware... / * configure.in: Remove target-libstdc++-v3 from noconfigdirs for *-*-netware, but add target-libmudflap. Consolidate *-*-netware targets (of which really only i?86 exists) into a single entry. * configure: Likewise. gcc/ * config.gcc: Resurrect NetWare as a target. Handle special case of Novell linker to be used (specified through --with-ld=) and threading model of either Posix (default) or NKS. * config/i386/i386.c (ix86_return_pops_args): Conditionalize popping of incoming hidden argument on KEEP_AGGREGATE_RETURN_POINTER. * config/i386/i386.h (KEEP_AGGREGATE_RETURN_POINTER): New. * config/i386/netware.c, config/i386/netware.h: New. * config/i386/nwld.c, config/i386/nwld.h: New. * config/i386/netware-crt0.c: New. * config/i386/netware-libgcc.c: New. * config/i386/netware-libgcc.def: New. * config/i386/netware-libgcc.exp: New. * config/i386/t-netware, config/i386/t-nwld: New. * gthr-nks.h: New. * doc/install.texi: Document NKS threading model. gcc/cp/ * g++spec.c (MATH_LIBRARY_PROFILE): Default to MATH_LIBRARY rather than "-lm". gcc/testsuite/ * g++.dg/abi/bitfield5.C: Use -mno-ms-bitfields. * g++.old-deja/g++.jason/thunk2.C: xfail for NetWare. * g++.old-deja/g++.law/profile1.C: xfail for NetWare. * g++.old-deja/g++.other/store-expr1.C: xfail for NetWare. * gcc.c-torture/compile/20001109-1.c: xfail for NetWare. * gcc.c-torture/compile/20001109-2.c: xfail for NetWare. * gcc.c-torture/execute/multi-ix.c: Use __builtin_bzero rather than the non-portable bzero. * gcc.dg/20010912-1.c: xfail for NetWare. * gcc.dg/20020426-2.c: xfail for NetWare. * gcc.dg/20021014-1.c: xfail for NetWare. * gcc.dg/20021018-1.c: xfail for NetWare. * gcc.dg/20030213-1.c: xfail for NetWare. * gcc.dg/20030225-1.c: xfail for NetWare. * gcc.dg/20030708-1.c: xfail for NetWare. * gcc.dg/builtins-config.h: Also exclude NetWare. * gcc.dg/format/format.h: Define restrict only if not already defined. * gcc.dg/nest.c: xfail for NetWare. * gcc.dg/special/gcsec-1.c: Don't pass -static for NetWare. * lib/target-supports.exp (check_visibility_available): Exclude NetWare. fixincludes/ * inclhack.def: Suppress exception_structure and math_exception for NetWare headers. * fixincl.x: Regenerate. libstdc++-v3/ * crossconfig.m4: Add NetWare as a target. * configure: Regenerate. From-SVN: r87040
2004-09-03 20:10:08 +02:00
# On NetWare, support makes no sense.
if { [istarget *-*-netware*] } {
configure.in: Remove target-libstdc++-v3 from noconfigdirs for *-*-netware... / * configure.in: Remove target-libstdc++-v3 from noconfigdirs for *-*-netware, but add target-libmudflap. Consolidate *-*-netware targets (of which really only i?86 exists) into a single entry. * configure: Likewise. gcc/ * config.gcc: Resurrect NetWare as a target. Handle special case of Novell linker to be used (specified through --with-ld=) and threading model of either Posix (default) or NKS. * config/i386/i386.c (ix86_return_pops_args): Conditionalize popping of incoming hidden argument on KEEP_AGGREGATE_RETURN_POINTER. * config/i386/i386.h (KEEP_AGGREGATE_RETURN_POINTER): New. * config/i386/netware.c, config/i386/netware.h: New. * config/i386/nwld.c, config/i386/nwld.h: New. * config/i386/netware-crt0.c: New. * config/i386/netware-libgcc.c: New. * config/i386/netware-libgcc.def: New. * config/i386/netware-libgcc.exp: New. * config/i386/t-netware, config/i386/t-nwld: New. * gthr-nks.h: New. * doc/install.texi: Document NKS threading model. gcc/cp/ * g++spec.c (MATH_LIBRARY_PROFILE): Default to MATH_LIBRARY rather than "-lm". gcc/testsuite/ * g++.dg/abi/bitfield5.C: Use -mno-ms-bitfields. * g++.old-deja/g++.jason/thunk2.C: xfail for NetWare. * g++.old-deja/g++.law/profile1.C: xfail for NetWare. * g++.old-deja/g++.other/store-expr1.C: xfail for NetWare. * gcc.c-torture/compile/20001109-1.c: xfail for NetWare. * gcc.c-torture/compile/20001109-2.c: xfail for NetWare. * gcc.c-torture/execute/multi-ix.c: Use __builtin_bzero rather than the non-portable bzero. * gcc.dg/20010912-1.c: xfail for NetWare. * gcc.dg/20020426-2.c: xfail for NetWare. * gcc.dg/20021014-1.c: xfail for NetWare. * gcc.dg/20021018-1.c: xfail for NetWare. * gcc.dg/20030213-1.c: xfail for NetWare. * gcc.dg/20030225-1.c: xfail for NetWare. * gcc.dg/20030708-1.c: xfail for NetWare. * gcc.dg/builtins-config.h: Also exclude NetWare. * gcc.dg/format/format.h: Define restrict only if not already defined. * gcc.dg/nest.c: xfail for NetWare. * gcc.dg/special/gcsec-1.c: Don't pass -static for NetWare. * lib/target-supports.exp (check_visibility_available): Exclude NetWare. fixincludes/ * inclhack.def: Suppress exception_structure and math_exception for NetWare headers. * fixincl.x: Regenerate. libstdc++-v3/ * crossconfig.m4: Add NetWare as a target. * configure: Regenerate. From-SVN: r87040
2004-09-03 20:10:08 +02:00
return 0
}
if [string match "" $what_kind] { set what_kind "hidden" }
return [check_no_compiler_messages visibility_available_$what_kind object "
void f() __attribute__((visibility(\"$what_kind\")));
void f() {}
"]
}
###############################
# proc check_alias_available { }
###############################
# Determine if the target toolchain supports the alias attribute.
gcc-defs.exp (additional_sources): New variable. * lib/gcc-defs.exp (additional_sources): New variable. (dg-additional-sources): New function. (additional_files): New variable. (dg-additional-files): New function. (dg-additional-files-options): Likewise. * lib/gcc-dg.exp (dg-require-weak): New function. (dg-require-alias): Likewise. (dg-require-gc-sections): Likewise. * lib/target-supports.exp (check_alias_available): Remove testfile parameter. (check_gc_sections_available): New function. * lib/g++-dg.exp (dg-gpp-additional-sources): Remove. (dg-gpp-additional-files): Likewise. * lib/g++.exp (additional_sources): Remove. (additional_files): Likewise. (g++_target_compile): Use dg-additional-files-options. * gcc.dg/special/special.exp: Add "ecos" tests. Remove complex Tcl logic. * gcc.dg/special/ecos.exp: Remove. * gcc.dg/special/20000419-2.c: Use dg-require-*. * gcc.dg/special/alias-1.c: Likewise. * gcc.dg/special/alias-2.c: Likewise. * gcc.dg/special/gcsec-1.c: Likewise. * gcc.dg/special/weak-1.c: Likewise. * gcc.dg/special/weak-2.c: Likewise. * gcc.dg/special/wkali-1.c: Likewise. * gcc.dg/special/wkali-2.c: Likewise. * g++.dg/special/conpr-2.C: Use dg-additional-*, not dg-gpp-additional-*. * g++.dg/special/conpr-3.C: Likewise. * g++.dg/special/conpr-4.C: Likewise. * g++.old-deja/g++.abi/vtable3a.C: Likewise. * g++.old-deja/g++.abi/vtable3b.C: Likewise. * g++.old-deja/g++.abi/vtable3c.C: Likewise. * g++.old-deja/g++.abi/vtable3d.C: Likewise. * g++.old-deja/g++.abi/vtable3e.C: Likewise. * g++.old-deja/g++.abi/vtable3f.C: Likewise. * g++.old-deja/g++.abi/vtable3g.C: Likewise. * g++.old-deja/g++.abi/vtable3h.C: Likewise. * g++.old-deja/g++.abi/vtable3i.C: Likewise. * g++.old-deja/g++.abi/vtable3j.C: Likewise. * g++.old-deja/g++.oliva/linkage1.C: Likewise. * g++.old-deja/g++.other/comdat1.C: Likewise. * g++.old-deja/g++.other/comdat2.C: Likewise. * g++.old-deja/g++.other/comdat3.C: Likewise. * g++.old-deja/g++.other/ctor1.C: Likewise. * g++.old-deja/g++.pt/instantiate5.C: Likewise. From-SVN: r67514
2003-06-06 00:18:55 +02:00
# Returns 2 if the target supports aliases. Returns 1 if the target
# only supports weak aliased. Returns 0 if the target does not
# support aliases at all. Returns -1 if support for aliases could not
# be determined.
proc check_alias_available { } {
global alias_available_saved
global tool
if [info exists alias_available_saved] {
verbose "check_alias_available returning saved $alias_available_saved" 2
} else {
set src alias[pid].c
set obj alias[pid].o
verbose "check_alias_available compiling testfile $src" 2
set f [open $src "w"]
# Compile a small test program. The definition of "g" is
# necessary to keep the Solaris assembler from complaining
# about the program.
puts $f "#ifdef __cplusplus\nextern \"C\"\n#endif\n"
puts $f "void g() {} void f() __attribute__((alias(\"g\")));"
gcc-defs.exp (additional_sources): New variable. * lib/gcc-defs.exp (additional_sources): New variable. (dg-additional-sources): New function. (additional_files): New variable. (dg-additional-files): New function. (dg-additional-files-options): Likewise. * lib/gcc-dg.exp (dg-require-weak): New function. (dg-require-alias): Likewise. (dg-require-gc-sections): Likewise. * lib/target-supports.exp (check_alias_available): Remove testfile parameter. (check_gc_sections_available): New function. * lib/g++-dg.exp (dg-gpp-additional-sources): Remove. (dg-gpp-additional-files): Likewise. * lib/g++.exp (additional_sources): Remove. (additional_files): Likewise. (g++_target_compile): Use dg-additional-files-options. * gcc.dg/special/special.exp: Add "ecos" tests. Remove complex Tcl logic. * gcc.dg/special/ecos.exp: Remove. * gcc.dg/special/20000419-2.c: Use dg-require-*. * gcc.dg/special/alias-1.c: Likewise. * gcc.dg/special/alias-2.c: Likewise. * gcc.dg/special/gcsec-1.c: Likewise. * gcc.dg/special/weak-1.c: Likewise. * gcc.dg/special/weak-2.c: Likewise. * gcc.dg/special/wkali-1.c: Likewise. * gcc.dg/special/wkali-2.c: Likewise. * g++.dg/special/conpr-2.C: Use dg-additional-*, not dg-gpp-additional-*. * g++.dg/special/conpr-3.C: Likewise. * g++.dg/special/conpr-4.C: Likewise. * g++.old-deja/g++.abi/vtable3a.C: Likewise. * g++.old-deja/g++.abi/vtable3b.C: Likewise. * g++.old-deja/g++.abi/vtable3c.C: Likewise. * g++.old-deja/g++.abi/vtable3d.C: Likewise. * g++.old-deja/g++.abi/vtable3e.C: Likewise. * g++.old-deja/g++.abi/vtable3f.C: Likewise. * g++.old-deja/g++.abi/vtable3g.C: Likewise. * g++.old-deja/g++.abi/vtable3h.C: Likewise. * g++.old-deja/g++.abi/vtable3i.C: Likewise. * g++.old-deja/g++.abi/vtable3j.C: Likewise. * g++.old-deja/g++.oliva/linkage1.C: Likewise. * g++.old-deja/g++.other/comdat1.C: Likewise. * g++.old-deja/g++.other/comdat2.C: Likewise. * g++.old-deja/g++.other/comdat3.C: Likewise. * g++.old-deja/g++.other/ctor1.C: Likewise. * g++.old-deja/g++.pt/instantiate5.C: Likewise. From-SVN: r67514
2003-06-06 00:18:55 +02:00
close $f
set lines [${tool}_target_compile $src $obj object ""]
file delete $src
remote_file build delete $obj
gcc-defs.exp (additional_sources): New variable. * lib/gcc-defs.exp (additional_sources): New variable. (dg-additional-sources): New function. (additional_files): New variable. (dg-additional-files): New function. (dg-additional-files-options): Likewise. * lib/gcc-dg.exp (dg-require-weak): New function. (dg-require-alias): Likewise. (dg-require-gc-sections): Likewise. * lib/target-supports.exp (check_alias_available): Remove testfile parameter. (check_gc_sections_available): New function. * lib/g++-dg.exp (dg-gpp-additional-sources): Remove. (dg-gpp-additional-files): Likewise. * lib/g++.exp (additional_sources): Remove. (additional_files): Likewise. (g++_target_compile): Use dg-additional-files-options. * gcc.dg/special/special.exp: Add "ecos" tests. Remove complex Tcl logic. * gcc.dg/special/ecos.exp: Remove. * gcc.dg/special/20000419-2.c: Use dg-require-*. * gcc.dg/special/alias-1.c: Likewise. * gcc.dg/special/alias-2.c: Likewise. * gcc.dg/special/gcsec-1.c: Likewise. * gcc.dg/special/weak-1.c: Likewise. * gcc.dg/special/weak-2.c: Likewise. * gcc.dg/special/wkali-1.c: Likewise. * gcc.dg/special/wkali-2.c: Likewise. * g++.dg/special/conpr-2.C: Use dg-additional-*, not dg-gpp-additional-*. * g++.dg/special/conpr-3.C: Likewise. * g++.dg/special/conpr-4.C: Likewise. * g++.old-deja/g++.abi/vtable3a.C: Likewise. * g++.old-deja/g++.abi/vtable3b.C: Likewise. * g++.old-deja/g++.abi/vtable3c.C: Likewise. * g++.old-deja/g++.abi/vtable3d.C: Likewise. * g++.old-deja/g++.abi/vtable3e.C: Likewise. * g++.old-deja/g++.abi/vtable3f.C: Likewise. * g++.old-deja/g++.abi/vtable3g.C: Likewise. * g++.old-deja/g++.abi/vtable3h.C: Likewise. * g++.old-deja/g++.abi/vtable3i.C: Likewise. * g++.old-deja/g++.abi/vtable3j.C: Likewise. * g++.old-deja/g++.oliva/linkage1.C: Likewise. * g++.old-deja/g++.other/comdat1.C: Likewise. * g++.old-deja/g++.other/comdat2.C: Likewise. * g++.old-deja/g++.other/comdat3.C: Likewise. * g++.old-deja/g++.other/ctor1.C: Likewise. * g++.old-deja/g++.pt/instantiate5.C: Likewise. From-SVN: r67514
2003-06-06 00:18:55 +02:00
if [string match "" $lines] then {
# No error messages, everything is OK.
gcc-defs.exp (additional_sources): New variable. * lib/gcc-defs.exp (additional_sources): New variable. (dg-additional-sources): New function. (additional_files): New variable. (dg-additional-files): New function. (dg-additional-files-options): Likewise. * lib/gcc-dg.exp (dg-require-weak): New function. (dg-require-alias): Likewise. (dg-require-gc-sections): Likewise. * lib/target-supports.exp (check_alias_available): Remove testfile parameter. (check_gc_sections_available): New function. * lib/g++-dg.exp (dg-gpp-additional-sources): Remove. (dg-gpp-additional-files): Likewise. * lib/g++.exp (additional_sources): Remove. (additional_files): Likewise. (g++_target_compile): Use dg-additional-files-options. * gcc.dg/special/special.exp: Add "ecos" tests. Remove complex Tcl logic. * gcc.dg/special/ecos.exp: Remove. * gcc.dg/special/20000419-2.c: Use dg-require-*. * gcc.dg/special/alias-1.c: Likewise. * gcc.dg/special/alias-2.c: Likewise. * gcc.dg/special/gcsec-1.c: Likewise. * gcc.dg/special/weak-1.c: Likewise. * gcc.dg/special/weak-2.c: Likewise. * gcc.dg/special/wkali-1.c: Likewise. * gcc.dg/special/wkali-2.c: Likewise. * g++.dg/special/conpr-2.C: Use dg-additional-*, not dg-gpp-additional-*. * g++.dg/special/conpr-3.C: Likewise. * g++.dg/special/conpr-4.C: Likewise. * g++.old-deja/g++.abi/vtable3a.C: Likewise. * g++.old-deja/g++.abi/vtable3b.C: Likewise. * g++.old-deja/g++.abi/vtable3c.C: Likewise. * g++.old-deja/g++.abi/vtable3d.C: Likewise. * g++.old-deja/g++.abi/vtable3e.C: Likewise. * g++.old-deja/g++.abi/vtable3f.C: Likewise. * g++.old-deja/g++.abi/vtable3g.C: Likewise. * g++.old-deja/g++.abi/vtable3h.C: Likewise. * g++.old-deja/g++.abi/vtable3i.C: Likewise. * g++.old-deja/g++.abi/vtable3j.C: Likewise. * g++.old-deja/g++.oliva/linkage1.C: Likewise. * g++.old-deja/g++.other/comdat1.C: Likewise. * g++.old-deja/g++.other/comdat2.C: Likewise. * g++.old-deja/g++.other/comdat3.C: Likewise. * g++.old-deja/g++.other/ctor1.C: Likewise. * g++.old-deja/g++.pt/instantiate5.C: Likewise. From-SVN: r67514
2003-06-06 00:18:55 +02:00
set alias_available_saved 2
} else {
if [regexp "alias definitions not supported" $lines] {
verbose "check_alias_available target does not support aliases" 2
set objformat [gcc_target_object_format]
if { $objformat == "elf" } {
verbose "check_alias_available but target uses ELF format, so it ought to" 2
gcc-defs.exp (additional_sources): New variable. * lib/gcc-defs.exp (additional_sources): New variable. (dg-additional-sources): New function. (additional_files): New variable. (dg-additional-files): New function. (dg-additional-files-options): Likewise. * lib/gcc-dg.exp (dg-require-weak): New function. (dg-require-alias): Likewise. (dg-require-gc-sections): Likewise. * lib/target-supports.exp (check_alias_available): Remove testfile parameter. (check_gc_sections_available): New function. * lib/g++-dg.exp (dg-gpp-additional-sources): Remove. (dg-gpp-additional-files): Likewise. * lib/g++.exp (additional_sources): Remove. (additional_files): Likewise. (g++_target_compile): Use dg-additional-files-options. * gcc.dg/special/special.exp: Add "ecos" tests. Remove complex Tcl logic. * gcc.dg/special/ecos.exp: Remove. * gcc.dg/special/20000419-2.c: Use dg-require-*. * gcc.dg/special/alias-1.c: Likewise. * gcc.dg/special/alias-2.c: Likewise. * gcc.dg/special/gcsec-1.c: Likewise. * gcc.dg/special/weak-1.c: Likewise. * gcc.dg/special/weak-2.c: Likewise. * gcc.dg/special/wkali-1.c: Likewise. * gcc.dg/special/wkali-2.c: Likewise. * g++.dg/special/conpr-2.C: Use dg-additional-*, not dg-gpp-additional-*. * g++.dg/special/conpr-3.C: Likewise. * g++.dg/special/conpr-4.C: Likewise. * g++.old-deja/g++.abi/vtable3a.C: Likewise. * g++.old-deja/g++.abi/vtable3b.C: Likewise. * g++.old-deja/g++.abi/vtable3c.C: Likewise. * g++.old-deja/g++.abi/vtable3d.C: Likewise. * g++.old-deja/g++.abi/vtable3e.C: Likewise. * g++.old-deja/g++.abi/vtable3f.C: Likewise. * g++.old-deja/g++.abi/vtable3g.C: Likewise. * g++.old-deja/g++.abi/vtable3h.C: Likewise. * g++.old-deja/g++.abi/vtable3i.C: Likewise. * g++.old-deja/g++.abi/vtable3j.C: Likewise. * g++.old-deja/g++.oliva/linkage1.C: Likewise. * g++.old-deja/g++.other/comdat1.C: Likewise. * g++.old-deja/g++.other/comdat2.C: Likewise. * g++.old-deja/g++.other/comdat3.C: Likewise. * g++.old-deja/g++.other/ctor1.C: Likewise. * g++.old-deja/g++.pt/instantiate5.C: Likewise. From-SVN: r67514
2003-06-06 00:18:55 +02:00
set alias_available_saved -1
} else {
gcc-defs.exp (additional_sources): New variable. * lib/gcc-defs.exp (additional_sources): New variable. (dg-additional-sources): New function. (additional_files): New variable. (dg-additional-files): New function. (dg-additional-files-options): Likewise. * lib/gcc-dg.exp (dg-require-weak): New function. (dg-require-alias): Likewise. (dg-require-gc-sections): Likewise. * lib/target-supports.exp (check_alias_available): Remove testfile parameter. (check_gc_sections_available): New function. * lib/g++-dg.exp (dg-gpp-additional-sources): Remove. (dg-gpp-additional-files): Likewise. * lib/g++.exp (additional_sources): Remove. (additional_files): Likewise. (g++_target_compile): Use dg-additional-files-options. * gcc.dg/special/special.exp: Add "ecos" tests. Remove complex Tcl logic. * gcc.dg/special/ecos.exp: Remove. * gcc.dg/special/20000419-2.c: Use dg-require-*. * gcc.dg/special/alias-1.c: Likewise. * gcc.dg/special/alias-2.c: Likewise. * gcc.dg/special/gcsec-1.c: Likewise. * gcc.dg/special/weak-1.c: Likewise. * gcc.dg/special/weak-2.c: Likewise. * gcc.dg/special/wkali-1.c: Likewise. * gcc.dg/special/wkali-2.c: Likewise. * g++.dg/special/conpr-2.C: Use dg-additional-*, not dg-gpp-additional-*. * g++.dg/special/conpr-3.C: Likewise. * g++.dg/special/conpr-4.C: Likewise. * g++.old-deja/g++.abi/vtable3a.C: Likewise. * g++.old-deja/g++.abi/vtable3b.C: Likewise. * g++.old-deja/g++.abi/vtable3c.C: Likewise. * g++.old-deja/g++.abi/vtable3d.C: Likewise. * g++.old-deja/g++.abi/vtable3e.C: Likewise. * g++.old-deja/g++.abi/vtable3f.C: Likewise. * g++.old-deja/g++.abi/vtable3g.C: Likewise. * g++.old-deja/g++.abi/vtable3h.C: Likewise. * g++.old-deja/g++.abi/vtable3i.C: Likewise. * g++.old-deja/g++.abi/vtable3j.C: Likewise. * g++.old-deja/g++.oliva/linkage1.C: Likewise. * g++.old-deja/g++.other/comdat1.C: Likewise. * g++.old-deja/g++.other/comdat2.C: Likewise. * g++.old-deja/g++.other/comdat3.C: Likewise. * g++.old-deja/g++.other/ctor1.C: Likewise. * g++.old-deja/g++.pt/instantiate5.C: Likewise. From-SVN: r67514
2003-06-06 00:18:55 +02:00
set alias_available_saved 0
}
} else {
if [regexp "only weak aliases are supported" $lines] {
verbose "check_alias_available target supports only weak aliases" 2
gcc-defs.exp (additional_sources): New variable. * lib/gcc-defs.exp (additional_sources): New variable. (dg-additional-sources): New function. (additional_files): New variable. (dg-additional-files): New function. (dg-additional-files-options): Likewise. * lib/gcc-dg.exp (dg-require-weak): New function. (dg-require-alias): Likewise. (dg-require-gc-sections): Likewise. * lib/target-supports.exp (check_alias_available): Remove testfile parameter. (check_gc_sections_available): New function. * lib/g++-dg.exp (dg-gpp-additional-sources): Remove. (dg-gpp-additional-files): Likewise. * lib/g++.exp (additional_sources): Remove. (additional_files): Likewise. (g++_target_compile): Use dg-additional-files-options. * gcc.dg/special/special.exp: Add "ecos" tests. Remove complex Tcl logic. * gcc.dg/special/ecos.exp: Remove. * gcc.dg/special/20000419-2.c: Use dg-require-*. * gcc.dg/special/alias-1.c: Likewise. * gcc.dg/special/alias-2.c: Likewise. * gcc.dg/special/gcsec-1.c: Likewise. * gcc.dg/special/weak-1.c: Likewise. * gcc.dg/special/weak-2.c: Likewise. * gcc.dg/special/wkali-1.c: Likewise. * gcc.dg/special/wkali-2.c: Likewise. * g++.dg/special/conpr-2.C: Use dg-additional-*, not dg-gpp-additional-*. * g++.dg/special/conpr-3.C: Likewise. * g++.dg/special/conpr-4.C: Likewise. * g++.old-deja/g++.abi/vtable3a.C: Likewise. * g++.old-deja/g++.abi/vtable3b.C: Likewise. * g++.old-deja/g++.abi/vtable3c.C: Likewise. * g++.old-deja/g++.abi/vtable3d.C: Likewise. * g++.old-deja/g++.abi/vtable3e.C: Likewise. * g++.old-deja/g++.abi/vtable3f.C: Likewise. * g++.old-deja/g++.abi/vtable3g.C: Likewise. * g++.old-deja/g++.abi/vtable3h.C: Likewise. * g++.old-deja/g++.abi/vtable3i.C: Likewise. * g++.old-deja/g++.abi/vtable3j.C: Likewise. * g++.old-deja/g++.oliva/linkage1.C: Likewise. * g++.old-deja/g++.other/comdat1.C: Likewise. * g++.old-deja/g++.other/comdat2.C: Likewise. * g++.old-deja/g++.other/comdat3.C: Likewise. * g++.old-deja/g++.other/ctor1.C: Likewise. * g++.old-deja/g++.pt/instantiate5.C: Likewise. From-SVN: r67514
2003-06-06 00:18:55 +02:00
set alias_available_saved 1
} else {
gcc-defs.exp (additional_sources): New variable. * lib/gcc-defs.exp (additional_sources): New variable. (dg-additional-sources): New function. (additional_files): New variable. (dg-additional-files): New function. (dg-additional-files-options): Likewise. * lib/gcc-dg.exp (dg-require-weak): New function. (dg-require-alias): Likewise. (dg-require-gc-sections): Likewise. * lib/target-supports.exp (check_alias_available): Remove testfile parameter. (check_gc_sections_available): New function. * lib/g++-dg.exp (dg-gpp-additional-sources): Remove. (dg-gpp-additional-files): Likewise. * lib/g++.exp (additional_sources): Remove. (additional_files): Likewise. (g++_target_compile): Use dg-additional-files-options. * gcc.dg/special/special.exp: Add "ecos" tests. Remove complex Tcl logic. * gcc.dg/special/ecos.exp: Remove. * gcc.dg/special/20000419-2.c: Use dg-require-*. * gcc.dg/special/alias-1.c: Likewise. * gcc.dg/special/alias-2.c: Likewise. * gcc.dg/special/gcsec-1.c: Likewise. * gcc.dg/special/weak-1.c: Likewise. * gcc.dg/special/weak-2.c: Likewise. * gcc.dg/special/wkali-1.c: Likewise. * gcc.dg/special/wkali-2.c: Likewise. * g++.dg/special/conpr-2.C: Use dg-additional-*, not dg-gpp-additional-*. * g++.dg/special/conpr-3.C: Likewise. * g++.dg/special/conpr-4.C: Likewise. * g++.old-deja/g++.abi/vtable3a.C: Likewise. * g++.old-deja/g++.abi/vtable3b.C: Likewise. * g++.old-deja/g++.abi/vtable3c.C: Likewise. * g++.old-deja/g++.abi/vtable3d.C: Likewise. * g++.old-deja/g++.abi/vtable3e.C: Likewise. * g++.old-deja/g++.abi/vtable3f.C: Likewise. * g++.old-deja/g++.abi/vtable3g.C: Likewise. * g++.old-deja/g++.abi/vtable3h.C: Likewise. * g++.old-deja/g++.abi/vtable3i.C: Likewise. * g++.old-deja/g++.abi/vtable3j.C: Likewise. * g++.old-deja/g++.oliva/linkage1.C: Likewise. * g++.old-deja/g++.other/comdat1.C: Likewise. * g++.old-deja/g++.other/comdat2.C: Likewise. * g++.old-deja/g++.other/comdat3.C: Likewise. * g++.old-deja/g++.other/ctor1.C: Likewise. * g++.old-deja/g++.pt/instantiate5.C: Likewise. From-SVN: r67514
2003-06-06 00:18:55 +02:00
set alias_available_saved -1
}
}
}
target-supports.exp (check-iconv-available): New function. 2004-02-26 Eric Christopher <echristo@redhat.com> * lib/target-supports.exp (check-iconv-available): New function. * lib/gcc-dg.exp (dg-require-iconv): New function. Use above. * gcc.dg/charset: New directory. * gcc.dg/charset/charset.exp: New file. * gcc.dg/charset/asm1.c: Ditto. * gcc.dg/charset/asm2.c: Ditto. * gcc.dg/charset/asm3.c: Ditto. * gcc.dg/charset/asm4.c: Ditto. * gcc.dg/charset/asm5.c: Ditto. * gcc.dg/charset/attribute1.c: Ditto. * gcc.dg/charset/attribute2.c: Ditto. * gcc.dg/charset/string1.c: Ditto. * g++.dg/charset: New directory. * g++.dg/dg.exp: Add here. Special options. * g++.dg/charset/charset.exp: New file. * g++.dg/charset/asm1.c: Ditto. * g++.dg/charset/asm2.c: Ditto. * g++.dg/charset/asm3.c: Ditto. * g++.dg/charset/asm4.c: Ditto. * g++.dg/charset/attribute1.c: Ditto. * g++.dg/charset/attribute2.c: Ditto. * g++.dg/charset/extern1.cc: Ditto. * g++.dg/charset/extern2.cc: Ditto. * g++.dg/charset/string1.c: Ditto. 2004-02-26 Eric Christopher <echristo@redhat.com> * c-lex.c (c_lex_string_translate): New variable. (lex_string): Use to determine string translation. * c-pragma.h: Prototype. * c-parse.in (start_string_translation): New. Set above. (stop_string_translation): Ditto. (attribute, attribute_list, asm_def, asm_stmt, asm_operand): Use above functions. * cp/parser.c (cp_parser_declaration): Translate strings unless token is RID_EXTERN. Set c_lex_string_translate for recursive use. (cp_parser_asm_definition): Only translate argument strings to asms. (cp_parser_asm_operand_list): Ditto. (cp_parser_attribute_list): Do not translate attribute strings. From-SVN: r78548
2004-02-27 03:01:10 +01:00
verbose "check_alias_available returning $alias_available_saved" 2
}
return $alias_available_saved
}
gcc-defs.exp (additional_sources): New variable. * lib/gcc-defs.exp (additional_sources): New variable. (dg-additional-sources): New function. (additional_files): New variable. (dg-additional-files): New function. (dg-additional-files-options): Likewise. * lib/gcc-dg.exp (dg-require-weak): New function. (dg-require-alias): Likewise. (dg-require-gc-sections): Likewise. * lib/target-supports.exp (check_alias_available): Remove testfile parameter. (check_gc_sections_available): New function. * lib/g++-dg.exp (dg-gpp-additional-sources): Remove. (dg-gpp-additional-files): Likewise. * lib/g++.exp (additional_sources): Remove. (additional_files): Likewise. (g++_target_compile): Use dg-additional-files-options. * gcc.dg/special/special.exp: Add "ecos" tests. Remove complex Tcl logic. * gcc.dg/special/ecos.exp: Remove. * gcc.dg/special/20000419-2.c: Use dg-require-*. * gcc.dg/special/alias-1.c: Likewise. * gcc.dg/special/alias-2.c: Likewise. * gcc.dg/special/gcsec-1.c: Likewise. * gcc.dg/special/weak-1.c: Likewise. * gcc.dg/special/weak-2.c: Likewise. * gcc.dg/special/wkali-1.c: Likewise. * gcc.dg/special/wkali-2.c: Likewise. * g++.dg/special/conpr-2.C: Use dg-additional-*, not dg-gpp-additional-*. * g++.dg/special/conpr-3.C: Likewise. * g++.dg/special/conpr-4.C: Likewise. * g++.old-deja/g++.abi/vtable3a.C: Likewise. * g++.old-deja/g++.abi/vtable3b.C: Likewise. * g++.old-deja/g++.abi/vtable3c.C: Likewise. * g++.old-deja/g++.abi/vtable3d.C: Likewise. * g++.old-deja/g++.abi/vtable3e.C: Likewise. * g++.old-deja/g++.abi/vtable3f.C: Likewise. * g++.old-deja/g++.abi/vtable3g.C: Likewise. * g++.old-deja/g++.abi/vtable3h.C: Likewise. * g++.old-deja/g++.abi/vtable3i.C: Likewise. * g++.old-deja/g++.abi/vtable3j.C: Likewise. * g++.old-deja/g++.oliva/linkage1.C: Likewise. * g++.old-deja/g++.other/comdat1.C: Likewise. * g++.old-deja/g++.other/comdat2.C: Likewise. * g++.old-deja/g++.other/comdat3.C: Likewise. * g++.old-deja/g++.other/ctor1.C: Likewise. * g++.old-deja/g++.pt/instantiate5.C: Likewise. From-SVN: r67514
2003-06-06 00:18:55 +02:00
# Returns true if --gc-sections is supported on the target.
proc check_gc_sections_available { } {
global gc_sections_available_saved
global tool
gcc-defs.exp (additional_sources): New variable. * lib/gcc-defs.exp (additional_sources): New variable. (dg-additional-sources): New function. (additional_files): New variable. (dg-additional-files): New function. (dg-additional-files-options): Likewise. * lib/gcc-dg.exp (dg-require-weak): New function. (dg-require-alias): Likewise. (dg-require-gc-sections): Likewise. * lib/target-supports.exp (check_alias_available): Remove testfile parameter. (check_gc_sections_available): New function. * lib/g++-dg.exp (dg-gpp-additional-sources): Remove. (dg-gpp-additional-files): Likewise. * lib/g++.exp (additional_sources): Remove. (additional_files): Likewise. (g++_target_compile): Use dg-additional-files-options. * gcc.dg/special/special.exp: Add "ecos" tests. Remove complex Tcl logic. * gcc.dg/special/ecos.exp: Remove. * gcc.dg/special/20000419-2.c: Use dg-require-*. * gcc.dg/special/alias-1.c: Likewise. * gcc.dg/special/alias-2.c: Likewise. * gcc.dg/special/gcsec-1.c: Likewise. * gcc.dg/special/weak-1.c: Likewise. * gcc.dg/special/weak-2.c: Likewise. * gcc.dg/special/wkali-1.c: Likewise. * gcc.dg/special/wkali-2.c: Likewise. * g++.dg/special/conpr-2.C: Use dg-additional-*, not dg-gpp-additional-*. * g++.dg/special/conpr-3.C: Likewise. * g++.dg/special/conpr-4.C: Likewise. * g++.old-deja/g++.abi/vtable3a.C: Likewise. * g++.old-deja/g++.abi/vtable3b.C: Likewise. * g++.old-deja/g++.abi/vtable3c.C: Likewise. * g++.old-deja/g++.abi/vtable3d.C: Likewise. * g++.old-deja/g++.abi/vtable3e.C: Likewise. * g++.old-deja/g++.abi/vtable3f.C: Likewise. * g++.old-deja/g++.abi/vtable3g.C: Likewise. * g++.old-deja/g++.abi/vtable3h.C: Likewise. * g++.old-deja/g++.abi/vtable3i.C: Likewise. * g++.old-deja/g++.abi/vtable3j.C: Likewise. * g++.old-deja/g++.oliva/linkage1.C: Likewise. * g++.old-deja/g++.other/comdat1.C: Likewise. * g++.old-deja/g++.other/comdat2.C: Likewise. * g++.old-deja/g++.other/comdat3.C: Likewise. * g++.old-deja/g++.other/ctor1.C: Likewise. * g++.old-deja/g++.pt/instantiate5.C: Likewise. From-SVN: r67514
2003-06-06 00:18:55 +02:00
if {![info exists gc_sections_available_saved]} {
# Some targets don't support gc-sections despite whatever's
# advertised by ld's options.
if { [istarget alpha*-*-*]
|| [istarget ia64-*-*] } {
set gc_sections_available_saved 0
return 0
}
# elf2flt uses -q (--emit-relocs), which is incompatible with
# --gc-sections.
if { [board_info target exists ldflags]
&& [regexp " -elf2flt\[ =\]" " [board_info target ldflags] "] } {
set gc_sections_available_saved 0
return 0
}
# VxWorks kernel modules are relocatable objects linked with -r,
# while RTP executables are linked with -q (--emit-relocs).
# Both of these options are incompatible with --gc-sections.
if { [istarget *-*-vxworks*] } {
set gc_sections_available_saved 0
return 0
}
gcc-defs.exp (additional_sources): New variable. * lib/gcc-defs.exp (additional_sources): New variable. (dg-additional-sources): New function. (additional_files): New variable. (dg-additional-files): New function. (dg-additional-files-options): Likewise. * lib/gcc-dg.exp (dg-require-weak): New function. (dg-require-alias): Likewise. (dg-require-gc-sections): Likewise. * lib/target-supports.exp (check_alias_available): Remove testfile parameter. (check_gc_sections_available): New function. * lib/g++-dg.exp (dg-gpp-additional-sources): Remove. (dg-gpp-additional-files): Likewise. * lib/g++.exp (additional_sources): Remove. (additional_files): Likewise. (g++_target_compile): Use dg-additional-files-options. * gcc.dg/special/special.exp: Add "ecos" tests. Remove complex Tcl logic. * gcc.dg/special/ecos.exp: Remove. * gcc.dg/special/20000419-2.c: Use dg-require-*. * gcc.dg/special/alias-1.c: Likewise. * gcc.dg/special/alias-2.c: Likewise. * gcc.dg/special/gcsec-1.c: Likewise. * gcc.dg/special/weak-1.c: Likewise. * gcc.dg/special/weak-2.c: Likewise. * gcc.dg/special/wkali-1.c: Likewise. * gcc.dg/special/wkali-2.c: Likewise. * g++.dg/special/conpr-2.C: Use dg-additional-*, not dg-gpp-additional-*. * g++.dg/special/conpr-3.C: Likewise. * g++.dg/special/conpr-4.C: Likewise. * g++.old-deja/g++.abi/vtable3a.C: Likewise. * g++.old-deja/g++.abi/vtable3b.C: Likewise. * g++.old-deja/g++.abi/vtable3c.C: Likewise. * g++.old-deja/g++.abi/vtable3d.C: Likewise. * g++.old-deja/g++.abi/vtable3e.C: Likewise. * g++.old-deja/g++.abi/vtable3f.C: Likewise. * g++.old-deja/g++.abi/vtable3g.C: Likewise. * g++.old-deja/g++.abi/vtable3h.C: Likewise. * g++.old-deja/g++.abi/vtable3i.C: Likewise. * g++.old-deja/g++.abi/vtable3j.C: Likewise. * g++.old-deja/g++.oliva/linkage1.C: Likewise. * g++.old-deja/g++.other/comdat1.C: Likewise. * g++.old-deja/g++.other/comdat2.C: Likewise. * g++.old-deja/g++.other/comdat3.C: Likewise. * g++.old-deja/g++.other/ctor1.C: Likewise. * g++.old-deja/g++.pt/instantiate5.C: Likewise. From-SVN: r67514
2003-06-06 00:18:55 +02:00
# Check if the ld used by gcc supports --gc-sections.
configure.in: Remove target-libstdc++-v3 from noconfigdirs for *-*-netware... / * configure.in: Remove target-libstdc++-v3 from noconfigdirs for *-*-netware, but add target-libmudflap. Consolidate *-*-netware targets (of which really only i?86 exists) into a single entry. * configure: Likewise. gcc/ * config.gcc: Resurrect NetWare as a target. Handle special case of Novell linker to be used (specified through --with-ld=) and threading model of either Posix (default) or NKS. * config/i386/i386.c (ix86_return_pops_args): Conditionalize popping of incoming hidden argument on KEEP_AGGREGATE_RETURN_POINTER. * config/i386/i386.h (KEEP_AGGREGATE_RETURN_POINTER): New. * config/i386/netware.c, config/i386/netware.h: New. * config/i386/nwld.c, config/i386/nwld.h: New. * config/i386/netware-crt0.c: New. * config/i386/netware-libgcc.c: New. * config/i386/netware-libgcc.def: New. * config/i386/netware-libgcc.exp: New. * config/i386/t-netware, config/i386/t-nwld: New. * gthr-nks.h: New. * doc/install.texi: Document NKS threading model. gcc/cp/ * g++spec.c (MATH_LIBRARY_PROFILE): Default to MATH_LIBRARY rather than "-lm". gcc/testsuite/ * g++.dg/abi/bitfield5.C: Use -mno-ms-bitfields. * g++.old-deja/g++.jason/thunk2.C: xfail for NetWare. * g++.old-deja/g++.law/profile1.C: xfail for NetWare. * g++.old-deja/g++.other/store-expr1.C: xfail for NetWare. * gcc.c-torture/compile/20001109-1.c: xfail for NetWare. * gcc.c-torture/compile/20001109-2.c: xfail for NetWare. * gcc.c-torture/execute/multi-ix.c: Use __builtin_bzero rather than the non-portable bzero. * gcc.dg/20010912-1.c: xfail for NetWare. * gcc.dg/20020426-2.c: xfail for NetWare. * gcc.dg/20021014-1.c: xfail for NetWare. * gcc.dg/20021018-1.c: xfail for NetWare. * gcc.dg/20030213-1.c: xfail for NetWare. * gcc.dg/20030225-1.c: xfail for NetWare. * gcc.dg/20030708-1.c: xfail for NetWare. * gcc.dg/builtins-config.h: Also exclude NetWare. * gcc.dg/format/format.h: Define restrict only if not already defined. * gcc.dg/nest.c: xfail for NetWare. * gcc.dg/special/gcsec-1.c: Don't pass -static for NetWare. * lib/target-supports.exp (check_visibility_available): Exclude NetWare. fixincludes/ * inclhack.def: Suppress exception_structure and math_exception for NetWare headers. * fixincl.x: Regenerate. libstdc++-v3/ * crossconfig.m4: Add NetWare as a target. * configure: Regenerate. From-SVN: r87040
2004-09-03 20:10:08 +02:00
set gcc_spec [${tool}_target_compile "-dumpspecs" "" "none" ""]
regsub ".*\n\*linker:\[ \t\]*\n(\[^ \t\n\]*).*" "$gcc_spec" {\1} linker
set gcc_ld [lindex [${tool}_target_compile "-print-prog-name=$linker" "" "none" ""] 0]
gcc-defs.exp (additional_sources): New variable. * lib/gcc-defs.exp (additional_sources): New variable. (dg-additional-sources): New function. (additional_files): New variable. (dg-additional-files): New function. (dg-additional-files-options): Likewise. * lib/gcc-dg.exp (dg-require-weak): New function. (dg-require-alias): Likewise. (dg-require-gc-sections): Likewise. * lib/target-supports.exp (check_alias_available): Remove testfile parameter. (check_gc_sections_available): New function. * lib/g++-dg.exp (dg-gpp-additional-sources): Remove. (dg-gpp-additional-files): Likewise. * lib/g++.exp (additional_sources): Remove. (additional_files): Likewise. (g++_target_compile): Use dg-additional-files-options. * gcc.dg/special/special.exp: Add "ecos" tests. Remove complex Tcl logic. * gcc.dg/special/ecos.exp: Remove. * gcc.dg/special/20000419-2.c: Use dg-require-*. * gcc.dg/special/alias-1.c: Likewise. * gcc.dg/special/alias-2.c: Likewise. * gcc.dg/special/gcsec-1.c: Likewise. * gcc.dg/special/weak-1.c: Likewise. * gcc.dg/special/weak-2.c: Likewise. * gcc.dg/special/wkali-1.c: Likewise. * gcc.dg/special/wkali-2.c: Likewise. * g++.dg/special/conpr-2.C: Use dg-additional-*, not dg-gpp-additional-*. * g++.dg/special/conpr-3.C: Likewise. * g++.dg/special/conpr-4.C: Likewise. * g++.old-deja/g++.abi/vtable3a.C: Likewise. * g++.old-deja/g++.abi/vtable3b.C: Likewise. * g++.old-deja/g++.abi/vtable3c.C: Likewise. * g++.old-deja/g++.abi/vtable3d.C: Likewise. * g++.old-deja/g++.abi/vtable3e.C: Likewise. * g++.old-deja/g++.abi/vtable3f.C: Likewise. * g++.old-deja/g++.abi/vtable3g.C: Likewise. * g++.old-deja/g++.abi/vtable3h.C: Likewise. * g++.old-deja/g++.abi/vtable3i.C: Likewise. * g++.old-deja/g++.abi/vtable3j.C: Likewise. * g++.old-deja/g++.oliva/linkage1.C: Likewise. * g++.old-deja/g++.other/comdat1.C: Likewise. * g++.old-deja/g++.other/comdat2.C: Likewise. * g++.old-deja/g++.other/comdat3.C: Likewise. * g++.old-deja/g++.other/ctor1.C: Likewise. * g++.old-deja/g++.pt/instantiate5.C: Likewise. From-SVN: r67514
2003-06-06 00:18:55 +02:00
set ld_output [remote_exec host "$gcc_ld" "--help"]
if { [ string first "--gc-sections" $ld_output ] >= 0 } {
set gc_sections_available_saved 1
} else {
set gc_sections_available_saved 0
}
}
return $gc_sections_available_saved
}
# Return 1 if according to target_info struct and explicit target list
# target is supposed to support trampolines.
proc check_effective_target_trampolines { } {
if [target_info exists no_trampolines] {
return 0
}
if { [istarget avr-*-*]
|| [istarget hppa2.0w-hp-hpux11.23]
|| [istarget hppa64-hp-hpux11.23] } {
return 0;
}
return 1
}
# Return 1 if according to target_info struct and explicit target list
# target is supposed to keep null pointer checks. This could be due to
# use of option fno-delete-null-pointer-checks or hardwired in target.
proc check_effective_target_keeps_null_pointer_checks { } {
if [target_info exists keeps_null_pointer_checks] {
return 1
}
if { [istarget avr-*-*] } {
return 1;
}
return 0
}
# Return true if profiling is supported on the target.
proc check_profiling_available { test_what } {
global profiling_available_saved
verbose "Profiling argument is <$test_what>" 1
# These conditions depend on the argument so examine them before
# looking at the cache variable.
# Support for -p on solaris2 relies on mcrt1.o which comes with the
# vendor compiler. We cannot reliably predict the directory where the
# vendor compiler (and thus mcrt1.o) is installed so we can't
# necessarily find mcrt1.o even if we have it.
if { [istarget *-*-solaris2*] && [lindex $test_what 1] == "-p" } {
return 0
}
# Support for -p on irix relies on libprof1.a which doesn't appear to
# exist on any irix6 system currently posting testsuite results.
# Support for -pg on irix relies on gcrt1.o which doesn't exist yet.
# See: http://gcc.gnu.org/ml/gcc/2002-10/msg00169.html
target-supports.exp (check-iconv-available): New function. 2004-02-26 Eric Christopher <echristo@redhat.com> * lib/target-supports.exp (check-iconv-available): New function. * lib/gcc-dg.exp (dg-require-iconv): New function. Use above. * gcc.dg/charset: New directory. * gcc.dg/charset/charset.exp: New file. * gcc.dg/charset/asm1.c: Ditto. * gcc.dg/charset/asm2.c: Ditto. * gcc.dg/charset/asm3.c: Ditto. * gcc.dg/charset/asm4.c: Ditto. * gcc.dg/charset/asm5.c: Ditto. * gcc.dg/charset/attribute1.c: Ditto. * gcc.dg/charset/attribute2.c: Ditto. * gcc.dg/charset/string1.c: Ditto. * g++.dg/charset: New directory. * g++.dg/dg.exp: Add here. Special options. * g++.dg/charset/charset.exp: New file. * g++.dg/charset/asm1.c: Ditto. * g++.dg/charset/asm2.c: Ditto. * g++.dg/charset/asm3.c: Ditto. * g++.dg/charset/asm4.c: Ditto. * g++.dg/charset/attribute1.c: Ditto. * g++.dg/charset/attribute2.c: Ditto. * g++.dg/charset/extern1.cc: Ditto. * g++.dg/charset/extern2.cc: Ditto. * g++.dg/charset/string1.c: Ditto. 2004-02-26 Eric Christopher <echristo@redhat.com> * c-lex.c (c_lex_string_translate): New variable. (lex_string): Use to determine string translation. * c-pragma.h: Prototype. * c-parse.in (start_string_translation): New. Set above. (stop_string_translation): Ditto. (attribute, attribute_list, asm_def, asm_stmt, asm_operand): Use above functions. * cp/parser.c (cp_parser_declaration): Translate strings unless token is RID_EXTERN. Set c_lex_string_translate for recursive use. (cp_parser_asm_definition): Only translate argument strings to asms. (cp_parser_asm_operand_list): Ditto. (cp_parser_attribute_list): Do not translate attribute strings. From-SVN: r78548
2004-02-27 03:01:10 +01:00
if { [istarget mips*-*-irix*]
&& ([lindex $test_what 1] == "-p" || [lindex $test_what 1] == "-pg") } {
return 0
configure.ac (mips*-*-*linux*, [...]): Use mt-mips-gnu. * configure.ac (mips*-*-*linux*, mips*-*-gnu*): Use mt-mips-gnu. * configure: Regenerate. config/ * mt-mips16-compat: New file, taken from mt-mips-elfoabi. * mt-mips-elfoabi: Include mt-mips16-compat. * mt-mips-gnu: New file. gcc/ * config.gcc (mips*-*-linux*, mips64*-*-linux*): Add mips/t-libgcc-mips16 to tmake_file. * config/mips/mips-protos.h (mips_call_type): New enum. (mips_pic_base_register, mips_got_load): Declare. (mips_restore_gp): Take an rtx argument. (mips_use_pic_fn_addr_reg_p): Declare. (mips_expand_call): Replace the sibcall_p argument with a mips_call_type argument. Add a lazy_p parameter. (mips_split_call): Declare. * config/mips/mips.h (MIPS16_PIC_TEMP_REGNUM): New macro. (MIPS16_PIC_TEMP): Likewise. (reg_class): Delete M16_NA_REGS. (REG_CLASS_NAMES, REG_CLASS_CONTENTS): Update accordingly. (SYMBOL_FLAG_BIND_NOW, SYMBOL_REF_BIND_NOW_P): New macros. (mips_split_hi_p): Declare. * config/mips/mips.c (mips_split_hi_p): New array. (mips_regno_to_class): Change M16_NA_REGS entries to M16_REGS. (mips_got_symbol_type_p): New function. (mips_global_symbol_p): Check SYMBOL_REF_EXTERNAL_P. (mips16_stub_function_p): New function. (mips16_local_function_p): Likewise. (mips_use_pic_fn_addr_reg_p): Likewise. (mips_cannot_force_const_mem): Return false for HIGHs. Extend CONST_INT and symbolic handling to MIPS16, using mips_symbol_insns to check that the base symbol type is a legitimate constant. Reject GOT-based constants if TARGET_MIPS16_PCREL_LOADS. (mips_const_insns): Check targetm.cannot_force_const_mem when decomposing a symbolic base and a large offset. (mips_emit_call_insn): Add ORIG_ADDR and ADDR parameters. When calling a function that needs $25 from MIPS16 code, move the target address into $25 separately and add a USE to the call insn. (mips16_gp_pseudo_reg): Insert the initializer immediately before the first real insn. (mips_pic_base_register, mips_got_load): New functions. (mips_split_symbol): Generalize the name of the LO_SUM_OUT parameter to LOW_OUT. Say that it can be any valid SET_SRC when splitting a load-address operation. Split SYMBOL_GOT_DISP constants and highs of SYMBOL_GOT_PAGE_OFST constants. (mips_call_tls_get_addr): Update the call to mips_expand_call, also passing NULL_RTX rather than const0_rtx as the aux argument. (mips_rewrite_small_data_p): Check mips_lo_relocs and mips_split_p instead of TARGET_EXPLICIT_RELOCS. (mips_ok_for_lazy_binding_p): Check SYMBOL_REF_BIND_NOW_P. (mips_load_call_address): Replace the sibcall_p argument with a mips_call_type argument. Use mips_got_load. (mips16_local_alias): New structure. (mips16_local_aliases): New variable. (mips16_local_aliases_hash): New function. (mips16_local_aliases_eq): Likewise. (mips16_local_alias): Likewise. (mips16_stub_function): Likewise. (mips16_build_function_stub): Create a local alias for the target function. Handle TARGET_ABICALLS. For PIC abicalls, emit a .cpload directive and an R_MIPS_NONE relocation for the target function, then load the alias rather than the function itself. Wrap the non-PIC abicalls version in ".option pic0/.option pic2". (mips16_copy_fpr_return_value): Use mips16_stub_function and mips_expand_call. Set SYMBOL_REF_BIND_NOW on the symbol. (mips16_build_call_stub): Replace the FN parameter with an FN_PTR parameter. Force the address into a register if it isn't a call_insn_operand; don't rely on the caller to do this. If a call to a locally-defined and locally-binding MIPS16 function must be made indirectly, redirect the call to the function's local alias. Use mips16_stub_function_p, mips16_stub_function, mips_expand_call and use_reg. Set SYMBOL_FLAG_BIND_NOW on __mips_call_* symbols. Use explicit %hi and %lo accesses where possible. Use MIPS_CALL to generate the correct code form of a jal instruction. Add clobbers of $18 instead of uses. Update the call to mips_emit_call_insn. (mips_expand_call): Replace the SIBCALL_P argument with a mips_call_type argument and handle the new MIPS_CALL_EPILOGUE value. Take a LAZY_P parameter. Call mips16_build_call_stub first, allowing it to modify the call address. Update the calls to mips_load_call_address and mips_emit_call_insn. (mips_split_call): New function. (mips_init_relocs): Clear mips_split_hi_p. Only use %gp_rel if !TARGET_MIPS16. Split SYMBOL_GOT_DISP, and the high parts of SYMBOL_GOT_PAGE_OFST, for MIPS16 code. (mips_global_pointer): Check mips16_cfun_returns_in_fpr_p. (mips_extra_live_on_entry): Include MIPS16_PIC_TEMP_REGNUM if TARGET_MIPS16. (mips_cprestore_slot): New function. (mips_restore_gp): Take a TEMP parameter. Handle TARGET_MIPS16 and use mips_cprestore_slot. (mips_output_function_prologue): Handle TARGET_MIPS16 for LOADGP_OLDABI. (mips_emit_loadgp): Move into MIPS16_PIC_TEMP for MIPS16, then use a copygp_mips16 instruction to set up $28. (mips_expand_prologue): Initialize the cprestore slot for MIPS16 too. (mips16_lay_out_constants): Call split_all_insns_noflow. (mips_reorg_process_insns): Explicitly set all_noreorder_p to false if TARGET_MIPS16. (mips_reorg): Don't call vr4130_align_insns if TARGET_MIPS16. (mips_output_mi_thunk): Use mips_got_symbol_type_p. Use the mips_dangerous_for_la25_p approach for MIPS16 PIC calls too. (mips_set_mips16_mode): Always set MASK_EXPLICIT_RELOCS for MIPS16 code. Allow MIPS16 o32 PIC. (mips_override_options): Allow MIPS16 o32 PIC. * config/mips/mips.md: Lower CONST_GP_P moves into register moves after reload if TARGET_USE_GOT. (UNSPEC_COPYGP): New constant. (length): Use a default length of 8 for MIPS16 GOT loads. (*got_disp<mode>): Check mips_split_p instead of TARGET_XGOT. (*got_page<mode>): Check mips_split_hi_p. (*got_disp<mode>, *got_page<mode>): Use mips_got_load. (unspec_got<mode>, unspec_call<mode>): New expanders. (load_got<mode>, load_call<mode>): Remove the length attributes. Use a got attribute instead of a type attribute. (copygp_mips16): New insn. (restore_gp): Add a scratch clobber and pass it to mips_restore_gp. (load_call<mode>): Use a "d" constraint instead of an "r" constraint. (sibcall, sibcall_value, call, call_value): Update the calls to mips_expand_call. (call_internal, call_value_internal): Use mips_split_call. (call_value_multiple_internal): Likewise. (call_split): Move after call_internal (the insn it is split from). (call_internal_direct, call_value_internal_direct): Turn into define_insn_and_splits. Split if TARGET_SPLIT_CALLS. (call_direct_split, call_value_direct_split): New patterns. * config/mips/constraints.md (c): Handle TARGET_MIPS16 first and use M16_REGS instead of M16_NA_REGS. * config/mips/predicates.md (const_call_insn_operand): Replace the TARGET_ABSOLUTE_ABICALLS-based check with a more general mips_use_pic_fn_addr_reg_p check. (move_operand): Reject HIGHs if mips_split_hi_p. * config/mips/mips16.S: Assembly as empty if the ABI is not suitable. (__mips16_floatunsisf): Inline __mips16_floatsisf. (CALL_STUB_NO_RET, CALL_STUB_REG): Copy the target register to $25. * config/mips/libgcc-mips16.ver: New file. * config/mips/t-libgcc-mips16 (SHLIB_MAPFILES): Add $(srcdir)/config/mips/libgcc-mips16.ver. gcc/testsuite/ * lib/target-supports.exp (check_profiling_available): Return false for -p and -pg on MIPS16 targets. From-SVN: r138912
2008-08-09 21:08:15 +02:00
}
# We don't yet support profiling for MIPS16.
if { [istarget mips*-*-*]
&& ![check_effective_target_nomips16]
&& ([lindex $test_what 1] == "-p"
|| [lindex $test_what 1] == "-pg") } {
return 0
}
# MinGW does not support -p.
if { [istarget *-*-mingw*] && [lindex $test_what 1] == "-p" } {
return 0
}
# cygwin does not support -p.
if { [istarget *-*-cygwin*] && [lindex $test_what 1] == "-p" } {
return 0
}
# uClibc does not have gcrt1.o.
if { [check_effective_target_uclibc]
&& ([lindex $test_what 1] == "-p"
|| [lindex $test_what 1] == "-pg") } {
return 0
}
# Now examine the cache variable.
if {![info exists profiling_available_saved]} {
# Some targets don't have any implementation of __bb_init_func or are
# missing other needed machinery.
if { [istarget mmix-*-*]
|| [istarget arm*-*-eabi*]
|| [istarget picochip-*-*]
|| [istarget *-*-netware*]
|| [istarget arm*-*-elf]
|| [istarget arm*-*-symbianelf*]
|| [istarget avr-*-*]
|| [istarget bfin-*-*]
|| [istarget powerpc-*-eabi*]
|| [istarget cris-*-*]
|| [istarget crisv32-*-*]
|| [istarget fido-*-elf]
target-supports.exp (check-iconv-available): New function. 2004-02-26 Eric Christopher <echristo@redhat.com> * lib/target-supports.exp (check-iconv-available): New function. * lib/gcc-dg.exp (dg-require-iconv): New function. Use above. * gcc.dg/charset: New directory. * gcc.dg/charset/charset.exp: New file. * gcc.dg/charset/asm1.c: Ditto. * gcc.dg/charset/asm2.c: Ditto. * gcc.dg/charset/asm3.c: Ditto. * gcc.dg/charset/asm4.c: Ditto. * gcc.dg/charset/asm5.c: Ditto. * gcc.dg/charset/attribute1.c: Ditto. * gcc.dg/charset/attribute2.c: Ditto. * gcc.dg/charset/string1.c: Ditto. * g++.dg/charset: New directory. * g++.dg/dg.exp: Add here. Special options. * g++.dg/charset/charset.exp: New file. * g++.dg/charset/asm1.c: Ditto. * g++.dg/charset/asm2.c: Ditto. * g++.dg/charset/asm3.c: Ditto. * g++.dg/charset/asm4.c: Ditto. * g++.dg/charset/attribute1.c: Ditto. * g++.dg/charset/attribute2.c: Ditto. * g++.dg/charset/extern1.cc: Ditto. * g++.dg/charset/extern2.cc: Ditto. * g++.dg/charset/string1.c: Ditto. 2004-02-26 Eric Christopher <echristo@redhat.com> * c-lex.c (c_lex_string_translate): New variable. (lex_string): Use to determine string translation. * c-pragma.h: Prototype. * c-parse.in (start_string_translation): New. Set above. (stop_string_translation): Ditto. (attribute, attribute_list, asm_def, asm_stmt, asm_operand): Use above functions. * cp/parser.c (cp_parser_declaration): Translate strings unless token is RID_EXTERN. Set c_lex_string_translate for recursive use. (cp_parser_asm_definition): Only translate argument strings to asms. (cp_parser_asm_operand_list): Ditto. (cp_parser_attribute_list): Do not translate attribute strings. From-SVN: r78548
2004-02-27 03:01:10 +01:00
|| [istarget h8300-*-*]
target-supports.exp (check_effective_target_int32plus): New. * lib/target-supports.exp (check_effective_target_int32plus): New. (check_effective_target_ptr32plus): New. (check_effective_target_size32plus): New. (check_effective_target_int16): New. (check_profiling_available): Add m32c to the list of unsupported targets. * gcc.c-torture/compile/20000804-1.c: Skip m32c also. * gcc.c-torture/compile/20001226-1.c: Skip m32c due to small memory size. * gcc.c-torture/compile/20010327-1.c: Skip m32c due to non-SI pointers. * gcc.c-torture/compile/20020604-1.c: Skip m32c due to small size_t. * gcc.c-torture/compile/20050303-1.c: Require >=32 bit integers and size_t. * gcc.c-torture/compile/980506-1.c: Require >=32 bit size_t. * gcc.c-torture/execute/20020404-1.x: Check for any 16 bit target, not just xstormy16. Skip m32c due to weird pointer size. * gcc.c-torture/execute/20021024-1.x: Check for any 16 bit target, not just xstormy16. * gcc.c-torture/execute/shiftdi.x: Check for any 16 bit target, not just xstormy16. * gcc.dg/20020312-2.c: Add m32c support. * gcc.dg/20040622-2.c: Require >=32 bit pointers. * gcc.dg/20050321-1.c: XFail m32c due to incorrect malloc prototype in test. * gcc.dg/20050321-2.c: Require >=32 bit integers. * gcc.dg/asm-1.c: Skip if int and short are the same size. * gcc.dg/fold-mod-1.c: Require >=32 bit integers. * gcc.dg/fold-overflow-1.c: Skip m32c due to small const types in asm. * gcc.dg/format/bitfld-1.c: Require >=32 bit integers due to printf formats * gcc.dg/init-string-2.c: Require >=32 bit integers. * gcc.dg/max-1.c: Skip m32c in r8c or m16c mode due to small pointers. * gcc.dg/noncompile/920923-1.c: Skip small-int message for int16 hosts. * gcc.dg/pch/struct-1.c: Require >= 32 bit integers. * gcc.dg/pr14796-2.c: Require >=32 bit integers. * gcc.dg/pr17112-1.c: Require >=32 bit integers. * gcc.dg/pr18241-1.c: XFail m32c due to incorrect memset prototype in test. * gcc.dg/pr18241-2.c: XFail m32c due to incorrect memset prototype in test. * gcc.dg/pr19340.c: Skip m32c due to lack of scheduling. * gcc.dg/pr23049.c: Require >=32 bit integers. * gcc.dg/torture/pr26565.c: Skip m32c as everything is already packed. * gcc.dg/torture/pr26587.c: Require >=32 bit integers. * gcc.dg/torture/pr26630.c: Require >=32 bit integers. * gcc.dg/tree-ssa/loop-10.c: Require >=32 bit integers. * gcc.dg/tree-ssa/loop-2.c: Require >=32 bit size_t. * gcc.dg/tree-ssa/loop-4.c: Require >=32 bit size_t. * gcc.dg/tree-ssa/ltrans-1.c: Require >=32 bit size_t. * gcc.dg/tree-ssa/ltrans-2.c: Require >=32 bit size_t. * gcc.dg/tree-ssa/ltrans-3.c: Require >=32 bit size_t. * gcc.dg/tree-ssa/ltrans-4.c: Require >=32 bit size_t. * gcc.dg/tree-ssa/pr14341.c: Require >=32 bit integers. * gcc.dg/tree-ssa/pr23382.c: XFail m32c due to incorrect malloc prototype in test. * gcc.dg/tree-ssa/pr24627.c: Require >=32 bit integers. * gcc.dg/tree-ssa/pr26180.c: Require >=32 bit integers. * gcc.dg/tree-ssa/vrp14.c: Require >=32 bit integers. * gcc.dg/tree-ssa/vrp21.c: Require >=32 bit integers. * gcc.dg/tree-ssa/vrp22.c: Require >=32 bit integers. * gcc.c-torture/execute/20040629-1.x: New. Require >16 bit integers. * gcc.c-torture/execute/20040703-1.x: Likewise. * gcc.c-torture/execute/20040705-1.x: Likewise. * gcc.c-torture/execute/20040705-2.x: Likewise. * gcc.c-torture/execute/20040709-1.x: Likewise. * gcc.c-torture/execute/20040709-2.x: Likewise. * gcc.c-torture/execute/20040811-1.x: Likewise. * gcc.c-torture/execute/20050316-1.x: Likewise. * gcc.c-torture/execute/bitfld-4.x: Likewise. * gcc.c-torture/execute/pr19689.x: Likewise. * gcc.c-torture/execute/pr7284-1.x: Likewise. * gcc.c-torture/execute/usmul.x: Likewise. * gcc.c-torture/execute/vrp-5.x: Likewise. * gcc.c-torture/execute/vrp-6.x: Likewise. * gcc.dg/debug/20041023-1.s: Likewise. From-SVN: r112934
2006-04-14 01:14:25 +02:00
|| [istarget m32c-*-elf]
|| [istarget m68k-*-elf]
|| [istarget m68k-*-uclinux*]
|| [istarget mep-*-elf]
|| [istarget mips*-*-elf*]
2009-06-10 07:23:39 +02:00
|| [istarget moxie-*-elf*]
|| [istarget xstormy16-*]
|| [istarget xtensa*-*-elf]
|| [istarget *-*-rtems*]
MAINTAINERS (mt port): Remove. * MAINTAINERS (mt port): Remove. (sco5, unixware, sco udk): Remove. (Kean Johnston): Add to Write After Approval. fixincludes: * inclhack.def (AAB_svr4_replace_byteorder, AAB_ultrix_ansi_compat, AAB_ultrix_limits, AAB_ultrix_memory, libc1_G_va_list, libc1_ifdefd_memx, nested_motorola, ptx_sys_mc_param_h, sco_regset, sco_static_func, sco_utime, solaris_mutex_init_1, solaris_socket, solaris_unistd, solaris_widec, svr4_krnl, ultrix_atexit_param, ultrix_atof_param, ultrix_const3, ultrix_fix_fixproto, ultrix_ifdef, ultrix_locale, ultrix_math_ifdef, ultrix_nested_ioctl, ultrix_nested_svc, ultrix_stat, ultrix_static, ultrix_stdlib, ultrix_strings, ultrix_strings2, ultrix_sys_time, ultrix_unistd, unicosmk_restrict, uw7_byteorder_fix, windiss_math1, windiss_math2, windiss_valist): Remove. * fixincl.x: Regenerate. * mkfixinc.sh: (arm-semi-aof, hppa1.1-*-osf*, hppa1.1-*-bsd*, i370-*-openedition, i?86-*-moss*, i?86-*-uwin*, powerpc-*-eabiaix*): Remove. * tests/base/math.h: Update. * tests/base/pthread.h: Update. * tests/base/stdio.h: Update. * tests/base/stdlib.h: Update. * tests/base/string.h: Update. * tests/base/strings.h: Update. * tests/base/sys/file.h: Update. * tests/base/sys/limits.h: Update. * tests/base/sys/socket.h: Update. * tests/base/sys/stat.h: Update. * tests/base/sys/time.h: Update. * tests/base/testing.h: Update. * tests/base/unistd.h: Update. * tests/base/_G_config.h: Remove. * tests/base/arpa: Remove directory. * tests/base/fs: Remove directory. * tests/base/locale.h: Remove. * tests/base/machine: Remove directory. * tests/base/rpc/svc.h: Remove. * tests/base/sys/ioctl.h: Remove. * tests/base/sys/regset.h: Remove. * tests/base/sys/times.h: Remove. * tests/base/sys/utsname.h: Remove. * tests/base/widec.h: Remove. gcc: * config.gcc (Obsolete configurations): Remove list of configurations. (Unsupported targets list): Add *-*-linux*aout*, *-*-linux*libc1*, *-*-solaris2.[0-6], *-*-solaris2.[0-6].*, *-*-sysv*. Remove other targets matched by those patterns. (strongarm*-*-*, ep9312*-*-*, xscale-*-*, parisc*-*-*, m680[012]0-*-*, *-*-linux*libc1*, *-*-linux*aout*, alpha*-*-unicosmk*, strongarm*-*-freebsd*, ep9312-*-elf, arm*-*-kaos*, cris-*-aout, parisc*64*-*-linux*, parisc*-*-linux*, hppa1.1-*-pro*, hppa1.1-*-osf*, hppa1.1-*-bsd*, i[34567]86-sequent-ptx4*, i[34567]86-sequent-sysv4*, i[34567]86-*-beoself*, i[34567]86-*-beos*, i[34567]86-*-sco3.2v5*, i[34567]86-*-sysv5*, i[34567]86-*-sysv4*, i[34567]86-*-uwin*, i[34567]86-*-kaos*, m68020-*-elf*, m68010-*-netbsdelf*, mips-wrs-windiss, mt-*-elf, powerpc-*-beos*, powerpc-*-chorusos*, powerpc-wrs-windiss*, powerpcle-*-sysv*, powerpc-*-kaos*, powerpcle-*-kaos*, sh*-*-kaos*, sparc-*-sysv4*, strongarm-*-elf*, strongarm-*-pe, strongarm-*-kaos*, vax-*-bsd*, vax-*-sysv*, vax-*-ultrix*, xscale-*-elf, xscale-*-coff, i[34567]86-*-linux*aout*, i[34567]86-*-linux*libc1): Remove. Make code for Solaris 7 and greater unconditional for Solaris. (ep9312-*-*, parisc1*, m680[012]0-*-*, parisc*-*-*, mt-*-*): Remove --with-* handling. * config/rs6000/sysv4.h (-mwindiss): Remove from all specs. (LIB_WINDISS_SPEC, CPP_OS_WINDISS_SPEC, STARTFILE_WINDISS_SPEC, ENDFILE_WINDISS_SPEC, LINK_START_WINDISS_SPEC, LINK_OS_WINDISS_SPEC): Remove. * config/rs6000/sysv4.opt (mwindiss): Remove. * configure.ac (strongarm*-*-*, xscale*-*-*): Remove. * configure: Regenerate. * doc/cpp.texi: Don't mention BeOS. * doc/extend.texi (interrupt): Don't mention MS1. * doc/install.texi: (i386-@var{any}-sysv, m68k-bull-sysv, m68k-hp-hpux, m68000-hp-hpux, m68000-att-sysv, alphaev5-cray-unicosmk*, xscale-*-*, i?86-*-linux*aout, i?86-*-sco3.2v5*, i?86-*-udk, m68k-hp-hpux, powerpc-*-sysv4, powerpc-*-sysv4, powerpcle-*-sysv4, *-*-sysv*, vax-dec-ultrix): Remove. * doc/invoke.texi (MT Options): Remove. (-mwindiss): Remove. (CRIS Options): Remove cris-axis-aout references. (HPPA Options): Don't mention hppa1.1-*-pro. * doc/md.texi: (MorphoTech family): Remove. * libgcc2.c: Don't handle UWIN. * config/alpha/t-unicosmk: Remove. * config/alpha/unicosmk.h: Remove. * config/arm/kaos-arm.h: Remove. * config/arm/kaos-strongarm.h: Remove. * config/arm/strongarm-coff.h: Remove. * config/arm/strongarm-elf.h: Remove. * config/arm/strongarm-pe.h: Remove. * config/arm/t-strongarm-pe: Remove. * config/arm/t-xscale-coff: Remove. * config/arm/t-xscale-elf: Remove. * config/arm/xscale-coff.h: Remove. * config/arm/xscale-elf.h: Remove. * config/chorus.h: Remove. * config/cris/aout.h: Remove. * config/cris/aout.opt: Remove. * config/cris/t-aout: Remove. * config/i386/beos-elf.h: Remove. * config/i386/kaos-i386.h: Remove. * config/i386/ptx4-i.h: Remove. * config/i386/sco5.h: Remove. * config/i386/sco5.opt: Remove. * config/i386/sysv4-cpp.h: Remove. * config/i386/sysv5.h: Remove. * config/i386/t-beos: Remove. * config/i386/t-sco5: Remove. * config/i386/t-uwin: Remove. * config/i386/uwin.asm: Remove. * config/i386/uwin.h: Remove. * config/kaos.h: Remove. * config/mips/windiss.h: Remove. * config/mt: Remove directory. * config/pa/pa-osf.h: Remove. * config/pa/pa-pro-end.h: Remove. * config/pa/t-pro: Remove. * config/ptx4.h: Remove. * config/rs6000/beos.h: Remove. * config/rs6000/kaos-ppc.h: Remove. * config/rs6000/t-beos: Remove. * config/rs6000/windiss.h: Remove. * config/sh/kaos-sh.h: Remove. * config/sol2-6.h: Remove. * config/sparc/sol26-sld.h: Remove. * config/sparc/sysv4-only.h: Remove. * config/vax/bsd.h: Remove. * config/vax/t-memfuncs: Remove. * config/vax/ultrix.h: Remove. * config/vax/vaxv.h: Remove. * config/windiss.h: Remove. gcc/testsuite: * g++.dg/abi/arm_cxa_vec1.C: Don't handle xscale*-*-*. * g++.dg/eh/spbp.C: Don't handle *-*-solaris2.[56]*. * g++.dg/warn/miss-format-1.C: Don't handle Solaris before Solaris 7. * gcc.c-torture/compile/981006-1.c: Don't handle xscale*-*-*, strongarm*-*-* and cris-*-aout*. * gcc.c-torture/execute/941014-1.x: Don't handle xscale*-*-* and strongarm*-*-*. * gcc.dg/20030909-1.c: Don't handle xscale*-*-* and strongarm*-*-*. * gcc.dg/20031108-1.c: Don't handle xscale*-*-* and strongarm*-*-*. * gcc.dg/20040813-1.c: Don't handle *-*-sysv5*. * gcc.dg/arm-asm.c: Don't handle strongarm*-*-* and xscale*-*-*. * gcc.dg/arm-scd42-1.c: Use target arm*-*-*. * gcc.dg/arm-scd42-3.c: Use target arm*-*-*. * gcc.dg/cpp/assert4.c: Don't handle BeOS. * gcc.dg/debug/pr35154.c: Don't handle *-*-sysv5*. * gcc.dg/intmax_t-1.c: Don't handle *-*-solaris2.5.1 and xscale*-*-elf*. * gcc.dg/pragma-align.c: Don't handle i?86-*-sco3.2v5*. * gcc.dg/pthread-init-2.c: Don't handle *-*-solaris2.5.1. * gcc.misc-tests/arm-isr.exp: Use target arm*-*-*. * gcc.target/powerpc/ppc-sdata-1.c: Don't handle powerpc-*-sysv*. * gcc.target/powerpc/ppc-sdata-2.c: Don't handle powerpc-*-sysv*. * gcc.target/powerpc/ppc-stackalign-1.c: Don't handle powerpc-*-sysv*. * gfortran.dg/debug/pr35154-stabs.f: Don't handle *-*-sysv5*. * lib/target-supports.exp: Don't handle strongarm*-*-elf, xscale*-*-elf and *-*-windiss. * obj-c++.dg/dwarf-2.mm: Don't handle *-*-solaris2.[56]*. * objc.dg/dwarf-1.m: Don't handle *-*-solaris2.[56]*. * objc.dg/dwarf-2.m: Don't handle *-*-solaris2.[56]*. * gcc.dg/mt-loopi1.c: Remove. gnattools: * configure.ac (xscale*-wrs-vx*, xscale*-wrs-coff): Remove. * configure: Regenerate. libcpp: * configure.ac (parisc*64*-*-*): Remove. * configure: Regenerate. libffi: * configure.ac (parisc*-*-linux*, powerpc-*-sysv*, powerpc-*-beos*): Remove. * configure: Regenerate. libgcc: * config.host (strongarm*-*-*, ep9312*-*-*, xscale-*-*, parisc*-*-*, m680[012]0-*-*, *-*-linux*libc1*, *-*-linux*aout*, alpha*-*-unicosmk*, strongarm*-*-freebsd*, ep9312-*-elf, arm*-*-kaos*, cris-*-aout, parisc*64*-*-linux*, parisc*-*-linux*, hppa1.1-*-pro*, hppa1.1-*-osf*, hppa1.1-*-bsd*, i[34567]86-sequent-ptx4*, i[34567]86-sequent-sysv4*, i[34567]86-*-beoself*, i[34567]86-*-beos*, i[34567]86-*-sco3.2v5*, i[34567]86-*-sysv5*, i[34567]86-*-sysv4*, i[34567]86-*-uwin*, i[34567]86-*-kaos*, m68020-*-elf*, m68010-*-netbsdelf*, mips-wrs-windiss, mt-*-elf, powerpc-*-beos*, powerpc-*-chorusos*, powerpc-wrs-windiss*, powerpcle-*-sysv*, powerpc-*-kaos*, powerpcle-*-kaos*, sh*-*-kaos*, sparc-*-sysv4*, strongarm-*-elf*, strongarm-*-pe, strongarm-*-kaos*, vax-*-bsd*, vax-*-sysv*, vax-*-ultrix*, xscale-*-elf, xscale-*-coff): Remove. libjava: * configure.host (strongarm*-elf, xscale*-elf): Remove. libstdc++-v3: * configure.host (xscale, ep9312, m680[246]0, solaris2.5, solaris2.5.[0-9], solaris2.6, windiss*): Remove. * crossconfig.m4 (*-solaris2.5, *-solaris2.6, *-windiss*): Remove. * configure: Regenerate. * config/os/solaris/solaris2.5: Remove directory. * config/os/solaris/solaris2.6: Remove directory. * config/os/windiss: Remove directory. From-SVN: r136534
2008-06-07 20:00:15 +02:00
|| [istarget *-*-vxworks*] } {
set profiling_available_saved 0
} else {
set profiling_available_saved 1
}
}
target-supports.exp (check-iconv-available): New function. 2004-02-26 Eric Christopher <echristo@redhat.com> * lib/target-supports.exp (check-iconv-available): New function. * lib/gcc-dg.exp (dg-require-iconv): New function. Use above. * gcc.dg/charset: New directory. * gcc.dg/charset/charset.exp: New file. * gcc.dg/charset/asm1.c: Ditto. * gcc.dg/charset/asm2.c: Ditto. * gcc.dg/charset/asm3.c: Ditto. * gcc.dg/charset/asm4.c: Ditto. * gcc.dg/charset/asm5.c: Ditto. * gcc.dg/charset/attribute1.c: Ditto. * gcc.dg/charset/attribute2.c: Ditto. * gcc.dg/charset/string1.c: Ditto. * g++.dg/charset: New directory. * g++.dg/dg.exp: Add here. Special options. * g++.dg/charset/charset.exp: New file. * g++.dg/charset/asm1.c: Ditto. * g++.dg/charset/asm2.c: Ditto. * g++.dg/charset/asm3.c: Ditto. * g++.dg/charset/asm4.c: Ditto. * g++.dg/charset/attribute1.c: Ditto. * g++.dg/charset/attribute2.c: Ditto. * g++.dg/charset/extern1.cc: Ditto. * g++.dg/charset/extern2.cc: Ditto. * g++.dg/charset/string1.c: Ditto. 2004-02-26 Eric Christopher <echristo@redhat.com> * c-lex.c (c_lex_string_translate): New variable. (lex_string): Use to determine string translation. * c-pragma.h: Prototype. * c-parse.in (start_string_translation): New. Set above. (stop_string_translation): Ditto. (attribute, attribute_list, asm_def, asm_stmt, asm_operand): Use above functions. * cp/parser.c (cp_parser_declaration): Translate strings unless token is RID_EXTERN. Set c_lex_string_translate for recursive use. (cp_parser_asm_definition): Only translate argument strings to asms. (cp_parser_asm_operand_list): Ditto. (cp_parser_attribute_list): Do not translate attribute strings. From-SVN: r78548
2004-02-27 03:01:10 +01:00
return $profiling_available_saved
}
target-supports.exp (check-iconv-available): New function. 2004-02-26 Eric Christopher <echristo@redhat.com> * lib/target-supports.exp (check-iconv-available): New function. * lib/gcc-dg.exp (dg-require-iconv): New function. Use above. * gcc.dg/charset: New directory. * gcc.dg/charset/charset.exp: New file. * gcc.dg/charset/asm1.c: Ditto. * gcc.dg/charset/asm2.c: Ditto. * gcc.dg/charset/asm3.c: Ditto. * gcc.dg/charset/asm4.c: Ditto. * gcc.dg/charset/asm5.c: Ditto. * gcc.dg/charset/attribute1.c: Ditto. * gcc.dg/charset/attribute2.c: Ditto. * gcc.dg/charset/string1.c: Ditto. * g++.dg/charset: New directory. * g++.dg/dg.exp: Add here. Special options. * g++.dg/charset/charset.exp: New file. * g++.dg/charset/asm1.c: Ditto. * g++.dg/charset/asm2.c: Ditto. * g++.dg/charset/asm3.c: Ditto. * g++.dg/charset/asm4.c: Ditto. * g++.dg/charset/attribute1.c: Ditto. * g++.dg/charset/attribute2.c: Ditto. * g++.dg/charset/extern1.cc: Ditto. * g++.dg/charset/extern2.cc: Ditto. * g++.dg/charset/string1.c: Ditto. 2004-02-26 Eric Christopher <echristo@redhat.com> * c-lex.c (c_lex_string_translate): New variable. (lex_string): Use to determine string translation. * c-pragma.h: Prototype. * c-parse.in (start_string_translation): New. Set above. (stop_string_translation): Ditto. (attribute, attribute_list, asm_def, asm_stmt, asm_operand): Use above functions. * cp/parser.c (cp_parser_declaration): Translate strings unless token is RID_EXTERN. Set c_lex_string_translate for recursive use. (cp_parser_asm_definition): Only translate argument strings to asms. (cp_parser_asm_operand_list): Ditto. (cp_parser_attribute_list): Do not translate attribute strings. From-SVN: r78548
2004-02-27 03:01:10 +01:00
# Check to see if a target is "freestanding". This is as per the definition
# in Section 4 of C99 standard. Effectively, it is a target which supports no
# extra headers or libraries other than what is considered essential.
proc check_effective_target_freestanding { } {
if { [istarget picochip-*-*] } then {
return 1
} else {
return 0
}
}
# Return 1 if target has packed layout of structure members by
# default, 0 otherwise. Note that this is slightly different than
# whether the target has "natural alignment": both attributes may be
# false.
proc check_effective_target_default_packed { } {
return [check_no_compiler_messages default_packed assembly {
struct x { char a; long b; } c;
int s[sizeof (c) == sizeof (char) + sizeof (long) ? 1 : -1];
}]
}
# Return 1 if target has PCC_BITFIELD_TYPE_MATTERS defined. See
# documentation, where the test also comes from.
proc check_effective_target_pcc_bitfield_type_matters { } {
# PCC_BITFIELD_TYPE_MATTERS isn't just about unnamed or empty
# bitfields, but let's stick to the example code from the docs.
return [check_no_compiler_messages pcc_bitfield_type_matters assembly {
struct foo1 { char x; char :0; char y; };
struct foo2 { char x; int :0; char y; };
int s[sizeof (struct foo1) != sizeof (struct foo2) ? 1 : -1];
}]
}
Restore detection of unsupported TLS. 2007-09-18 Sandra Loosemore <sandra@codesourcery.com> gcc/testsuite Restore detection of unsupported TLS. Revert this patch: 2007-02-10 Richard Henderson <rth@redhat.com> * lib/target-supports.exp (check_effective_target_tls): Redefine to mean non-emulated tls. * gcc.dg/tls/alias-1.c: Remove tls requirement. * gcc.dg/tls/asm-1.c, gcc.dg/tls/debug-1.c, gcc.dg/tls/diag-1.c, gcc.dg/tls/diag-2.c, gcc.dg/tls/diag-3.c, gcc.dg/tls/diag-4.c, gcc.dg/tls/diag-5.c, gcc.dg/tls/init-1.c, gcc.dg/tls/nonpic-1.c, gcc.dg/tls/opt-10.c, gcc.dg/tls/opt-5.c, gcc.dg/tls/opt-6.c, gcc.dg/tls/opt-8.c, gcc.dg/tls/opt-9.c, gcc.dg/tls/pic-1.c, gcc.dg/tls/struct-1.c, gcc.dg/tls/trivial.c: Likewise. And then: * lib/target-supports.exp (check_effective_target_tls): Use stronger test for compiler support for TLS. (check_effective_target_tls_native): New, to test for non-emulated TLS support. * g++.dg/gomp/clause-3.C: Use dg-require-effective-target tls_native instead of dg-require-effective-target tls. * g++.dg/gomp/copyin-1.C: Likewise. * g++.dg/gomp/sharing-1.C: Likewise. * g++.dg/gomp/tls-1.C: Likewise. * g++.dg/gomp/tls-2.C: Likewise. * g++.dg/gomp/tls-3.C: Likewise. * g++.dg/tls/diag-1.C: Likewise. * g++.dg/tls/diag-2.C: Likewise. * g++.dg/tls/diag-3.C: Likewise. * g++.dg/tls/diag-4.C: Likewise. * g++.dg/tls/diag-5.C: Likewise. * g++.dg/tls/init-1.C: Likewise. * g++.dg/tls/init-2.C: Likewise. * g++.dg/tls/trivial.C: Likewise. * gcc.dg/gomp/appendix-a/a.22.1.c: Likewise. * gcc.dg/gomp/appendix-a/a.22.2.c: Likewise. * gcc.dg/gomp/appendix-a/a.24.1.c: Likewise. * gcc.dg/gomp/appendix-a/a.32.1.c: Likewise. * gcc.dg/gomp/appendix-a/a.33.1.c: Likewise. * gcc.dg/gomp/clause-1.c: Likewise. * gcc.dg/gomp/copyin-1.c: Likewise. * gcc.dg/gomp/sharing-1.c: Likewise. * gcc.dg/gomp/tls-1.c: Likewise. * gcc.dg/gomp/tls-2.c: Likewise. * gcc.dg/tls/alpha-1.c: Likewise. * gcc.dg/tls/opt-1.c: Likewise. * gcc.dg/tls/opt-13.c: Likewise. * gcc.dg/tls/opt-14.c: Likewise. * gcc.dg/tls/opt-2.c: Likewise. * gcc.dg/tls/opt-3.c: Likewise. * gcc.dg/tls/opt-4.c: Likewise. * gcc.dg/tls/opt-7.c: Likewise. * gcc.dg/tls/section-1.c: Likewise. * gfortran.dg/gomp/appendix-a/a.22.1.f90: Likewise. * gfortran.dg/gomp/appendix-a/a.22.4.f90: Likewise. * gfortran.dg/gomp/appendix-a/a.22.5.f90: Likewise. * gfortran.dg/gomp/appendix-a/a.22.6.f90: Likewise. * gfortran.dg/gomp/appendix-a/a.24.1.f90: Likewise. * gfortran.dg/gomp/appendix-a/a.32.1.f90: Likewise. * gfortran.dg/gomp/appendix-a/a.33.1.f90: Likewise. * gfortran.dg/gomp/crayptr2.f90: Likewise. * gfortran.dg/gomp/fixed-1.f: Likewise. * gfortran.dg/gomp/free-1.f90: Likewise. * gfortran.dg/gomp/omp_threadprivate1.f90: Likewise. * gfortran.dg/gomp/omp_threadprivate2.f90: Likewise. * gfortran.dg/gomp/reduction1.f90: Likewise. * gfortran.dg/gomp/sharing-1.f90: Likewise. From-SVN: r128595
2007-09-19 04:35:29 +02:00
# Return 1 if thread local storage (TLS) is supported, 0 otherwise.
proc check_effective_target_tls {} {
target-supports.exp (get_compiler_messages): Replace with... gcc/testsuite/ * lib/target-supports.exp (get_compiler_messages): Replace with... (check_compile): ...this new procedure. Handle TYPE == executable. Use comments in the source to determine the correct extension. Return a pair containing the compiler output and the output filename. Don't delete the file here. (check_no_compiler_messages_nocache): New procedure. (check_no_compiler_messages): Use it. (check_no_messages_and_pattern_nocache): New procedure. (check_no_messages_and_pattern): Use it. (check_runtime_nocache, check_runtime): New procedures. (check_effective_target_tls): Use check_no_compiler_messages. (check_effective_target_tls_native): Use check_no_messages_and_pattern. (check_effective_target_tls_runtime): Use check_runtime. (check_effective_target_fstack_protector): Likewise. (check_iconv_available): Use check_runtime_nocache. (check_effective_target_fortran_large_real): Use check_no_compiler_messages. (check_effective_target_fortran_large_int): Likewise. (check_effective_target_static_libgfortran): Likewise. (check_750cl_hw_available): Use check_cached_effective_target and check_runtime_nocache. (check_vmx_hw_available): Likewise. (check_effective_target_broken_cplxf_arg): Likewise. (check_alpha_max_hw_available): Use check_runtime. (check_function_available): Use check_no_compiler_messages. (check_cxa_atexit_available): Use check_cached_effective_target and check_runtime_nocache. (check_effective_target_dfp_nocache): Use check_no_compiler_messages_nocache. (check_effective_target_dfprt_nocache): Use check_runtime_nocache. (check_effective_target_dfp): Use check_cached_effective_target. (check_effective_target_dfprt): Likewise. (check_effective_target_arm_neon_hw): Use check_runtime. (check_effective_target_ultrasparc_hw): Likewise. (check_effective_target_c99_runtime): Use check_no_compiler_messages_nocache. From-SVN: r130599
2007-12-04 11:16:17 +01:00
return [check_no_compiler_messages tls assembly {
__thread int i;
int f (void) { return i; }
void g (int j) { i = j; }
}]
Restore detection of unsupported TLS. 2007-09-18 Sandra Loosemore <sandra@codesourcery.com> gcc/testsuite Restore detection of unsupported TLS. Revert this patch: 2007-02-10 Richard Henderson <rth@redhat.com> * lib/target-supports.exp (check_effective_target_tls): Redefine to mean non-emulated tls. * gcc.dg/tls/alias-1.c: Remove tls requirement. * gcc.dg/tls/asm-1.c, gcc.dg/tls/debug-1.c, gcc.dg/tls/diag-1.c, gcc.dg/tls/diag-2.c, gcc.dg/tls/diag-3.c, gcc.dg/tls/diag-4.c, gcc.dg/tls/diag-5.c, gcc.dg/tls/init-1.c, gcc.dg/tls/nonpic-1.c, gcc.dg/tls/opt-10.c, gcc.dg/tls/opt-5.c, gcc.dg/tls/opt-6.c, gcc.dg/tls/opt-8.c, gcc.dg/tls/opt-9.c, gcc.dg/tls/pic-1.c, gcc.dg/tls/struct-1.c, gcc.dg/tls/trivial.c: Likewise. And then: * lib/target-supports.exp (check_effective_target_tls): Use stronger test for compiler support for TLS. (check_effective_target_tls_native): New, to test for non-emulated TLS support. * g++.dg/gomp/clause-3.C: Use dg-require-effective-target tls_native instead of dg-require-effective-target tls. * g++.dg/gomp/copyin-1.C: Likewise. * g++.dg/gomp/sharing-1.C: Likewise. * g++.dg/gomp/tls-1.C: Likewise. * g++.dg/gomp/tls-2.C: Likewise. * g++.dg/gomp/tls-3.C: Likewise. * g++.dg/tls/diag-1.C: Likewise. * g++.dg/tls/diag-2.C: Likewise. * g++.dg/tls/diag-3.C: Likewise. * g++.dg/tls/diag-4.C: Likewise. * g++.dg/tls/diag-5.C: Likewise. * g++.dg/tls/init-1.C: Likewise. * g++.dg/tls/init-2.C: Likewise. * g++.dg/tls/trivial.C: Likewise. * gcc.dg/gomp/appendix-a/a.22.1.c: Likewise. * gcc.dg/gomp/appendix-a/a.22.2.c: Likewise. * gcc.dg/gomp/appendix-a/a.24.1.c: Likewise. * gcc.dg/gomp/appendix-a/a.32.1.c: Likewise. * gcc.dg/gomp/appendix-a/a.33.1.c: Likewise. * gcc.dg/gomp/clause-1.c: Likewise. * gcc.dg/gomp/copyin-1.c: Likewise. * gcc.dg/gomp/sharing-1.c: Likewise. * gcc.dg/gomp/tls-1.c: Likewise. * gcc.dg/gomp/tls-2.c: Likewise. * gcc.dg/tls/alpha-1.c: Likewise. * gcc.dg/tls/opt-1.c: Likewise. * gcc.dg/tls/opt-13.c: Likewise. * gcc.dg/tls/opt-14.c: Likewise. * gcc.dg/tls/opt-2.c: Likewise. * gcc.dg/tls/opt-3.c: Likewise. * gcc.dg/tls/opt-4.c: Likewise. * gcc.dg/tls/opt-7.c: Likewise. * gcc.dg/tls/section-1.c: Likewise. * gfortran.dg/gomp/appendix-a/a.22.1.f90: Likewise. * gfortran.dg/gomp/appendix-a/a.22.4.f90: Likewise. * gfortran.dg/gomp/appendix-a/a.22.5.f90: Likewise. * gfortran.dg/gomp/appendix-a/a.22.6.f90: Likewise. * gfortran.dg/gomp/appendix-a/a.24.1.f90: Likewise. * gfortran.dg/gomp/appendix-a/a.32.1.f90: Likewise. * gfortran.dg/gomp/appendix-a/a.33.1.f90: Likewise. * gfortran.dg/gomp/crayptr2.f90: Likewise. * gfortran.dg/gomp/fixed-1.f: Likewise. * gfortran.dg/gomp/free-1.f90: Likewise. * gfortran.dg/gomp/omp_threadprivate1.f90: Likewise. * gfortran.dg/gomp/omp_threadprivate2.f90: Likewise. * gfortran.dg/gomp/reduction1.f90: Likewise. * gfortran.dg/gomp/sharing-1.f90: Likewise. From-SVN: r128595
2007-09-19 04:35:29 +02:00
}
# Return 1 if *native* thread local storage (TLS) is supported, 0 otherwise.
proc check_effective_target_tls_native {} {
targhooks.h (default_emutls_var_fields, [...]): Declare. * targhooks.h (default_emutls_var_fields, default_emutls_var_init): Declare. * tree.h (DECL_THREAD_LOCAL): Compare against TLS_MODEL_REAL. * target.h (struct gcc_target): Add struct emutls member. * target-def.h (TARGET_EMUTLS_GET_ADDRESS, TARGET_EMUTLS_REGISTER_COMMON, TARGET_EMUTLS_VAR_SECTION, TARGET_EMUTLS_TMPL_SECTION, TARGET_EMUTLS_VAR_PREFIX, TARGET_EMUTLS_TMPL_PREFIX, TARGET_EMUTLS_VAR_FIELDS, TARGET_EMUTLS_VAR_INIT, TARGET_EMUTLS_DEBUG_FORM_TLS_ADDRESS, TARGET_EMUTLS_VAR_ALIGN_FIXED, TARGET_EMUTLS): New. (TARGET_INITIALIZER): Add TARGET_EMUTLS. * builtins.def (BUILT_IN_EMUTLS_GET_ADDRESS, BUILT_IN_EMUTLS_REGISTER_COMMON): Get name from targetm structure. * dwarf2out.c (loc_descriptor_from_tree_1): Check if emutls can emit debug information. * coretypes.h (tls_model): Add TLS_MODEL_EMULATED, TLS_MODEL_REAL. * varasm.c: Include targhooks.h. (emutls_object_section, emutls_tmpl_section): New. (EMUTLS_VAR_PREFIX, EMUTLS_TMPL_PREFIX): Remove. (EMUTLS_SEPARATOR): New. (prefix_name): New. (get_emutls_object_name): New. (default_emutls_var_fields): New, broken out of ... (get_emutls_object_type): ... here. Adjust to use target hooks. (get_emutls_init_templ_addr): Adjust to use target hooks. (emutls_decl): Adjust to use target hooks. (emutls_finish): Likewise. (default_emutls_var_init): New, broken out of ... (assemble_variable): ... here. Adjust to use target hooks. * output.h (enum section_category): Add SECCAT_EMUTLS_VAR, SECCAT_EMUTLS_TMPL. * c-common.c (handle_section_attribute): Prevent overriding sections for emulated tls with special sections. * config/i386/i386.c (x86_64_elf_select_section): Add SECCAT_EMUTLS_VAR and SECCAT_EMUTLS_TMPL. (x86_64_elf_unique_section): Likewise. * config/vxworks.c: Include tree.h. (vxworks_emutls_var_fields, vxworks_emutls_var_init): New. (vxworks_override_options): Set TLS scheme. * gcc/doc/tm.texi (Emulated TLS): New node. gcc/testsuite/ * gcc.dg/tls/section-2.c: New. * gcc.dg/tls/emutls-1.c: New. * lib/target-supports.exp (check_effective_target_tls_native): Exclude vxworks. From-SVN: r134729
2008-04-27 17:35:19 +02:00
# VxWorks uses emulated TLS machinery, but with non-standard helper
# functions, so we fail to automatically detect it.
global target_triplet
if { [regexp ".*-.*-vxworks.*" $target_triplet] } {
return 0
}
return [check_no_messages_and_pattern tls_native "!emutls" assembly {
target-supports.exp (get_compiler_messages): Replace with... gcc/testsuite/ * lib/target-supports.exp (get_compiler_messages): Replace with... (check_compile): ...this new procedure. Handle TYPE == executable. Use comments in the source to determine the correct extension. Return a pair containing the compiler output and the output filename. Don't delete the file here. (check_no_compiler_messages_nocache): New procedure. (check_no_compiler_messages): Use it. (check_no_messages_and_pattern_nocache): New procedure. (check_no_messages_and_pattern): Use it. (check_runtime_nocache, check_runtime): New procedures. (check_effective_target_tls): Use check_no_compiler_messages. (check_effective_target_tls_native): Use check_no_messages_and_pattern. (check_effective_target_tls_runtime): Use check_runtime. (check_effective_target_fstack_protector): Likewise. (check_iconv_available): Use check_runtime_nocache. (check_effective_target_fortran_large_real): Use check_no_compiler_messages. (check_effective_target_fortran_large_int): Likewise. (check_effective_target_static_libgfortran): Likewise. (check_750cl_hw_available): Use check_cached_effective_target and check_runtime_nocache. (check_vmx_hw_available): Likewise. (check_effective_target_broken_cplxf_arg): Likewise. (check_alpha_max_hw_available): Use check_runtime. (check_function_available): Use check_no_compiler_messages. (check_cxa_atexit_available): Use check_cached_effective_target and check_runtime_nocache. (check_effective_target_dfp_nocache): Use check_no_compiler_messages_nocache. (check_effective_target_dfprt_nocache): Use check_runtime_nocache. (check_effective_target_dfp): Use check_cached_effective_target. (check_effective_target_dfprt): Likewise. (check_effective_target_arm_neon_hw): Use check_runtime. (check_effective_target_ultrasparc_hw): Likewise. (check_effective_target_c99_runtime): Use check_no_compiler_messages_nocache. From-SVN: r130599
2007-12-04 11:16:17 +01:00
__thread int i;
int f (void) { return i; }
void g (int j) { i = j; }
}]
}
# Return 1 if TLS executables can run correctly, 0 otherwise.
proc check_effective_target_tls_runtime {} {
target-supports.exp (get_compiler_messages): Replace with... gcc/testsuite/ * lib/target-supports.exp (get_compiler_messages): Replace with... (check_compile): ...this new procedure. Handle TYPE == executable. Use comments in the source to determine the correct extension. Return a pair containing the compiler output and the output filename. Don't delete the file here. (check_no_compiler_messages_nocache): New procedure. (check_no_compiler_messages): Use it. (check_no_messages_and_pattern_nocache): New procedure. (check_no_messages_and_pattern): Use it. (check_runtime_nocache, check_runtime): New procedures. (check_effective_target_tls): Use check_no_compiler_messages. (check_effective_target_tls_native): Use check_no_messages_and_pattern. (check_effective_target_tls_runtime): Use check_runtime. (check_effective_target_fstack_protector): Likewise. (check_iconv_available): Use check_runtime_nocache. (check_effective_target_fortran_large_real): Use check_no_compiler_messages. (check_effective_target_fortran_large_int): Likewise. (check_effective_target_static_libgfortran): Likewise. (check_750cl_hw_available): Use check_cached_effective_target and check_runtime_nocache. (check_vmx_hw_available): Likewise. (check_effective_target_broken_cplxf_arg): Likewise. (check_alpha_max_hw_available): Use check_runtime. (check_function_available): Use check_no_compiler_messages. (check_cxa_atexit_available): Use check_cached_effective_target and check_runtime_nocache. (check_effective_target_dfp_nocache): Use check_no_compiler_messages_nocache. (check_effective_target_dfprt_nocache): Use check_runtime_nocache. (check_effective_target_dfp): Use check_cached_effective_target. (check_effective_target_dfprt): Likewise. (check_effective_target_arm_neon_hw): Use check_runtime. (check_effective_target_ultrasparc_hw): Likewise. (check_effective_target_c99_runtime): Use check_no_compiler_messages_nocache. From-SVN: r130599
2007-12-04 11:16:17 +01:00
return [check_runtime tls_runtime {
__thread int thr = 0;
int main (void) { return thr; }
}]
}
backport: configure: Regenerate. 2008-09-02 Sebastian Pop <sebastian.pop@amd.com> Tobias Grosser <grosser@fim.uni-passau.de> Jan Sjodin <jan.sjodin@amd.com> Harsha Jagasia <harsha.jagasia@amd.com> Dwarakanath Rajagopal <dwarak.rajagopal@amd.com> Konrad Trifunovic <konrad.trifunovic@inria.fr> Adrien Eliche <aeliche@isty.uvsq.fr> Merge from graphite branch. * configure: Regenerate. * Makefile.in: Regenerate. * configure.ac (host_libs): Add ppl and cloog. Add checks for PPL and CLooG. * Makefile.def (ppl, cloog): Added modules and dependences. * Makefile.tpl (PPLLIBS, PPLINC, CLOOGLIBS, CLOOGINC): New. (HOST_PPLLIBS, HOST_PPLINC, HOST_CLOOGLIBS, HOST_CLOOGINC): New. gcc/ * graphite.c: New. * graphite.h: New. * tree-loop-linear.c (perfect_loop_nest_depth): Export. * doc/invoke.texi (-floop-block, -floop-interchange, -floop-strip-mine): Document new flags. * tree-into-ssa.c (gimple_vec): Moved... * tree-loop-distribution.c (rdg_component): Moved... * cfgloopmanip.c: Include tree-flow.h. (update_dominators_in_loop): New. (create_empty_if_region_on_edge): New. (create_empty_loop_on_edge): New. (loopify): Use update_dominators_in_loop. * tree-pass.h (pass_graphite_transforms): Declared. * configure: Regenerate. * tree-phinodes.c (make_phi_node): Export. (add_phi_node_to_bb): New, split from create_phi_node. * tree-chrec.c (for_each_scev_op): New. * tree-chrec.h (for_each_scev_op): Declared. * tree-ssa-loop-ivopts.c (get_phi_with_result): New. (remove_statement): Call get_phi_with_result. * config.in (HAVE_cloog): Undef. * gdbinit.in (pgg): New. * timevar.def (TV_GRAPHITE_TRANSFORMS): New. * tree-ssa-loop.c (graphite_transforms): New. (gate_graphite_transforms): New. (pass_graphite_transforms): New. * configure.ac (PPLLIBS, PPLINC, CLOOGLIBS, CLOOGINC, HAVE_cloog): Defined. * tree-vectorizer.c (rename_variables_in_bb): Export. * tree-data-ref.c (dr_may_alias_p): Export. (stmt_simple_memref_p): New. (find_data_references_in_stmt): Export. (find_data_references_in_loop): Export. (create_rdg_edge_for_ddr): Initialize RDGE_RELATION. (create_rdg_edges_for_scalar): Initialize RDGE_RELATION. (create_rdg_vertices): Export. (build_empty_rdg): New. (build_rdg): Call build_empty_rdg. Free dependence_relations. * tree-data-ref.h (rdg_component): ... here. (scop_p): New. (struct data_reference): Add a field scop. (DR_SCOP): New. (find_data_references_in_loop): Declared. (find_data_references_in_stmt): Declared. (create_rdg_vertices): Declared. (dr_may_alias_p): Declared. (stmt_simple_memref_p): Declared. (struct rdg_edge): Add a field ddr_p relation. (build_empty_rdg): Declared. * lambda.h (lambda_matrix): Declare a VEC of. (find_induction_var_from_exit_cond): Declared. (lambda_vector_compare): New. * common.opt (fgraphite, floop-strip-mine, floop-interchange, floop-block): New flags. * lambda-code.c (find_induction_var_from_exit_cond): Export. * cfgloop.c (is_loop_exit): New. * cfgloop.h (is_loop_exit): Declared. (create_empty_if_region_on_edge): Declared. (create_empty_loop_on_edge): Declared. * tree-flow.h (add_phi_node_to_bb): Declared. (make_phi_node): Declared. (rename_variables_in_bb): Declared. (perfect_loop_nest_depth): Declared. (graphite_transform_loops): Declared. * Makefile.in (cfgloopmanip.o): Depend on TREE_FLOW_H. (graphite.o-warn): Add -Wno-error. (PPLLIBS, PPLINC, CLOOGLIBS, CLOOGINC): Declared. (LIBS): Add GMPLIBS, CLOOGLIBS, PPLLIBS. (INCLUDES): Add PPLINC, CLOOGINC. (OBJS-common): Add graphite.o. (graphite.o): Add rule. * gimple.h (gimple_vec): ... here. * tree-cfg.c (print_loops): Start printing at ENTRY_BLOCK_PTR. * passes.c (init_optimization_passes): Schedule pass_graphite_transforms. testsuite/ * gcc.dg/graphite/scop-{0,1,2,3,4,5,6,7,8,9, 10,11,12,13,14,15,16,17,18}.c: New. * gcc.dg/graphite/graphite.exp: New. * gcc.dg/graphite/scop-matmult.c: New. * gcc.dg/graphite/block-0.c: New. * lib/target-supports.exp (check_effective_target_fgraphite): New. * gfortran.dg/graphite/block-1.f90: New. * gfortran.dg/graphite/scop-{1,2}.f: New. * gfortran.dg/graphite/block-{1,3,4}.f90: New. * gfortran.dg/graphite/graphite.exp: New. Co-Authored-By: Adrien Eliche <aeliche@isty.uvsq.fr> Co-Authored-By: Dwarakanath Rajagopal <dwarak.rajagopal@amd.com> Co-Authored-By: Harsha Jagasia <harsha.jagasia@amd.com> Co-Authored-By: Jan Sjodin <jan.sjodin@amd.com> Co-Authored-By: Konrad Trifunovic <konrad.trifunovic@inria.fr> Co-Authored-By: Tobias Grosser <grosser@fim.uni-passau.de> From-SVN: r139893
2008-09-02 18:31:04 +02:00
# Return 1 if compilation with -fgraphite is error-free for trivial
# code, 0 otherwise.
proc check_effective_target_fgraphite {} {
return [check_no_compiler_messages fgraphite object {
void foo (void) { }
} "-O1 -fgraphite"]
backport: configure: Regenerate. 2008-09-02 Sebastian Pop <sebastian.pop@amd.com> Tobias Grosser <grosser@fim.uni-passau.de> Jan Sjodin <jan.sjodin@amd.com> Harsha Jagasia <harsha.jagasia@amd.com> Dwarakanath Rajagopal <dwarak.rajagopal@amd.com> Konrad Trifunovic <konrad.trifunovic@inria.fr> Adrien Eliche <aeliche@isty.uvsq.fr> Merge from graphite branch. * configure: Regenerate. * Makefile.in: Regenerate. * configure.ac (host_libs): Add ppl and cloog. Add checks for PPL and CLooG. * Makefile.def (ppl, cloog): Added modules and dependences. * Makefile.tpl (PPLLIBS, PPLINC, CLOOGLIBS, CLOOGINC): New. (HOST_PPLLIBS, HOST_PPLINC, HOST_CLOOGLIBS, HOST_CLOOGINC): New. gcc/ * graphite.c: New. * graphite.h: New. * tree-loop-linear.c (perfect_loop_nest_depth): Export. * doc/invoke.texi (-floop-block, -floop-interchange, -floop-strip-mine): Document new flags. * tree-into-ssa.c (gimple_vec): Moved... * tree-loop-distribution.c (rdg_component): Moved... * cfgloopmanip.c: Include tree-flow.h. (update_dominators_in_loop): New. (create_empty_if_region_on_edge): New. (create_empty_loop_on_edge): New. (loopify): Use update_dominators_in_loop. * tree-pass.h (pass_graphite_transforms): Declared. * configure: Regenerate. * tree-phinodes.c (make_phi_node): Export. (add_phi_node_to_bb): New, split from create_phi_node. * tree-chrec.c (for_each_scev_op): New. * tree-chrec.h (for_each_scev_op): Declared. * tree-ssa-loop-ivopts.c (get_phi_with_result): New. (remove_statement): Call get_phi_with_result. * config.in (HAVE_cloog): Undef. * gdbinit.in (pgg): New. * timevar.def (TV_GRAPHITE_TRANSFORMS): New. * tree-ssa-loop.c (graphite_transforms): New. (gate_graphite_transforms): New. (pass_graphite_transforms): New. * configure.ac (PPLLIBS, PPLINC, CLOOGLIBS, CLOOGINC, HAVE_cloog): Defined. * tree-vectorizer.c (rename_variables_in_bb): Export. * tree-data-ref.c (dr_may_alias_p): Export. (stmt_simple_memref_p): New. (find_data_references_in_stmt): Export. (find_data_references_in_loop): Export. (create_rdg_edge_for_ddr): Initialize RDGE_RELATION. (create_rdg_edges_for_scalar): Initialize RDGE_RELATION. (create_rdg_vertices): Export. (build_empty_rdg): New. (build_rdg): Call build_empty_rdg. Free dependence_relations. * tree-data-ref.h (rdg_component): ... here. (scop_p): New. (struct data_reference): Add a field scop. (DR_SCOP): New. (find_data_references_in_loop): Declared. (find_data_references_in_stmt): Declared. (create_rdg_vertices): Declared. (dr_may_alias_p): Declared. (stmt_simple_memref_p): Declared. (struct rdg_edge): Add a field ddr_p relation. (build_empty_rdg): Declared. * lambda.h (lambda_matrix): Declare a VEC of. (find_induction_var_from_exit_cond): Declared. (lambda_vector_compare): New. * common.opt (fgraphite, floop-strip-mine, floop-interchange, floop-block): New flags. * lambda-code.c (find_induction_var_from_exit_cond): Export. * cfgloop.c (is_loop_exit): New. * cfgloop.h (is_loop_exit): Declared. (create_empty_if_region_on_edge): Declared. (create_empty_loop_on_edge): Declared. * tree-flow.h (add_phi_node_to_bb): Declared. (make_phi_node): Declared. (rename_variables_in_bb): Declared. (perfect_loop_nest_depth): Declared. (graphite_transform_loops): Declared. * Makefile.in (cfgloopmanip.o): Depend on TREE_FLOW_H. (graphite.o-warn): Add -Wno-error. (PPLLIBS, PPLINC, CLOOGLIBS, CLOOGINC): Declared. (LIBS): Add GMPLIBS, CLOOGLIBS, PPLLIBS. (INCLUDES): Add PPLINC, CLOOGINC. (OBJS-common): Add graphite.o. (graphite.o): Add rule. * gimple.h (gimple_vec): ... here. * tree-cfg.c (print_loops): Start printing at ENTRY_BLOCK_PTR. * passes.c (init_optimization_passes): Schedule pass_graphite_transforms. testsuite/ * gcc.dg/graphite/scop-{0,1,2,3,4,5,6,7,8,9, 10,11,12,13,14,15,16,17,18}.c: New. * gcc.dg/graphite/graphite.exp: New. * gcc.dg/graphite/scop-matmult.c: New. * gcc.dg/graphite/block-0.c: New. * lib/target-supports.exp (check_effective_target_fgraphite): New. * gfortran.dg/graphite/block-1.f90: New. * gfortran.dg/graphite/scop-{1,2}.f: New. * gfortran.dg/graphite/block-{1,3,4}.f90: New. * gfortran.dg/graphite/graphite.exp: New. Co-Authored-By: Adrien Eliche <aeliche@isty.uvsq.fr> Co-Authored-By: Dwarakanath Rajagopal <dwarak.rajagopal@amd.com> Co-Authored-By: Harsha Jagasia <harsha.jagasia@amd.com> Co-Authored-By: Jan Sjodin <jan.sjodin@amd.com> Co-Authored-By: Konrad Trifunovic <konrad.trifunovic@inria.fr> Co-Authored-By: Tobias Grosser <grosser@fim.uni-passau.de> From-SVN: r139893
2008-09-02 18:31:04 +02:00
}
# Return 1 if compilation with -fopenmp is error-free for trivial
# code, 0 otherwise.
proc check_effective_target_fopenmp {} {
return [check_no_compiler_messages fopenmp object {
void foo (void) { }
} "-fopenmp"]
}
# Return 1 if compilation with -pthread is error-free for trivial
# code, 0 otherwise.
proc check_effective_target_pthread {} {
return [check_no_compiler_messages pthread object {
void foo (void) { }
} "-pthread"]
}
# Return 1 if compilation with -mpe-aligned-commons is error-free
# for trivial code, 0 otherwise.
proc check_effective_target_pe_aligned_commons {} {
if { [istarget *-*-cygwin*] || [istarget *-*-mingw*] } {
return [check_no_compiler_messages pe_aligned_commons object {
int foo;
} "-mpe-aligned-commons"]
}
return 0
}
# Return 1 if the target supports -fstack-protector
proc check_effective_target_fstack_protector {} {
target-supports.exp (get_compiler_messages): Replace with... gcc/testsuite/ * lib/target-supports.exp (get_compiler_messages): Replace with... (check_compile): ...this new procedure. Handle TYPE == executable. Use comments in the source to determine the correct extension. Return a pair containing the compiler output and the output filename. Don't delete the file here. (check_no_compiler_messages_nocache): New procedure. (check_no_compiler_messages): Use it. (check_no_messages_and_pattern_nocache): New procedure. (check_no_messages_and_pattern): Use it. (check_runtime_nocache, check_runtime): New procedures. (check_effective_target_tls): Use check_no_compiler_messages. (check_effective_target_tls_native): Use check_no_messages_and_pattern. (check_effective_target_tls_runtime): Use check_runtime. (check_effective_target_fstack_protector): Likewise. (check_iconv_available): Use check_runtime_nocache. (check_effective_target_fortran_large_real): Use check_no_compiler_messages. (check_effective_target_fortran_large_int): Likewise. (check_effective_target_static_libgfortran): Likewise. (check_750cl_hw_available): Use check_cached_effective_target and check_runtime_nocache. (check_vmx_hw_available): Likewise. (check_effective_target_broken_cplxf_arg): Likewise. (check_alpha_max_hw_available): Use check_runtime. (check_function_available): Use check_no_compiler_messages. (check_cxa_atexit_available): Use check_cached_effective_target and check_runtime_nocache. (check_effective_target_dfp_nocache): Use check_no_compiler_messages_nocache. (check_effective_target_dfprt_nocache): Use check_runtime_nocache. (check_effective_target_dfp): Use check_cached_effective_target. (check_effective_target_dfprt): Likewise. (check_effective_target_arm_neon_hw): Use check_runtime. (check_effective_target_ultrasparc_hw): Likewise. (check_effective_target_c99_runtime): Use check_no_compiler_messages_nocache. From-SVN: r130599
2007-12-04 11:16:17 +01:00
return [check_runtime fstack_protector {
int main (void) { return 0; }
} "-fstack-protector"]
}
# Return 1 if compilation with -freorder-blocks-and-partition is error-free
# for trivial code, 0 otherwise.
proc check_effective_target_freorder {} {
return [check_no_compiler_messages freorder object {
void foo (void) { }
} "-freorder-blocks-and-partition"]
}
# Return 1 if -fpic and -fPIC are supported, as in no warnings or errors
# emitted, 0 otherwise. Whether a shared library can actually be built is
# out of scope for this test.
proc check_effective_target_fpic { } {
# Note that M68K has a multilib that supports -fpic but not
# -fPIC, so we need to check both. We test with a program that
# requires GOT references.
foreach arg {fpic fPIC} {
if [check_no_compiler_messages $arg object {
extern int foo (void); extern int bar;
int baz (void) { return foo () + bar; }
} "-$arg"] {
return 1
}
}
return 0
}
# Return true if the target supports -mpaired-single (as used on MIPS).
proc check_effective_target_mpaired_single { } {
return [check_no_compiler_messages mpaired_single object {
void foo (void) { }
} "-mpaired-single"]
}
# Return true if the target has access to FPU instructions.
proc check_effective_target_hard_float { } {
if { [istarget mips*-*-*] } {
return [check_no_compiler_messages hard_float assembly {
#if (defined __mips_soft_float || defined __mips16)
#error FOO
#endif
}]
}
# The generic test equates hard_float with "no call for adding doubles".
return [check_no_messages_and_pattern hard_float "!\\(call" rtl-expand {
double a (double b, double c) { return b + c; }
}]
}
# Return true if the target is a 64-bit MIPS target.
proc check_effective_target_mips64 { } {
return [check_no_compiler_messages mips64 assembly {
#ifndef __mips64
#error FOO
#endif
}]
}
mips.h (ISA_HAS_DSP, [...]): New macros. gcc/ * config/mips/mips.h (ISA_HAS_DSP, ISA_HAS_DSPR2): New macros. * config/mips/mips.c (mips_set_mips16_mode): Don't clear the DSP flags for MIPS16. (override_options): Check TARGET_HARD_FLOAT_ABI instead of TARGET_HARD_FLOAT when testing whether -mpaired-single is supported. (mips_conditional_register_usage): Check ISA_HAS_DSP instead of TARGET_DSP. * config/mips/constraints.md (ka): Check ISA_HAS_DSPR2 instead of TARGET_DSPR2. * config/mips/mips.md (ANYF): Require TARGET_HARD_FLOAT for V2SF. (mulv2sf3, movv2sf, movv2sf_hardfloat_64bit): Require TARGET_HARD_FLOAT. (<u>mulsidi3_32bit_internal, <u>msubsidi4, <u>maddsidi4): Check ISA_HAS_DSPR2 instead of TARGET_HAS_DSPR2. * config/mips/mips-dsp.md: Use ISA_HAS_DSP instead of TARGET_HAS_DSP throughout. * config/mips/mips-dspr2.md: Likewise ISA_HAS_DSPR2 and TARGET_HAS_DSPR2. * config/mips/mips-fixed.md: Use ISA_HAS_DSP and ISA_HAS_DSPR2 instead of TARGET_HAS_DSP and TARGET_HAS_DSPR2. * config/mips/mips-ps-3d.md: Add TARGET_HARD_FLOAT to V2SF patterns. gcc/testsuite/ * lib/target-supports.exp (check_effective_target_nomips16): New procedure. * lib/fortran-torture.exp: Check nomips16 as well as mpaired_single for mipsisa64*-*-*. * gcc.dg/vect/vect.exp: Likewise. * g++.dg/vect/vect.exp: Likewise. * gcc.target/mips/mips.exp (setup_mips_tests): Don't set mips_mips16. (dg-mips-options): Don't skip -march* and -mips* tests for -mips16. * gcc.target/mips/branch-cost-1.c (foo): Add NOMIPS16. * gcc.target/mips/branch-cost-2.c (foo): Likewise. * gcc.target/mips/clear-cache-1.c (f): Likewise. * gcc.target/mips/dpaq_sa_l_w.c (f1, f2, f3): Likewise. * gcc.target/mips/dpsq_sa_l_w.c (f1, f2, f3): Likewise. * gcc.target/mips/fix-vr4130-1.c (foo): Likewise. * gcc.target/mips/fix-vr4130-2.c (foo): Likewise. * gcc.target/mips/fix-vr4130-3.c (foo): Likewise. * gcc.target/mips/fix-vr4130-4.c (foo): Likewise. * gcc.target/mips/fixed-scalar-type.c (test1, test2, test3, test4) (test5, test6, test7, test8, test9, test10, test11, test12, test13) (test14, test15, test16, test17, test18): Likewise. * gcc.target/mips/fixed-vector-type.c (test1, test2, test3, test4) (test5, test6, test7, test8, test9, test10, test11, test12, test13) (test14, test15, test16, test17, test18, test19, test20, test21) (test22): Likewise. * gcc.target/mips/madd-1.c (f1, f2, f3): Likewise. * gcc.target/mips/madd-2.c (f1, f2, f3): Likewise. * gcc.target/mips/madd-4.c (f1, f2, f3): Likewise. * gcc.target/mips/maddu-1.c (f1, f2, f3): Likewise. * gcc.target/mips/maddu-2.c (f1, f2, f3): Likewise. * gcc.target/mips/maddu-4.c (f1, f2, f3): Likewise. * gcc.target/mips/mips-3d-1.c (main): Likewise. * gcc.target/mips/mips-3d-2.c (main, test0, test1, test2, test3) (test4, test5, test6, test7, test8, test9, test10, test11, test12) (test13, test14, test15, test16, test17, test18, test19, test20) (test21, test22, test23, test24, test25, test26, test27, test28) (test29, test30, test31): Likewise. * gcc.target/mips/mips-3d-3.c (main, test0, test1, test2, test3) (test4, test5, test6, test7, test8, test9, test10, test11, test12) (test13, test14, test15, test16, test17, test18, test19, test20) (test21, test22, test23, test24, test25, test26, test27, test28) (test29, test30, test31, test32, test33, test34, test35, test36) (test37, test38, test39, test40, test41, test42, test43, test44) (test45, test46, test47, test48, test49, test50, test51, test52) (test53, test54, test55, test56, test57, test58, test59, test60) (test61, test62, test63): Likewise. * gcc.target/mips/mips-3d-4.c (main, test0, test1, test2, test3) (test4, test5, test6, test7, test8, test9, test10, test11, test12) (test13, test14, test15, test16, test17, test18, test19, test20) (test21, test22, test23, test24, test25, test26, test27, test28) (test29, test30, test31): Likewise. * gcc.target/mips/mips-3d-5.c (main, test0, test1, test2, test3) (test4, test5, test6, test7, test8, test9, test10, test11, test12) (test13, test14, test15, test16, test17, test18, test19, test20) (test21, test22, test23, test24, test25, test26, test27, test28) (test29, test30, test31): Likewise. * gcc.target/mips/mips-3d-6.c (main, test0, test1, test2, test3) (test4, test5, test6, test7, test8, test9, test10, test11, test12) (test13, test14, test15): Likewise. * gcc.target/mips/mips-3d-7.c (main, test0, test1, test2, test3) (test4, test5, test6, test7, test8, test9, test10, test11, test12) (test13, test14, test15): Likewise. * gcc.target/mips/mips-3d-8.c (main, test0, test1, test2, test3) (test4, test5, test6, test7, test8, test9, test10, test11, test12) (test13, test14, test15, test16, test17, test18, test19, test20) (test21, test22, test23, test24, test25, test26, test27, test28) (test29, test30, test31): Likewise. * gcc.target/mips/mips-3d-9.c (matrix_multiply2, matrix_multiply3) (matrix_multiply4: Likewise. * gcc.target/mips/mips-ps-1.c (main): Likewise. * gcc.target/mips/mips-ps-2.c (main): Likewise. * gcc.target/mips/mips-ps-3.c (main): Likewise. * gcc.target/mips/mips-ps-4.c (main, test0, test1, test2, test3) (test4, test5, test6, test7, test8, test9, test10, test11, test12) (test13, test14, test15, test16, test17, test18, test19, test20) (test21, test22, test23, test24, test25, test26, test27, test28) (test29, test30, test31): Likewise. * gcc.target/mips/mips-ps-5.c (main, test0, test1, test2, test3) (test4, test5, test6, test7, test8, test9, test10, test11, test12) (test13, test14, test15, test16, test17, test18, test19, test20) (test21, test22, test23, test24, test25, test26, test27, test28) (test29, test30, test31): Likewise. * gcc.target/mips/mips-ps-5.c (main): Likewise. * gcc.target/mips/mips-ps-6.c (main): Likewise. * gcc.target/mips/mips-ps-type.c (init, move, load, store, add, sub) (neg, mul, madd, msub, nmadd, nmsub, cond_move1, cond_move2): Likewise. * gcc.target/mips/mips32-dsp-type.c (add_v2hi,add_v4qi, sub_v2hi) (sub_v4qi): Likewise. * gcc.target/mips/mips32-dsp.c (test_MIPS_DSP, add_v2q15, add_v4i8) (sub_v2q15, sub_v4i8, test_MIPS_DSP): Likewise. * gcc.target/mips/movcc-1.c (sub1, sub2): Likewise. * gcc.target/mips/movcc-2.c (sub4, sub5): Likewise. * gcc.target/mips/movcc-3.c (sub3, sub6, sub7, sub8, sub9, suba) (subb, subc): Likewise. * gcc.target/mips/msub-1.c (f1, f2): Likewise. * gcc.target/mips/msub-2.c (f1, f2): Likewise. * gcc.target/mips/msub-4.c (f1, f2): Likewise. * gcc.target/mips/msubu-1.c (f1, f2): Likewise. * gcc.target/mips/msubu-2.c (f1, f2): Likewise. * gcc.target/mips/msubu-4.c (f1, f2): Likewise. * gcc.target/mips/nmadd-1.c (sub1, sub2, sub3, sub4): Likewise. * gcc.target/mips/nmadd-2.c (sub1, sub2, sub3, sub4): Likewise. * gcc.target/mips/rsqrt-1.c (foo, bar): Likewise. * gcc.target/mips/rsqrt-2.c (foo, bar): Likewise. * gcc.target/mips/sb1-1.c (divide, recip, squareroot, rsqrt): Likewise. * gcc.target/mips/vr-mult-1.c (f1, f2): Likewise. * gcc.target/mips/vr-mult-2.c (f1, f2): Likewise. From-SVN: r128683
2007-09-23 11:24:21 +02:00
# Return true if the target is a MIPS target that does not produce
# MIPS16 code.
proc check_effective_target_nomips16 { } {
return [check_no_compiler_messages nomips16 object {
#ifndef __mips
#error FOO
#else
/* A cheap way of testing for -mflip-mips16. */
void foo (void) { asm ("addiu $20,$20,1"); }
void bar (void) { asm ("addiu $20,$20,1"); }
#endif
}]
}
sourcebuild.texi: Document dg-add-options mips16_attribute. gcc/ * doc/sourcebuild.texi: Document dg-add-options mips16_attribute. gcc/testsuite/ * lib/target-supports.exp (add_options_for_mips16_attribute) (check_effective_target_mips16_attribute): New functions. * gcc.target/mips/mips.exp: Define MIPS16 and NOMIPS16 on the command line. (dg-mips-options) Remove -mno-mips16 handling. Add options to extra_test_flags. * gcc.target/mips/asm-1.c (NOMIPS16): Delete. * gcc.target/mips/atomic-memory-1.c (NOMIPS16): Likewise. * gcc.target/mips/atomic-memory-2.c (NOMIPS16): Likewise. * gcc.target/mips/branch-1.c (NOMIPS16): Likewise. * gcc.target/mips/dspr2-MULT.c (NOMIPS16): Likewise. * gcc.target/mips/dspr2-MULTU.c (NOMIPS16): Likewise. * gcc.target/mips/fpcmp-1.c (NOMIPS16): Likewise. * gcc.target/mips/fpcmp-2.c (NOMIPS16): Likewise. * gcc.target/mips/ins-1.c (NOMIPS16): Likewise. * gcc.target/mips/madd-3.c (NOMIPS16): Likewise. * gcc.target/mips/maddu-3.c (NOMIPS16): Likewise. * gcc.target/mips/mips32-dsp-run.c (NOMIPS16): Likewise. * gcc.target/mips/mips32-dspr2-type.c (NOMIPS16): Likewise. * gcc.target/mips/msub-3.c (NOMIPS16): Likewise. * gcc.target/mips/msubu-3.c (NOMIPS16): Likewise. * gcc.target/mips/near-far-3.c (NOMIPS16): Likewise. * gcc.target/mips/near-far-4.c (NOMIPS16): Likewise. * gcc.target/mips/neg-abs-1.c (NOMIPS16): Likewise. * gcc.target/mips/smartmips-lwxs.c (NOMIPS16): Likewise. * gcc.target/mips/smartmips-ror-1.c (NOMIPS16): Likewise. * gcc.target/mips/smartmips-ror-2.c (NOMIPS16): Likewise. * gcc.target/mips/smartmips-ror-3.c (NOMIPS16): Likewise. * gcc.target/mips/smartmips-ror-4.c (NOMIPS16): Likewise. * gcc.target/mips/pr26765.c: Use dg-mips-options instead of dg-options. (NOMIPS16): Delete. * gcc.target/mips/20020620-1.c: Use dg-mips-options instead of dg-options. * gcc.target/mips/call-saved-1.c: Remove -mips16 and -mno-abicalls options. Require { target mips16_attribute } and use dg-add-options to add the associated options. (foo): Use MIPS16. * gcc.target/mips/call-saved-2.c: As for call-saved-1.c. * gcc.target/mips/call-saved-3.c: Likewise. * gcc.target/mips/code-readable-1.c: Require { target mips16_attribute } and use dg-add-options to add the associated options. Remove trailing whitespace. (NOMIPS16): Delete. * gcc.target/mips/code-readable-2.c: Likewise. * gcc.target/mips/code-readable-3.c: Likewise. * gcc.target/mips/mips16-attributes-2.c: Likewise. * gcc.target/mips/mips16e-extends.c: Remove -mips16 option. Require { target mips16_attribute } and use dg-add-options to add the associated options. (cksum16, cksum8): Use MIPS16. * gcc.target/mips/save-restore-1.c: Remove -mips16 option. Require { target mips16_attribute } and use dg-add-options to add the associated options. (foo): Use MIPS16. * gcc.target/mips/save-restore-2.c: Likewise. * gcc.target/mips/save-restore-3.c: Likewise. * gcc.target/mips/save-restore-4.c: Likewise. * gcc.target/mips/save-restore-5.c: Likewise. Also remove -mno-abicalls. * gcc.target/mips/mips-sched-madd.c: Remove -mno-mips16. (foo): Use NOMIPS16. From-SVN: r128674
2007-09-22 22:10:52 +02:00
# Add the options needed for MIPS16 function attributes. At the moment,
# we don't support MIPS16 PIC.
proc add_options_for_mips16_attribute { flags } {
return "$flags -mno-abicalls -fno-pic -DMIPS16=__attribute__((mips16))"
sourcebuild.texi: Document dg-add-options mips16_attribute. gcc/ * doc/sourcebuild.texi: Document dg-add-options mips16_attribute. gcc/testsuite/ * lib/target-supports.exp (add_options_for_mips16_attribute) (check_effective_target_mips16_attribute): New functions. * gcc.target/mips/mips.exp: Define MIPS16 and NOMIPS16 on the command line. (dg-mips-options) Remove -mno-mips16 handling. Add options to extra_test_flags. * gcc.target/mips/asm-1.c (NOMIPS16): Delete. * gcc.target/mips/atomic-memory-1.c (NOMIPS16): Likewise. * gcc.target/mips/atomic-memory-2.c (NOMIPS16): Likewise. * gcc.target/mips/branch-1.c (NOMIPS16): Likewise. * gcc.target/mips/dspr2-MULT.c (NOMIPS16): Likewise. * gcc.target/mips/dspr2-MULTU.c (NOMIPS16): Likewise. * gcc.target/mips/fpcmp-1.c (NOMIPS16): Likewise. * gcc.target/mips/fpcmp-2.c (NOMIPS16): Likewise. * gcc.target/mips/ins-1.c (NOMIPS16): Likewise. * gcc.target/mips/madd-3.c (NOMIPS16): Likewise. * gcc.target/mips/maddu-3.c (NOMIPS16): Likewise. * gcc.target/mips/mips32-dsp-run.c (NOMIPS16): Likewise. * gcc.target/mips/mips32-dspr2-type.c (NOMIPS16): Likewise. * gcc.target/mips/msub-3.c (NOMIPS16): Likewise. * gcc.target/mips/msubu-3.c (NOMIPS16): Likewise. * gcc.target/mips/near-far-3.c (NOMIPS16): Likewise. * gcc.target/mips/near-far-4.c (NOMIPS16): Likewise. * gcc.target/mips/neg-abs-1.c (NOMIPS16): Likewise. * gcc.target/mips/smartmips-lwxs.c (NOMIPS16): Likewise. * gcc.target/mips/smartmips-ror-1.c (NOMIPS16): Likewise. * gcc.target/mips/smartmips-ror-2.c (NOMIPS16): Likewise. * gcc.target/mips/smartmips-ror-3.c (NOMIPS16): Likewise. * gcc.target/mips/smartmips-ror-4.c (NOMIPS16): Likewise. * gcc.target/mips/pr26765.c: Use dg-mips-options instead of dg-options. (NOMIPS16): Delete. * gcc.target/mips/20020620-1.c: Use dg-mips-options instead of dg-options. * gcc.target/mips/call-saved-1.c: Remove -mips16 and -mno-abicalls options. Require { target mips16_attribute } and use dg-add-options to add the associated options. (foo): Use MIPS16. * gcc.target/mips/call-saved-2.c: As for call-saved-1.c. * gcc.target/mips/call-saved-3.c: Likewise. * gcc.target/mips/code-readable-1.c: Require { target mips16_attribute } and use dg-add-options to add the associated options. Remove trailing whitespace. (NOMIPS16): Delete. * gcc.target/mips/code-readable-2.c: Likewise. * gcc.target/mips/code-readable-3.c: Likewise. * gcc.target/mips/mips16-attributes-2.c: Likewise. * gcc.target/mips/mips16e-extends.c: Remove -mips16 option. Require { target mips16_attribute } and use dg-add-options to add the associated options. (cksum16, cksum8): Use MIPS16. * gcc.target/mips/save-restore-1.c: Remove -mips16 option. Require { target mips16_attribute } and use dg-add-options to add the associated options. (foo): Use MIPS16. * gcc.target/mips/save-restore-2.c: Likewise. * gcc.target/mips/save-restore-3.c: Likewise. * gcc.target/mips/save-restore-4.c: Likewise. * gcc.target/mips/save-restore-5.c: Likewise. Also remove -mno-abicalls. * gcc.target/mips/mips-sched-madd.c: Remove -mno-mips16. (foo): Use NOMIPS16. From-SVN: r128674
2007-09-22 22:10:52 +02:00
}
# Return true if we can force a mode that allows MIPS16 code generation.
# We don't support MIPS16 PIC, and only support MIPS16 -mhard-float
# for o32 and o64.
sourcebuild.texi: Document dg-add-options mips16_attribute. gcc/ * doc/sourcebuild.texi: Document dg-add-options mips16_attribute. gcc/testsuite/ * lib/target-supports.exp (add_options_for_mips16_attribute) (check_effective_target_mips16_attribute): New functions. * gcc.target/mips/mips.exp: Define MIPS16 and NOMIPS16 on the command line. (dg-mips-options) Remove -mno-mips16 handling. Add options to extra_test_flags. * gcc.target/mips/asm-1.c (NOMIPS16): Delete. * gcc.target/mips/atomic-memory-1.c (NOMIPS16): Likewise. * gcc.target/mips/atomic-memory-2.c (NOMIPS16): Likewise. * gcc.target/mips/branch-1.c (NOMIPS16): Likewise. * gcc.target/mips/dspr2-MULT.c (NOMIPS16): Likewise. * gcc.target/mips/dspr2-MULTU.c (NOMIPS16): Likewise. * gcc.target/mips/fpcmp-1.c (NOMIPS16): Likewise. * gcc.target/mips/fpcmp-2.c (NOMIPS16): Likewise. * gcc.target/mips/ins-1.c (NOMIPS16): Likewise. * gcc.target/mips/madd-3.c (NOMIPS16): Likewise. * gcc.target/mips/maddu-3.c (NOMIPS16): Likewise. * gcc.target/mips/mips32-dsp-run.c (NOMIPS16): Likewise. * gcc.target/mips/mips32-dspr2-type.c (NOMIPS16): Likewise. * gcc.target/mips/msub-3.c (NOMIPS16): Likewise. * gcc.target/mips/msubu-3.c (NOMIPS16): Likewise. * gcc.target/mips/near-far-3.c (NOMIPS16): Likewise. * gcc.target/mips/near-far-4.c (NOMIPS16): Likewise. * gcc.target/mips/neg-abs-1.c (NOMIPS16): Likewise. * gcc.target/mips/smartmips-lwxs.c (NOMIPS16): Likewise. * gcc.target/mips/smartmips-ror-1.c (NOMIPS16): Likewise. * gcc.target/mips/smartmips-ror-2.c (NOMIPS16): Likewise. * gcc.target/mips/smartmips-ror-3.c (NOMIPS16): Likewise. * gcc.target/mips/smartmips-ror-4.c (NOMIPS16): Likewise. * gcc.target/mips/pr26765.c: Use dg-mips-options instead of dg-options. (NOMIPS16): Delete. * gcc.target/mips/20020620-1.c: Use dg-mips-options instead of dg-options. * gcc.target/mips/call-saved-1.c: Remove -mips16 and -mno-abicalls options. Require { target mips16_attribute } and use dg-add-options to add the associated options. (foo): Use MIPS16. * gcc.target/mips/call-saved-2.c: As for call-saved-1.c. * gcc.target/mips/call-saved-3.c: Likewise. * gcc.target/mips/code-readable-1.c: Require { target mips16_attribute } and use dg-add-options to add the associated options. Remove trailing whitespace. (NOMIPS16): Delete. * gcc.target/mips/code-readable-2.c: Likewise. * gcc.target/mips/code-readable-3.c: Likewise. * gcc.target/mips/mips16-attributes-2.c: Likewise. * gcc.target/mips/mips16e-extends.c: Remove -mips16 option. Require { target mips16_attribute } and use dg-add-options to add the associated options. (cksum16, cksum8): Use MIPS16. * gcc.target/mips/save-restore-1.c: Remove -mips16 option. Require { target mips16_attribute } and use dg-add-options to add the associated options. (foo): Use MIPS16. * gcc.target/mips/save-restore-2.c: Likewise. * gcc.target/mips/save-restore-3.c: Likewise. * gcc.target/mips/save-restore-4.c: Likewise. * gcc.target/mips/save-restore-5.c: Likewise. Also remove -mno-abicalls. * gcc.target/mips/mips-sched-madd.c: Remove -mno-mips16. (foo): Use NOMIPS16. From-SVN: r128674
2007-09-22 22:10:52 +02:00
proc check_effective_target_mips16_attribute { } {
return [check_no_compiler_messages mips16_attribute assembly {
#ifdef PIC
#error FOO
#endif
#if defined __mips_hard_float \
&& (!defined _ABIO32 || _MIPS_SIM != _ABIO32) \
&& (!defined _ABIO64 || _MIPS_SIM != _ABIO64)
sourcebuild.texi: Document dg-add-options mips16_attribute. gcc/ * doc/sourcebuild.texi: Document dg-add-options mips16_attribute. gcc/testsuite/ * lib/target-supports.exp (add_options_for_mips16_attribute) (check_effective_target_mips16_attribute): New functions. * gcc.target/mips/mips.exp: Define MIPS16 and NOMIPS16 on the command line. (dg-mips-options) Remove -mno-mips16 handling. Add options to extra_test_flags. * gcc.target/mips/asm-1.c (NOMIPS16): Delete. * gcc.target/mips/atomic-memory-1.c (NOMIPS16): Likewise. * gcc.target/mips/atomic-memory-2.c (NOMIPS16): Likewise. * gcc.target/mips/branch-1.c (NOMIPS16): Likewise. * gcc.target/mips/dspr2-MULT.c (NOMIPS16): Likewise. * gcc.target/mips/dspr2-MULTU.c (NOMIPS16): Likewise. * gcc.target/mips/fpcmp-1.c (NOMIPS16): Likewise. * gcc.target/mips/fpcmp-2.c (NOMIPS16): Likewise. * gcc.target/mips/ins-1.c (NOMIPS16): Likewise. * gcc.target/mips/madd-3.c (NOMIPS16): Likewise. * gcc.target/mips/maddu-3.c (NOMIPS16): Likewise. * gcc.target/mips/mips32-dsp-run.c (NOMIPS16): Likewise. * gcc.target/mips/mips32-dspr2-type.c (NOMIPS16): Likewise. * gcc.target/mips/msub-3.c (NOMIPS16): Likewise. * gcc.target/mips/msubu-3.c (NOMIPS16): Likewise. * gcc.target/mips/near-far-3.c (NOMIPS16): Likewise. * gcc.target/mips/near-far-4.c (NOMIPS16): Likewise. * gcc.target/mips/neg-abs-1.c (NOMIPS16): Likewise. * gcc.target/mips/smartmips-lwxs.c (NOMIPS16): Likewise. * gcc.target/mips/smartmips-ror-1.c (NOMIPS16): Likewise. * gcc.target/mips/smartmips-ror-2.c (NOMIPS16): Likewise. * gcc.target/mips/smartmips-ror-3.c (NOMIPS16): Likewise. * gcc.target/mips/smartmips-ror-4.c (NOMIPS16): Likewise. * gcc.target/mips/pr26765.c: Use dg-mips-options instead of dg-options. (NOMIPS16): Delete. * gcc.target/mips/20020620-1.c: Use dg-mips-options instead of dg-options. * gcc.target/mips/call-saved-1.c: Remove -mips16 and -mno-abicalls options. Require { target mips16_attribute } and use dg-add-options to add the associated options. (foo): Use MIPS16. * gcc.target/mips/call-saved-2.c: As for call-saved-1.c. * gcc.target/mips/call-saved-3.c: Likewise. * gcc.target/mips/code-readable-1.c: Require { target mips16_attribute } and use dg-add-options to add the associated options. Remove trailing whitespace. (NOMIPS16): Delete. * gcc.target/mips/code-readable-2.c: Likewise. * gcc.target/mips/code-readable-3.c: Likewise. * gcc.target/mips/mips16-attributes-2.c: Likewise. * gcc.target/mips/mips16e-extends.c: Remove -mips16 option. Require { target mips16_attribute } and use dg-add-options to add the associated options. (cksum16, cksum8): Use MIPS16. * gcc.target/mips/save-restore-1.c: Remove -mips16 option. Require { target mips16_attribute } and use dg-add-options to add the associated options. (foo): Use MIPS16. * gcc.target/mips/save-restore-2.c: Likewise. * gcc.target/mips/save-restore-3.c: Likewise. * gcc.target/mips/save-restore-4.c: Likewise. * gcc.target/mips/save-restore-5.c: Likewise. Also remove -mno-abicalls. * gcc.target/mips/mips-sched-madd.c: Remove -mno-mips16. (foo): Use NOMIPS16. From-SVN: r128674
2007-09-22 22:10:52 +02:00
#error FOO
#endif
} [add_options_for_mips16_attribute ""]]
}
# Return 1 if the current multilib does not generate PIC by default.
proc check_effective_target_nonpic { } {
return [check_no_compiler_messages nonpic assembly {
#if __PIC__
#error FOO
#endif
}]
}
# Return 1 if the target does not use a status wrapper.
proc check_effective_target_unwrapped { } {
if { [target_info needs_status_wrapper] != "" \
&& [target_info needs_status_wrapper] != "0" } {
return 0
}
return 1
}
# Return true if iconv is supported on the target. In particular IBM1047.
target-supports.exp (check-iconv-available): New function. 2004-02-26 Eric Christopher <echristo@redhat.com> * lib/target-supports.exp (check-iconv-available): New function. * lib/gcc-dg.exp (dg-require-iconv): New function. Use above. * gcc.dg/charset: New directory. * gcc.dg/charset/charset.exp: New file. * gcc.dg/charset/asm1.c: Ditto. * gcc.dg/charset/asm2.c: Ditto. * gcc.dg/charset/asm3.c: Ditto. * gcc.dg/charset/asm4.c: Ditto. * gcc.dg/charset/asm5.c: Ditto. * gcc.dg/charset/attribute1.c: Ditto. * gcc.dg/charset/attribute2.c: Ditto. * gcc.dg/charset/string1.c: Ditto. * g++.dg/charset: New directory. * g++.dg/dg.exp: Add here. Special options. * g++.dg/charset/charset.exp: New file. * g++.dg/charset/asm1.c: Ditto. * g++.dg/charset/asm2.c: Ditto. * g++.dg/charset/asm3.c: Ditto. * g++.dg/charset/asm4.c: Ditto. * g++.dg/charset/attribute1.c: Ditto. * g++.dg/charset/attribute2.c: Ditto. * g++.dg/charset/extern1.cc: Ditto. * g++.dg/charset/extern2.cc: Ditto. * g++.dg/charset/string1.c: Ditto. 2004-02-26 Eric Christopher <echristo@redhat.com> * c-lex.c (c_lex_string_translate): New variable. (lex_string): Use to determine string translation. * c-pragma.h: Prototype. * c-parse.in (start_string_translation): New. Set above. (stop_string_translation): Ditto. (attribute, attribute_list, asm_def, asm_stmt, asm_operand): Use above functions. * cp/parser.c (cp_parser_declaration): Translate strings unless token is RID_EXTERN. Set c_lex_string_translate for recursive use. (cp_parser_asm_definition): Only translate argument strings to asms. (cp_parser_asm_operand_list): Ditto. (cp_parser_attribute_list): Do not translate attribute strings. From-SVN: r78548
2004-02-27 03:01:10 +01:00
proc check_iconv_available { test_what } {
global libiconv
target-supports.exp (check-iconv-available): New function. 2004-02-26 Eric Christopher <echristo@redhat.com> * lib/target-supports.exp (check-iconv-available): New function. * lib/gcc-dg.exp (dg-require-iconv): New function. Use above. * gcc.dg/charset: New directory. * gcc.dg/charset/charset.exp: New file. * gcc.dg/charset/asm1.c: Ditto. * gcc.dg/charset/asm2.c: Ditto. * gcc.dg/charset/asm3.c: Ditto. * gcc.dg/charset/asm4.c: Ditto. * gcc.dg/charset/asm5.c: Ditto. * gcc.dg/charset/attribute1.c: Ditto. * gcc.dg/charset/attribute2.c: Ditto. * gcc.dg/charset/string1.c: Ditto. * g++.dg/charset: New directory. * g++.dg/dg.exp: Add here. Special options. * g++.dg/charset/charset.exp: New file. * g++.dg/charset/asm1.c: Ditto. * g++.dg/charset/asm2.c: Ditto. * g++.dg/charset/asm3.c: Ditto. * g++.dg/charset/asm4.c: Ditto. * g++.dg/charset/attribute1.c: Ditto. * g++.dg/charset/attribute2.c: Ditto. * g++.dg/charset/extern1.cc: Ditto. * g++.dg/charset/extern2.cc: Ditto. * g++.dg/charset/string1.c: Ditto. 2004-02-26 Eric Christopher <echristo@redhat.com> * c-lex.c (c_lex_string_translate): New variable. (lex_string): Use to determine string translation. * c-pragma.h: Prototype. * c-parse.in (start_string_translation): New. Set above. (stop_string_translation): Ditto. (attribute, attribute_list, asm_def, asm_stmt, asm_operand): Use above functions. * cp/parser.c (cp_parser_declaration): Translate strings unless token is RID_EXTERN. Set c_lex_string_translate for recursive use. (cp_parser_asm_definition): Only translate argument strings to asms. (cp_parser_asm_operand_list): Ditto. (cp_parser_attribute_list): Do not translate attribute strings. From-SVN: r78548
2004-02-27 03:01:10 +01:00
# If the tool configuration file has not set libiconv, try "-liconv"
if { ![info exists libiconv] } {
set libiconv "-liconv"
}
target-supports.exp (get_compiler_messages): Replace with... gcc/testsuite/ * lib/target-supports.exp (get_compiler_messages): Replace with... (check_compile): ...this new procedure. Handle TYPE == executable. Use comments in the source to determine the correct extension. Return a pair containing the compiler output and the output filename. Don't delete the file here. (check_no_compiler_messages_nocache): New procedure. (check_no_compiler_messages): Use it. (check_no_messages_and_pattern_nocache): New procedure. (check_no_messages_and_pattern): Use it. (check_runtime_nocache, check_runtime): New procedures. (check_effective_target_tls): Use check_no_compiler_messages. (check_effective_target_tls_native): Use check_no_messages_and_pattern. (check_effective_target_tls_runtime): Use check_runtime. (check_effective_target_fstack_protector): Likewise. (check_iconv_available): Use check_runtime_nocache. (check_effective_target_fortran_large_real): Use check_no_compiler_messages. (check_effective_target_fortran_large_int): Likewise. (check_effective_target_static_libgfortran): Likewise. (check_750cl_hw_available): Use check_cached_effective_target and check_runtime_nocache. (check_vmx_hw_available): Likewise. (check_effective_target_broken_cplxf_arg): Likewise. (check_alpha_max_hw_available): Use check_runtime. (check_function_available): Use check_no_compiler_messages. (check_cxa_atexit_available): Use check_cached_effective_target and check_runtime_nocache. (check_effective_target_dfp_nocache): Use check_no_compiler_messages_nocache. (check_effective_target_dfprt_nocache): Use check_runtime_nocache. (check_effective_target_dfp): Use check_cached_effective_target. (check_effective_target_dfprt): Likewise. (check_effective_target_arm_neon_hw): Use check_runtime. (check_effective_target_ultrasparc_hw): Likewise. (check_effective_target_c99_runtime): Use check_no_compiler_messages_nocache. From-SVN: r130599
2007-12-04 11:16:17 +01:00
set test_what [lindex $test_what 1]
return [check_runtime_nocache $test_what [subst {
#include <iconv.h>
int main (void)
{
iconv_t cd;
cd = iconv_open ("$test_what", "UTF-8");
if (cd == (iconv_t) -1)
return 1;
return 0;
}
target-supports.exp (get_compiler_messages): Replace with... gcc/testsuite/ * lib/target-supports.exp (get_compiler_messages): Replace with... (check_compile): ...this new procedure. Handle TYPE == executable. Use comments in the source to determine the correct extension. Return a pair containing the compiler output and the output filename. Don't delete the file here. (check_no_compiler_messages_nocache): New procedure. (check_no_compiler_messages): Use it. (check_no_messages_and_pattern_nocache): New procedure. (check_no_messages_and_pattern): Use it. (check_runtime_nocache, check_runtime): New procedures. (check_effective_target_tls): Use check_no_compiler_messages. (check_effective_target_tls_native): Use check_no_messages_and_pattern. (check_effective_target_tls_runtime): Use check_runtime. (check_effective_target_fstack_protector): Likewise. (check_iconv_available): Use check_runtime_nocache. (check_effective_target_fortran_large_real): Use check_no_compiler_messages. (check_effective_target_fortran_large_int): Likewise. (check_effective_target_static_libgfortran): Likewise. (check_750cl_hw_available): Use check_cached_effective_target and check_runtime_nocache. (check_vmx_hw_available): Likewise. (check_effective_target_broken_cplxf_arg): Likewise. (check_alpha_max_hw_available): Use check_runtime. (check_function_available): Use check_no_compiler_messages. (check_cxa_atexit_available): Use check_cached_effective_target and check_runtime_nocache. (check_effective_target_dfp_nocache): Use check_no_compiler_messages_nocache. (check_effective_target_dfprt_nocache): Use check_runtime_nocache. (check_effective_target_dfp): Use check_cached_effective_target. (check_effective_target_dfprt): Likewise. (check_effective_target_arm_neon_hw): Use check_runtime. (check_effective_target_ultrasparc_hw): Likewise. (check_effective_target_c99_runtime): Use check_no_compiler_messages_nocache. From-SVN: r130599
2007-12-04 11:16:17 +01:00
}] $libiconv]
target-supports.exp (check-iconv-available): New function. 2004-02-26 Eric Christopher <echristo@redhat.com> * lib/target-supports.exp (check-iconv-available): New function. * lib/gcc-dg.exp (dg-require-iconv): New function. Use above. * gcc.dg/charset: New directory. * gcc.dg/charset/charset.exp: New file. * gcc.dg/charset/asm1.c: Ditto. * gcc.dg/charset/asm2.c: Ditto. * gcc.dg/charset/asm3.c: Ditto. * gcc.dg/charset/asm4.c: Ditto. * gcc.dg/charset/asm5.c: Ditto. * gcc.dg/charset/attribute1.c: Ditto. * gcc.dg/charset/attribute2.c: Ditto. * gcc.dg/charset/string1.c: Ditto. * g++.dg/charset: New directory. * g++.dg/dg.exp: Add here. Special options. * g++.dg/charset/charset.exp: New file. * g++.dg/charset/asm1.c: Ditto. * g++.dg/charset/asm2.c: Ditto. * g++.dg/charset/asm3.c: Ditto. * g++.dg/charset/asm4.c: Ditto. * g++.dg/charset/attribute1.c: Ditto. * g++.dg/charset/attribute2.c: Ditto. * g++.dg/charset/extern1.cc: Ditto. * g++.dg/charset/extern2.cc: Ditto. * g++.dg/charset/string1.c: Ditto. 2004-02-26 Eric Christopher <echristo@redhat.com> * c-lex.c (c_lex_string_translate): New variable. (lex_string): Use to determine string translation. * c-pragma.h: Prototype. * c-parse.in (start_string_translation): New. Set above. (stop_string_translation): Ditto. (attribute, attribute_list, asm_def, asm_stmt, asm_operand): Use above functions. * cp/parser.c (cp_parser_declaration): Translate strings unless token is RID_EXTERN. Set c_lex_string_translate for recursive use. (cp_parser_asm_definition): Only translate argument strings to asms. (cp_parser_asm_operand_list): Ditto. (cp_parser_attribute_list): Do not translate attribute strings. From-SVN: r78548
2004-02-27 03:01:10 +01:00
}
# Return true if named sections are supported on this target.
proc check_named_sections_available { } {
return [check_no_compiler_messages named_sections assembly {
int __attribute__ ((section("whatever"))) foo;
}]
}
c99_functions.c (log10l): New log10l function for systems where this is not available. * intrinsics/c99_functions.c (log10l): New log10l function for systems where this is not available. * c99_protos.h: Prototype for log10l function. * libgfortran.h: Use generated kinds.h to define GFC_INTEGER_*, GFC_UINTEGER_*, GFC_LOGICAL_*, GFC_REAL_*, GFC_COMPLEX_*. Update prototypes for gfc_itoa and xtoa. * io/io.h: Update prototypes for set_integer and max_value. * io/list_read.c (convert_integer): Use new GFC_(INTEGER|REAL)_LARGEST type. * io/read.c (set_integer): Likewise. (max_value): Likewise. (convert_real): Likewise. (real_l): Likewise. (next_char): Likewise. (read_decimal): Likewise. (read_radix): Likewise. (read_f): Likewise. * io/write.c (extract_int): Use new GFC_INTEGER_LARGEST type. (extract_real): Use new GFC_REAL_LARGEST type. (calculate_exp): Likewise. (calculate_G_format): Likewise. (output_float): Likewise. Use log10l for long double values. Add comment for sprintf format. Use GFC_REAL_LARGEST_FORMAT. (write_l): Use new GFC_INTEGER_LARGEST type. (write_float): Use new GFC_REAL_LARGEST type. (write_int): Remove useless special case for (len < 8). (write_decimal): Use GFC_INTEGER_LARGEST. (otoa): Use GFC_UINTEGER_LARGEST as argument. (btoa): Use GFC_UINTEGER_LARGEST as argument. * runtime/error.c (gfc_itoa): Use GFC_INTEGER_LARGEST as argument. (xtoa): Use GFC_UINTEGER_LARGEST as argument. * Makefile.am: Use mk-kinds-h.sh to generate header kinds.h with all Fortran kinds available. * configure.ac: Check for strtold and log10l. * Makefile.in: Regenerate. * aclocal.m4: Regenerate. * configure: Regenerate. * config.h.in: Regenerate. * mk-kinds-h.sh: Configuration script for available integer and real kinds. * lib/target-supports.exp: Add check_effective_target_fortran_large_real and check_effective_target_fortran_large_int to check for corresponding effective targets. * gfortran.dg/large_integer_kind_1.f90: New test. * gfortran.dg/large_real_kind_1.f90: New test. From-SVN: r101274
2005-06-23 20:50:25 +02:00
# Return 1 if the target supports Fortran real kinds larger than real(8),
# 0 otherwise.
#
# When the target name changes, replace the cached result.
c99_functions.c (log10l): New log10l function for systems where this is not available. * intrinsics/c99_functions.c (log10l): New log10l function for systems where this is not available. * c99_protos.h: Prototype for log10l function. * libgfortran.h: Use generated kinds.h to define GFC_INTEGER_*, GFC_UINTEGER_*, GFC_LOGICAL_*, GFC_REAL_*, GFC_COMPLEX_*. Update prototypes for gfc_itoa and xtoa. * io/io.h: Update prototypes for set_integer and max_value. * io/list_read.c (convert_integer): Use new GFC_(INTEGER|REAL)_LARGEST type. * io/read.c (set_integer): Likewise. (max_value): Likewise. (convert_real): Likewise. (real_l): Likewise. (next_char): Likewise. (read_decimal): Likewise. (read_radix): Likewise. (read_f): Likewise. * io/write.c (extract_int): Use new GFC_INTEGER_LARGEST type. (extract_real): Use new GFC_REAL_LARGEST type. (calculate_exp): Likewise. (calculate_G_format): Likewise. (output_float): Likewise. Use log10l for long double values. Add comment for sprintf format. Use GFC_REAL_LARGEST_FORMAT. (write_l): Use new GFC_INTEGER_LARGEST type. (write_float): Use new GFC_REAL_LARGEST type. (write_int): Remove useless special case for (len < 8). (write_decimal): Use GFC_INTEGER_LARGEST. (otoa): Use GFC_UINTEGER_LARGEST as argument. (btoa): Use GFC_UINTEGER_LARGEST as argument. * runtime/error.c (gfc_itoa): Use GFC_INTEGER_LARGEST as argument. (xtoa): Use GFC_UINTEGER_LARGEST as argument. * Makefile.am: Use mk-kinds-h.sh to generate header kinds.h with all Fortran kinds available. * configure.ac: Check for strtold and log10l. * Makefile.in: Regenerate. * aclocal.m4: Regenerate. * configure: Regenerate. * config.h.in: Regenerate. * mk-kinds-h.sh: Configuration script for available integer and real kinds. * lib/target-supports.exp: Add check_effective_target_fortran_large_real and check_effective_target_fortran_large_int to check for corresponding effective targets. * gfortran.dg/large_integer_kind_1.f90: New test. * gfortran.dg/large_real_kind_1.f90: New test. From-SVN: r101274
2005-06-23 20:50:25 +02:00
proc check_effective_target_fortran_large_real { } {
target-supports.exp (get_compiler_messages): Replace with... gcc/testsuite/ * lib/target-supports.exp (get_compiler_messages): Replace with... (check_compile): ...this new procedure. Handle TYPE == executable. Use comments in the source to determine the correct extension. Return a pair containing the compiler output and the output filename. Don't delete the file here. (check_no_compiler_messages_nocache): New procedure. (check_no_compiler_messages): Use it. (check_no_messages_and_pattern_nocache): New procedure. (check_no_messages_and_pattern): Use it. (check_runtime_nocache, check_runtime): New procedures. (check_effective_target_tls): Use check_no_compiler_messages. (check_effective_target_tls_native): Use check_no_messages_and_pattern. (check_effective_target_tls_runtime): Use check_runtime. (check_effective_target_fstack_protector): Likewise. (check_iconv_available): Use check_runtime_nocache. (check_effective_target_fortran_large_real): Use check_no_compiler_messages. (check_effective_target_fortran_large_int): Likewise. (check_effective_target_static_libgfortran): Likewise. (check_750cl_hw_available): Use check_cached_effective_target and check_runtime_nocache. (check_vmx_hw_available): Likewise. (check_effective_target_broken_cplxf_arg): Likewise. (check_alpha_max_hw_available): Use check_runtime. (check_function_available): Use check_no_compiler_messages. (check_cxa_atexit_available): Use check_cached_effective_target and check_runtime_nocache. (check_effective_target_dfp_nocache): Use check_no_compiler_messages_nocache. (check_effective_target_dfprt_nocache): Use check_runtime_nocache. (check_effective_target_dfp): Use check_cached_effective_target. (check_effective_target_dfprt): Likewise. (check_effective_target_arm_neon_hw): Use check_runtime. (check_effective_target_ultrasparc_hw): Likewise. (check_effective_target_c99_runtime): Use check_no_compiler_messages_nocache. From-SVN: r130599
2007-12-04 11:16:17 +01:00
return [check_no_compiler_messages fortran_large_real executable {
! Fortran
integer,parameter :: k = selected_real_kind (precision (0.0_8) + 1)
real(kind=k) :: x
x = cos (x)
end
}]
c99_functions.c (log10l): New log10l function for systems where this is not available. * intrinsics/c99_functions.c (log10l): New log10l function for systems where this is not available. * c99_protos.h: Prototype for log10l function. * libgfortran.h: Use generated kinds.h to define GFC_INTEGER_*, GFC_UINTEGER_*, GFC_LOGICAL_*, GFC_REAL_*, GFC_COMPLEX_*. Update prototypes for gfc_itoa and xtoa. * io/io.h: Update prototypes for set_integer and max_value. * io/list_read.c (convert_integer): Use new GFC_(INTEGER|REAL)_LARGEST type. * io/read.c (set_integer): Likewise. (max_value): Likewise. (convert_real): Likewise. (real_l): Likewise. (next_char): Likewise. (read_decimal): Likewise. (read_radix): Likewise. (read_f): Likewise. * io/write.c (extract_int): Use new GFC_INTEGER_LARGEST type. (extract_real): Use new GFC_REAL_LARGEST type. (calculate_exp): Likewise. (calculate_G_format): Likewise. (output_float): Likewise. Use log10l for long double values. Add comment for sprintf format. Use GFC_REAL_LARGEST_FORMAT. (write_l): Use new GFC_INTEGER_LARGEST type. (write_float): Use new GFC_REAL_LARGEST type. (write_int): Remove useless special case for (len < 8). (write_decimal): Use GFC_INTEGER_LARGEST. (otoa): Use GFC_UINTEGER_LARGEST as argument. (btoa): Use GFC_UINTEGER_LARGEST as argument. * runtime/error.c (gfc_itoa): Use GFC_INTEGER_LARGEST as argument. (xtoa): Use GFC_UINTEGER_LARGEST as argument. * Makefile.am: Use mk-kinds-h.sh to generate header kinds.h with all Fortran kinds available. * configure.ac: Check for strtold and log10l. * Makefile.in: Regenerate. * aclocal.m4: Regenerate. * configure: Regenerate. * config.h.in: Regenerate. * mk-kinds-h.sh: Configuration script for available integer and real kinds. * lib/target-supports.exp: Add check_effective_target_fortran_large_real and check_effective_target_fortran_large_int to check for corresponding effective targets. * gfortran.dg/large_integer_kind_1.f90: New test. * gfortran.dg/large_real_kind_1.f90: New test. From-SVN: r101274
2005-06-23 20:50:25 +02:00
}
# Return 1 if the target supports Fortran integer kinds larger than
# integer(8), 0 otherwise.
#
# When the target name changes, replace the cached result.
c99_functions.c (log10l): New log10l function for systems where this is not available. * intrinsics/c99_functions.c (log10l): New log10l function for systems where this is not available. * c99_protos.h: Prototype for log10l function. * libgfortran.h: Use generated kinds.h to define GFC_INTEGER_*, GFC_UINTEGER_*, GFC_LOGICAL_*, GFC_REAL_*, GFC_COMPLEX_*. Update prototypes for gfc_itoa and xtoa. * io/io.h: Update prototypes for set_integer and max_value. * io/list_read.c (convert_integer): Use new GFC_(INTEGER|REAL)_LARGEST type. * io/read.c (set_integer): Likewise. (max_value): Likewise. (convert_real): Likewise. (real_l): Likewise. (next_char): Likewise. (read_decimal): Likewise. (read_radix): Likewise. (read_f): Likewise. * io/write.c (extract_int): Use new GFC_INTEGER_LARGEST type. (extract_real): Use new GFC_REAL_LARGEST type. (calculate_exp): Likewise. (calculate_G_format): Likewise. (output_float): Likewise. Use log10l for long double values. Add comment for sprintf format. Use GFC_REAL_LARGEST_FORMAT. (write_l): Use new GFC_INTEGER_LARGEST type. (write_float): Use new GFC_REAL_LARGEST type. (write_int): Remove useless special case for (len < 8). (write_decimal): Use GFC_INTEGER_LARGEST. (otoa): Use GFC_UINTEGER_LARGEST as argument. (btoa): Use GFC_UINTEGER_LARGEST as argument. * runtime/error.c (gfc_itoa): Use GFC_INTEGER_LARGEST as argument. (xtoa): Use GFC_UINTEGER_LARGEST as argument. * Makefile.am: Use mk-kinds-h.sh to generate header kinds.h with all Fortran kinds available. * configure.ac: Check for strtold and log10l. * Makefile.in: Regenerate. * aclocal.m4: Regenerate. * configure: Regenerate. * config.h.in: Regenerate. * mk-kinds-h.sh: Configuration script for available integer and real kinds. * lib/target-supports.exp: Add check_effective_target_fortran_large_real and check_effective_target_fortran_large_int to check for corresponding effective targets. * gfortran.dg/large_integer_kind_1.f90: New test. * gfortran.dg/large_real_kind_1.f90: New test. From-SVN: r101274
2005-06-23 20:50:25 +02:00
proc check_effective_target_fortran_large_int { } {
target-supports.exp (get_compiler_messages): Replace with... gcc/testsuite/ * lib/target-supports.exp (get_compiler_messages): Replace with... (check_compile): ...this new procedure. Handle TYPE == executable. Use comments in the source to determine the correct extension. Return a pair containing the compiler output and the output filename. Don't delete the file here. (check_no_compiler_messages_nocache): New procedure. (check_no_compiler_messages): Use it. (check_no_messages_and_pattern_nocache): New procedure. (check_no_messages_and_pattern): Use it. (check_runtime_nocache, check_runtime): New procedures. (check_effective_target_tls): Use check_no_compiler_messages. (check_effective_target_tls_native): Use check_no_messages_and_pattern. (check_effective_target_tls_runtime): Use check_runtime. (check_effective_target_fstack_protector): Likewise. (check_iconv_available): Use check_runtime_nocache. (check_effective_target_fortran_large_real): Use check_no_compiler_messages. (check_effective_target_fortran_large_int): Likewise. (check_effective_target_static_libgfortran): Likewise. (check_750cl_hw_available): Use check_cached_effective_target and check_runtime_nocache. (check_vmx_hw_available): Likewise. (check_effective_target_broken_cplxf_arg): Likewise. (check_alpha_max_hw_available): Use check_runtime. (check_function_available): Use check_no_compiler_messages. (check_cxa_atexit_available): Use check_cached_effective_target and check_runtime_nocache. (check_effective_target_dfp_nocache): Use check_no_compiler_messages_nocache. (check_effective_target_dfprt_nocache): Use check_runtime_nocache. (check_effective_target_dfp): Use check_cached_effective_target. (check_effective_target_dfprt): Likewise. (check_effective_target_arm_neon_hw): Use check_runtime. (check_effective_target_ultrasparc_hw): Likewise. (check_effective_target_c99_runtime): Use check_no_compiler_messages_nocache. From-SVN: r130599
2007-12-04 11:16:17 +01:00
return [check_no_compiler_messages fortran_large_int executable {
! Fortran
integer,parameter :: k = selected_int_kind (range (0_8) + 1)
integer(kind=k) :: i
end
}]
c99_functions.c (log10l): New log10l function for systems where this is not available. * intrinsics/c99_functions.c (log10l): New log10l function for systems where this is not available. * c99_protos.h: Prototype for log10l function. * libgfortran.h: Use generated kinds.h to define GFC_INTEGER_*, GFC_UINTEGER_*, GFC_LOGICAL_*, GFC_REAL_*, GFC_COMPLEX_*. Update prototypes for gfc_itoa and xtoa. * io/io.h: Update prototypes for set_integer and max_value. * io/list_read.c (convert_integer): Use new GFC_(INTEGER|REAL)_LARGEST type. * io/read.c (set_integer): Likewise. (max_value): Likewise. (convert_real): Likewise. (real_l): Likewise. (next_char): Likewise. (read_decimal): Likewise. (read_radix): Likewise. (read_f): Likewise. * io/write.c (extract_int): Use new GFC_INTEGER_LARGEST type. (extract_real): Use new GFC_REAL_LARGEST type. (calculate_exp): Likewise. (calculate_G_format): Likewise. (output_float): Likewise. Use log10l for long double values. Add comment for sprintf format. Use GFC_REAL_LARGEST_FORMAT. (write_l): Use new GFC_INTEGER_LARGEST type. (write_float): Use new GFC_REAL_LARGEST type. (write_int): Remove useless special case for (len < 8). (write_decimal): Use GFC_INTEGER_LARGEST. (otoa): Use GFC_UINTEGER_LARGEST as argument. (btoa): Use GFC_UINTEGER_LARGEST as argument. * runtime/error.c (gfc_itoa): Use GFC_INTEGER_LARGEST as argument. (xtoa): Use GFC_UINTEGER_LARGEST as argument. * Makefile.am: Use mk-kinds-h.sh to generate header kinds.h with all Fortran kinds available. * configure.ac: Check for strtold and log10l. * Makefile.in: Regenerate. * aclocal.m4: Regenerate. * configure: Regenerate. * config.h.in: Regenerate. * mk-kinds-h.sh: Configuration script for available integer and real kinds. * lib/target-supports.exp: Add check_effective_target_fortran_large_real and check_effective_target_fortran_large_int to check for corresponding effective targets. * gfortran.dg/large_integer_kind_1.f90: New test. * gfortran.dg/large_real_kind_1.f90: New test. From-SVN: r101274
2005-06-23 20:50:25 +02:00
}
# Return 1 if the target supports Fortran integer(16), 0 otherwise.
#
# When the target name changes, replace the cached result.
proc check_effective_target_fortran_integer_16 { } {
return [check_no_compiler_messages fortran_integer_16 executable {
! Fortran
integer(16) :: i
end
}]
}
# Return 1 if we can statically link libgfortran, 0 otherwise.
#
# When the target name changes, replace the cached result.
proc check_effective_target_static_libgfortran { } {
target-supports.exp (get_compiler_messages): Replace with... gcc/testsuite/ * lib/target-supports.exp (get_compiler_messages): Replace with... (check_compile): ...this new procedure. Handle TYPE == executable. Use comments in the source to determine the correct extension. Return a pair containing the compiler output and the output filename. Don't delete the file here. (check_no_compiler_messages_nocache): New procedure. (check_no_compiler_messages): Use it. (check_no_messages_and_pattern_nocache): New procedure. (check_no_messages_and_pattern): Use it. (check_runtime_nocache, check_runtime): New procedures. (check_effective_target_tls): Use check_no_compiler_messages. (check_effective_target_tls_native): Use check_no_messages_and_pattern. (check_effective_target_tls_runtime): Use check_runtime. (check_effective_target_fstack_protector): Likewise. (check_iconv_available): Use check_runtime_nocache. (check_effective_target_fortran_large_real): Use check_no_compiler_messages. (check_effective_target_fortran_large_int): Likewise. (check_effective_target_static_libgfortran): Likewise. (check_750cl_hw_available): Use check_cached_effective_target and check_runtime_nocache. (check_vmx_hw_available): Likewise. (check_effective_target_broken_cplxf_arg): Likewise. (check_alpha_max_hw_available): Use check_runtime. (check_function_available): Use check_no_compiler_messages. (check_cxa_atexit_available): Use check_cached_effective_target and check_runtime_nocache. (check_effective_target_dfp_nocache): Use check_no_compiler_messages_nocache. (check_effective_target_dfprt_nocache): Use check_runtime_nocache. (check_effective_target_dfp): Use check_cached_effective_target. (check_effective_target_dfprt): Likewise. (check_effective_target_arm_neon_hw): Use check_runtime. (check_effective_target_ultrasparc_hw): Likewise. (check_effective_target_c99_runtime): Use check_no_compiler_messages_nocache. From-SVN: r130599
2007-12-04 11:16:17 +01:00
return [check_no_compiler_messages static_libgfortran executable {
! Fortran
print *, 'test'
end
} "-static"]
}
# Return 1 if the target supports executing 750CL paired-single instructions, 0
# otherwise. Cache the result.
proc check_750cl_hw_available { } {
target-supports.exp (get_compiler_messages): Replace with... gcc/testsuite/ * lib/target-supports.exp (get_compiler_messages): Replace with... (check_compile): ...this new procedure. Handle TYPE == executable. Use comments in the source to determine the correct extension. Return a pair containing the compiler output and the output filename. Don't delete the file here. (check_no_compiler_messages_nocache): New procedure. (check_no_compiler_messages): Use it. (check_no_messages_and_pattern_nocache): New procedure. (check_no_messages_and_pattern): Use it. (check_runtime_nocache, check_runtime): New procedures. (check_effective_target_tls): Use check_no_compiler_messages. (check_effective_target_tls_native): Use check_no_messages_and_pattern. (check_effective_target_tls_runtime): Use check_runtime. (check_effective_target_fstack_protector): Likewise. (check_iconv_available): Use check_runtime_nocache. (check_effective_target_fortran_large_real): Use check_no_compiler_messages. (check_effective_target_fortran_large_int): Likewise. (check_effective_target_static_libgfortran): Likewise. (check_750cl_hw_available): Use check_cached_effective_target and check_runtime_nocache. (check_vmx_hw_available): Likewise. (check_effective_target_broken_cplxf_arg): Likewise. (check_alpha_max_hw_available): Use check_runtime. (check_function_available): Use check_no_compiler_messages. (check_cxa_atexit_available): Use check_cached_effective_target and check_runtime_nocache. (check_effective_target_dfp_nocache): Use check_no_compiler_messages_nocache. (check_effective_target_dfprt_nocache): Use check_runtime_nocache. (check_effective_target_dfp): Use check_cached_effective_target. (check_effective_target_dfprt): Likewise. (check_effective_target_arm_neon_hw): Use check_runtime. (check_effective_target_ultrasparc_hw): Likewise. (check_effective_target_c99_runtime): Use check_no_compiler_messages_nocache. From-SVN: r130599
2007-12-04 11:16:17 +01:00
return [check_cached_effective_target 750cl_hw_available {
# If this is not the right target then we can skip the test.
if { ![istarget powerpc-*paired*] } {
expr 0
} else {
check_runtime_nocache 750cl_hw_available {
int main()
{
#ifdef __MACH__
asm volatile ("ps_mul v0,v0,v0");
#else
asm volatile ("ps_mul 0,0,0");
#endif
return 0;
}
} "-mpaired"
}
}]
}
# Return 1 if the target supports executing SSE2 instructions, 0
# otherwise. Cache the result.
proc check_sse2_hw_available { } {
return [check_cached_effective_target sse2_hw_available {
# If this is not the right target then we can skip the test.
if { !([istarget x86_64-*-*] || [istarget i?86-*-*]) } {
expr 0
} else {
check_runtime_nocache sse2_hw_available {
#include "cpuid.h"
int main ()
{
unsigned int eax, ebx, ecx, edx = 0;
if (__get_cpuid (1, &eax, &ebx, &ecx, &edx))
return !(edx & bit_SSE2);
return 1;
}
} ""
}
}]
}
# Return 1 if the target supports executing AltiVec instructions, 0
# otherwise. Cache the result.
proc check_vmx_hw_available { } {
target-supports.exp (get_compiler_messages): Replace with... gcc/testsuite/ * lib/target-supports.exp (get_compiler_messages): Replace with... (check_compile): ...this new procedure. Handle TYPE == executable. Use comments in the source to determine the correct extension. Return a pair containing the compiler output and the output filename. Don't delete the file here. (check_no_compiler_messages_nocache): New procedure. (check_no_compiler_messages): Use it. (check_no_messages_and_pattern_nocache): New procedure. (check_no_messages_and_pattern): Use it. (check_runtime_nocache, check_runtime): New procedures. (check_effective_target_tls): Use check_no_compiler_messages. (check_effective_target_tls_native): Use check_no_messages_and_pattern. (check_effective_target_tls_runtime): Use check_runtime. (check_effective_target_fstack_protector): Likewise. (check_iconv_available): Use check_runtime_nocache. (check_effective_target_fortran_large_real): Use check_no_compiler_messages. (check_effective_target_fortran_large_int): Likewise. (check_effective_target_static_libgfortran): Likewise. (check_750cl_hw_available): Use check_cached_effective_target and check_runtime_nocache. (check_vmx_hw_available): Likewise. (check_effective_target_broken_cplxf_arg): Likewise. (check_alpha_max_hw_available): Use check_runtime. (check_function_available): Use check_no_compiler_messages. (check_cxa_atexit_available): Use check_cached_effective_target and check_runtime_nocache. (check_effective_target_dfp_nocache): Use check_no_compiler_messages_nocache. (check_effective_target_dfprt_nocache): Use check_runtime_nocache. (check_effective_target_dfp): Use check_cached_effective_target. (check_effective_target_dfprt): Likewise. (check_effective_target_arm_neon_hw): Use check_runtime. (check_effective_target_ultrasparc_hw): Likewise. (check_effective_target_c99_runtime): Use check_no_compiler_messages_nocache. From-SVN: r130599
2007-12-04 11:16:17 +01:00
return [check_cached_effective_target vmx_hw_available {
# Some simulators are known to not support VMX instructions.
if { [istarget powerpc-*-eabi] || [istarget powerpc*-*-eabispe] } {
target-supports.exp (get_compiler_messages): Replace with... gcc/testsuite/ * lib/target-supports.exp (get_compiler_messages): Replace with... (check_compile): ...this new procedure. Handle TYPE == executable. Use comments in the source to determine the correct extension. Return a pair containing the compiler output and the output filename. Don't delete the file here. (check_no_compiler_messages_nocache): New procedure. (check_no_compiler_messages): Use it. (check_no_messages_and_pattern_nocache): New procedure. (check_no_messages_and_pattern): Use it. (check_runtime_nocache, check_runtime): New procedures. (check_effective_target_tls): Use check_no_compiler_messages. (check_effective_target_tls_native): Use check_no_messages_and_pattern. (check_effective_target_tls_runtime): Use check_runtime. (check_effective_target_fstack_protector): Likewise. (check_iconv_available): Use check_runtime_nocache. (check_effective_target_fortran_large_real): Use check_no_compiler_messages. (check_effective_target_fortran_large_int): Likewise. (check_effective_target_static_libgfortran): Likewise. (check_750cl_hw_available): Use check_cached_effective_target and check_runtime_nocache. (check_vmx_hw_available): Likewise. (check_effective_target_broken_cplxf_arg): Likewise. (check_alpha_max_hw_available): Use check_runtime. (check_function_available): Use check_no_compiler_messages. (check_cxa_atexit_available): Use check_cached_effective_target and check_runtime_nocache. (check_effective_target_dfp_nocache): Use check_no_compiler_messages_nocache. (check_effective_target_dfprt_nocache): Use check_runtime_nocache. (check_effective_target_dfp): Use check_cached_effective_target. (check_effective_target_dfprt): Likewise. (check_effective_target_arm_neon_hw): Use check_runtime. (check_effective_target_ultrasparc_hw): Likewise. (check_effective_target_c99_runtime): Use check_no_compiler_messages_nocache. From-SVN: r130599
2007-12-04 11:16:17 +01:00
expr 0
} else {
target-supports.exp (get_compiler_messages): Replace with... gcc/testsuite/ * lib/target-supports.exp (get_compiler_messages): Replace with... (check_compile): ...this new procedure. Handle TYPE == executable. Use comments in the source to determine the correct extension. Return a pair containing the compiler output and the output filename. Don't delete the file here. (check_no_compiler_messages_nocache): New procedure. (check_no_compiler_messages): Use it. (check_no_messages_and_pattern_nocache): New procedure. (check_no_messages_and_pattern): Use it. (check_runtime_nocache, check_runtime): New procedures. (check_effective_target_tls): Use check_no_compiler_messages. (check_effective_target_tls_native): Use check_no_messages_and_pattern. (check_effective_target_tls_runtime): Use check_runtime. (check_effective_target_fstack_protector): Likewise. (check_iconv_available): Use check_runtime_nocache. (check_effective_target_fortran_large_real): Use check_no_compiler_messages. (check_effective_target_fortran_large_int): Likewise. (check_effective_target_static_libgfortran): Likewise. (check_750cl_hw_available): Use check_cached_effective_target and check_runtime_nocache. (check_vmx_hw_available): Likewise. (check_effective_target_broken_cplxf_arg): Likewise. (check_alpha_max_hw_available): Use check_runtime. (check_function_available): Use check_no_compiler_messages. (check_cxa_atexit_available): Use check_cached_effective_target and check_runtime_nocache. (check_effective_target_dfp_nocache): Use check_no_compiler_messages_nocache. (check_effective_target_dfprt_nocache): Use check_runtime_nocache. (check_effective_target_dfp): Use check_cached_effective_target. (check_effective_target_dfprt): Likewise. (check_effective_target_arm_neon_hw): Use check_runtime. (check_effective_target_ultrasparc_hw): Likewise. (check_effective_target_c99_runtime): Use check_no_compiler_messages_nocache. From-SVN: r130599
2007-12-04 11:16:17 +01:00
# Most targets don't require special flags for this test case, but
# Darwin does.
if { [istarget *-*-darwin*]
|| [istarget *-*-aix*] } {
set options "-maltivec"
} else {
set options ""
}
target-supports.exp (get_compiler_messages): Replace with... gcc/testsuite/ * lib/target-supports.exp (get_compiler_messages): Replace with... (check_compile): ...this new procedure. Handle TYPE == executable. Use comments in the source to determine the correct extension. Return a pair containing the compiler output and the output filename. Don't delete the file here. (check_no_compiler_messages_nocache): New procedure. (check_no_compiler_messages): Use it. (check_no_messages_and_pattern_nocache): New procedure. (check_no_messages_and_pattern): Use it. (check_runtime_nocache, check_runtime): New procedures. (check_effective_target_tls): Use check_no_compiler_messages. (check_effective_target_tls_native): Use check_no_messages_and_pattern. (check_effective_target_tls_runtime): Use check_runtime. (check_effective_target_fstack_protector): Likewise. (check_iconv_available): Use check_runtime_nocache. (check_effective_target_fortran_large_real): Use check_no_compiler_messages. (check_effective_target_fortran_large_int): Likewise. (check_effective_target_static_libgfortran): Likewise. (check_750cl_hw_available): Use check_cached_effective_target and check_runtime_nocache. (check_vmx_hw_available): Likewise. (check_effective_target_broken_cplxf_arg): Likewise. (check_alpha_max_hw_available): Use check_runtime. (check_function_available): Use check_no_compiler_messages. (check_cxa_atexit_available): Use check_cached_effective_target and check_runtime_nocache. (check_effective_target_dfp_nocache): Use check_no_compiler_messages_nocache. (check_effective_target_dfprt_nocache): Use check_runtime_nocache. (check_effective_target_dfp): Use check_cached_effective_target. (check_effective_target_dfprt): Likewise. (check_effective_target_arm_neon_hw): Use check_runtime. (check_effective_target_ultrasparc_hw): Likewise. (check_effective_target_c99_runtime): Use check_no_compiler_messages_nocache. From-SVN: r130599
2007-12-04 11:16:17 +01:00
check_runtime_nocache vmx_hw_available {
int main()
{
#ifdef __MACH__
asm volatile ("vor v0,v0,v0");
#else
asm volatile ("vor 0,0,0");
#endif
return 0;
}
} $options
}
target-supports.exp (get_compiler_messages): Replace with... gcc/testsuite/ * lib/target-supports.exp (get_compiler_messages): Replace with... (check_compile): ...this new procedure. Handle TYPE == executable. Use comments in the source to determine the correct extension. Return a pair containing the compiler output and the output filename. Don't delete the file here. (check_no_compiler_messages_nocache): New procedure. (check_no_compiler_messages): Use it. (check_no_messages_and_pattern_nocache): New procedure. (check_no_messages_and_pattern): Use it. (check_runtime_nocache, check_runtime): New procedures. (check_effective_target_tls): Use check_no_compiler_messages. (check_effective_target_tls_native): Use check_no_messages_and_pattern. (check_effective_target_tls_runtime): Use check_runtime. (check_effective_target_fstack_protector): Likewise. (check_iconv_available): Use check_runtime_nocache. (check_effective_target_fortran_large_real): Use check_no_compiler_messages. (check_effective_target_fortran_large_int): Likewise. (check_effective_target_static_libgfortran): Likewise. (check_750cl_hw_available): Use check_cached_effective_target and check_runtime_nocache. (check_vmx_hw_available): Likewise. (check_effective_target_broken_cplxf_arg): Likewise. (check_alpha_max_hw_available): Use check_runtime. (check_function_available): Use check_no_compiler_messages. (check_cxa_atexit_available): Use check_cached_effective_target and check_runtime_nocache. (check_effective_target_dfp_nocache): Use check_no_compiler_messages_nocache. (check_effective_target_dfprt_nocache): Use check_runtime_nocache. (check_effective_target_dfp): Use check_cached_effective_target. (check_effective_target_dfprt): Likewise. (check_effective_target_arm_neon_hw): Use check_runtime. (check_effective_target_ultrasparc_hw): Likewise. (check_effective_target_c99_runtime): Use check_no_compiler_messages_nocache. From-SVN: r130599
2007-12-04 11:16:17 +01:00
}]
}
# Return 1 if the target supports executing AltiVec and Cell PPU
# instructions, 0 otherwise. Cache the result.
proc check_effective_target_cell_hw { } {
return [check_cached_effective_target cell_hw_available {
# Some simulators are known to not support VMX and PPU instructions.
if { [istarget powerpc-*-eabi*] } {
expr 0
} else {
# Most targets don't require special flags for this test
# case, but Darwin and AIX do.
if { [istarget *-*-darwin*]
|| [istarget *-*-aix*] } {
set options "-maltivec -mcpu=cell"
} else {
set options "-mcpu=cell"
}
check_runtime_nocache cell_hw_available {
int main()
{
#ifdef __MACH__
asm volatile ("vor v0,v0,v0");
asm volatile ("lvlx v0,r0,r0");
#else
asm volatile ("vor 0,0,0");
asm volatile ("lvlx 0,0,0");
#endif
return 0;
}
} $options
}
}]
}
# Return 1 if the target supports executing 64-bit instructions, 0
# otherwise. Cache the result.
proc check_effective_target_powerpc64 { } {
global powerpc64_available_saved
global tool
if [info exists powerpc64_available_saved] {
verbose "check_effective_target_powerpc64 returning saved $powerpc64_available_saved" 2
} else {
set powerpc64_available_saved 0
# Some simulators are known to not support powerpc64 instructions.
if { [istarget powerpc-*-eabi*] || [istarget powerpc-ibm-aix*] } {
verbose "check_effective_target_powerpc64 returning 0" 2
return $powerpc64_available_saved
}
# Set up, compile, and execute a test program containing a 64-bit
# instruction. Include the current process ID in the file
# names to prevent conflicts with invocations for multiple
# testsuites.
set src ppc[pid].c
set exe ppc[pid].x
set f [open $src "w"]
puts $f "int main() {"
puts $f "#ifdef __MACH__"
puts $f " asm volatile (\"extsw r0,r0\");"
puts $f "#else"
puts $f " asm volatile (\"extsw 0,0\");"
puts $f "#endif"
puts $f " return 0; }"
close $f
set opts "additional_flags=-mcpu=G5"
verbose "check_effective_target_powerpc64 compiling testfile $src" 2
set lines [${tool}_target_compile $src $exe executable "$opts"]
file delete $src
if [string match "" $lines] then {
# No error message, compilation succeeded.
set result [${tool}_load "./$exe" "" ""]
set status [lindex $result 0]
remote_file build delete $exe
verbose "check_effective_target_powerpc64 testfile status is <$status>" 2
if { $status == "pass" } then {
set powerpc64_available_saved 1
}
} else {
verbose "check_effective_target_powerpc64 testfile compilation failed" 2
}
}
return $powerpc64_available_saved
}
# GCC 3.4.0 for powerpc64-*-linux* included an ABI fix for passing
# complex float arguments. This affects gfortran tests that call cabsf
# in libm built by an earlier compiler. Return 1 if libm uses the same
# argument passing as the compiler under test, 0 otherwise.
#
# When the target name changes, replace the cached result.
proc check_effective_target_broken_cplxf_arg { } {
target-supports.exp (get_compiler_messages): Replace with... gcc/testsuite/ * lib/target-supports.exp (get_compiler_messages): Replace with... (check_compile): ...this new procedure. Handle TYPE == executable. Use comments in the source to determine the correct extension. Return a pair containing the compiler output and the output filename. Don't delete the file here. (check_no_compiler_messages_nocache): New procedure. (check_no_compiler_messages): Use it. (check_no_messages_and_pattern_nocache): New procedure. (check_no_messages_and_pattern): Use it. (check_runtime_nocache, check_runtime): New procedures. (check_effective_target_tls): Use check_no_compiler_messages. (check_effective_target_tls_native): Use check_no_messages_and_pattern. (check_effective_target_tls_runtime): Use check_runtime. (check_effective_target_fstack_protector): Likewise. (check_iconv_available): Use check_runtime_nocache. (check_effective_target_fortran_large_real): Use check_no_compiler_messages. (check_effective_target_fortran_large_int): Likewise. (check_effective_target_static_libgfortran): Likewise. (check_750cl_hw_available): Use check_cached_effective_target and check_runtime_nocache. (check_vmx_hw_available): Likewise. (check_effective_target_broken_cplxf_arg): Likewise. (check_alpha_max_hw_available): Use check_runtime. (check_function_available): Use check_no_compiler_messages. (check_cxa_atexit_available): Use check_cached_effective_target and check_runtime_nocache. (check_effective_target_dfp_nocache): Use check_no_compiler_messages_nocache. (check_effective_target_dfprt_nocache): Use check_runtime_nocache. (check_effective_target_dfp): Use check_cached_effective_target. (check_effective_target_dfprt): Likewise. (check_effective_target_arm_neon_hw): Use check_runtime. (check_effective_target_ultrasparc_hw): Likewise. (check_effective_target_c99_runtime): Use check_no_compiler_messages_nocache. From-SVN: r130599
2007-12-04 11:16:17 +01:00
return [check_cached_effective_target broken_cplxf_arg {
# Skip the work for targets known not to be affected.
if { ![istarget powerpc64-*-linux*] } {
expr 0
} elseif { ![is-effective-target lp64] } {
expr 0
} else {
target-supports.exp (get_compiler_messages): Replace with... gcc/testsuite/ * lib/target-supports.exp (get_compiler_messages): Replace with... (check_compile): ...this new procedure. Handle TYPE == executable. Use comments in the source to determine the correct extension. Return a pair containing the compiler output and the output filename. Don't delete the file here. (check_no_compiler_messages_nocache): New procedure. (check_no_compiler_messages): Use it. (check_no_messages_and_pattern_nocache): New procedure. (check_no_messages_and_pattern): Use it. (check_runtime_nocache, check_runtime): New procedures. (check_effective_target_tls): Use check_no_compiler_messages. (check_effective_target_tls_native): Use check_no_messages_and_pattern. (check_effective_target_tls_runtime): Use check_runtime. (check_effective_target_fstack_protector): Likewise. (check_iconv_available): Use check_runtime_nocache. (check_effective_target_fortran_large_real): Use check_no_compiler_messages. (check_effective_target_fortran_large_int): Likewise. (check_effective_target_static_libgfortran): Likewise. (check_750cl_hw_available): Use check_cached_effective_target and check_runtime_nocache. (check_vmx_hw_available): Likewise. (check_effective_target_broken_cplxf_arg): Likewise. (check_alpha_max_hw_available): Use check_runtime. (check_function_available): Use check_no_compiler_messages. (check_cxa_atexit_available): Use check_cached_effective_target and check_runtime_nocache. (check_effective_target_dfp_nocache): Use check_no_compiler_messages_nocache. (check_effective_target_dfprt_nocache): Use check_runtime_nocache. (check_effective_target_dfp): Use check_cached_effective_target. (check_effective_target_dfprt): Likewise. (check_effective_target_arm_neon_hw): Use check_runtime. (check_effective_target_ultrasparc_hw): Likewise. (check_effective_target_c99_runtime): Use check_no_compiler_messages_nocache. From-SVN: r130599
2007-12-04 11:16:17 +01:00
check_runtime_nocache broken_cplxf_arg {
#include <complex.h>
extern void abort (void);
float fabsf (float);
float cabsf (_Complex float);
int main ()
{
_Complex float cf;
float f;
cf = 3 + 4.0fi;
f = cabsf (cf);
if (fabsf (f - 5.0) > 0.0001)
abort ();
return 0;
}
} "-lm"
}
target-supports.exp (get_compiler_messages): Replace with... gcc/testsuite/ * lib/target-supports.exp (get_compiler_messages): Replace with... (check_compile): ...this new procedure. Handle TYPE == executable. Use comments in the source to determine the correct extension. Return a pair containing the compiler output and the output filename. Don't delete the file here. (check_no_compiler_messages_nocache): New procedure. (check_no_compiler_messages): Use it. (check_no_messages_and_pattern_nocache): New procedure. (check_no_messages_and_pattern): Use it. (check_runtime_nocache, check_runtime): New procedures. (check_effective_target_tls): Use check_no_compiler_messages. (check_effective_target_tls_native): Use check_no_messages_and_pattern. (check_effective_target_tls_runtime): Use check_runtime. (check_effective_target_fstack_protector): Likewise. (check_iconv_available): Use check_runtime_nocache. (check_effective_target_fortran_large_real): Use check_no_compiler_messages. (check_effective_target_fortran_large_int): Likewise. (check_effective_target_static_libgfortran): Likewise. (check_750cl_hw_available): Use check_cached_effective_target and check_runtime_nocache. (check_vmx_hw_available): Likewise. (check_effective_target_broken_cplxf_arg): Likewise. (check_alpha_max_hw_available): Use check_runtime. (check_function_available): Use check_no_compiler_messages. (check_cxa_atexit_available): Use check_cached_effective_target and check_runtime_nocache. (check_effective_target_dfp_nocache): Use check_no_compiler_messages_nocache. (check_effective_target_dfprt_nocache): Use check_runtime_nocache. (check_effective_target_dfp): Use check_cached_effective_target. (check_effective_target_dfprt): Likewise. (check_effective_target_arm_neon_hw): Use check_runtime. (check_effective_target_ultrasparc_hw): Likewise. (check_effective_target_c99_runtime): Use check_no_compiler_messages_nocache. From-SVN: r130599
2007-12-04 11:16:17 +01:00
}]
}
proc check_alpha_max_hw_available { } {
target-supports.exp (get_compiler_messages): Replace with... gcc/testsuite/ * lib/target-supports.exp (get_compiler_messages): Replace with... (check_compile): ...this new procedure. Handle TYPE == executable. Use comments in the source to determine the correct extension. Return a pair containing the compiler output and the output filename. Don't delete the file here. (check_no_compiler_messages_nocache): New procedure. (check_no_compiler_messages): Use it. (check_no_messages_and_pattern_nocache): New procedure. (check_no_messages_and_pattern): Use it. (check_runtime_nocache, check_runtime): New procedures. (check_effective_target_tls): Use check_no_compiler_messages. (check_effective_target_tls_native): Use check_no_messages_and_pattern. (check_effective_target_tls_runtime): Use check_runtime. (check_effective_target_fstack_protector): Likewise. (check_iconv_available): Use check_runtime_nocache. (check_effective_target_fortran_large_real): Use check_no_compiler_messages. (check_effective_target_fortran_large_int): Likewise. (check_effective_target_static_libgfortran): Likewise. (check_750cl_hw_available): Use check_cached_effective_target and check_runtime_nocache. (check_vmx_hw_available): Likewise. (check_effective_target_broken_cplxf_arg): Likewise. (check_alpha_max_hw_available): Use check_runtime. (check_function_available): Use check_no_compiler_messages. (check_cxa_atexit_available): Use check_cached_effective_target and check_runtime_nocache. (check_effective_target_dfp_nocache): Use check_no_compiler_messages_nocache. (check_effective_target_dfprt_nocache): Use check_runtime_nocache. (check_effective_target_dfp): Use check_cached_effective_target. (check_effective_target_dfprt): Likewise. (check_effective_target_arm_neon_hw): Use check_runtime. (check_effective_target_ultrasparc_hw): Likewise. (check_effective_target_c99_runtime): Use check_no_compiler_messages_nocache. From-SVN: r130599
2007-12-04 11:16:17 +01:00
return [check_runtime alpha_max_hw_available {
int main() { return __builtin_alpha_amask(1<<8) != 0; }
}]
}
# Returns true iff the FUNCTION is available on the target system.
# (This is essentially a Tcl implementation of Autoconf's
# AC_CHECK_FUNC.)
proc check_function_available { function } {
target-supports.exp (get_compiler_messages): Replace with... gcc/testsuite/ * lib/target-supports.exp (get_compiler_messages): Replace with... (check_compile): ...this new procedure. Handle TYPE == executable. Use comments in the source to determine the correct extension. Return a pair containing the compiler output and the output filename. Don't delete the file here. (check_no_compiler_messages_nocache): New procedure. (check_no_compiler_messages): Use it. (check_no_messages_and_pattern_nocache): New procedure. (check_no_messages_and_pattern): Use it. (check_runtime_nocache, check_runtime): New procedures. (check_effective_target_tls): Use check_no_compiler_messages. (check_effective_target_tls_native): Use check_no_messages_and_pattern. (check_effective_target_tls_runtime): Use check_runtime. (check_effective_target_fstack_protector): Likewise. (check_iconv_available): Use check_runtime_nocache. (check_effective_target_fortran_large_real): Use check_no_compiler_messages. (check_effective_target_fortran_large_int): Likewise. (check_effective_target_static_libgfortran): Likewise. (check_750cl_hw_available): Use check_cached_effective_target and check_runtime_nocache. (check_vmx_hw_available): Likewise. (check_effective_target_broken_cplxf_arg): Likewise. (check_alpha_max_hw_available): Use check_runtime. (check_function_available): Use check_no_compiler_messages. (check_cxa_atexit_available): Use check_cached_effective_target and check_runtime_nocache. (check_effective_target_dfp_nocache): Use check_no_compiler_messages_nocache. (check_effective_target_dfprt_nocache): Use check_runtime_nocache. (check_effective_target_dfp): Use check_cached_effective_target. (check_effective_target_dfprt): Likewise. (check_effective_target_arm_neon_hw): Use check_runtime. (check_effective_target_ultrasparc_hw): Likewise. (check_effective_target_c99_runtime): Use check_no_compiler_messages_nocache. From-SVN: r130599
2007-12-04 11:16:17 +01:00
return [check_no_compiler_messages ${function}_available \
executable [subst {
#ifdef __cplusplus
extern "C"
#endif
char $function ();
int main () { $function (); }
}]]
}
# Returns true iff "fork" is available on the target system.
proc check_fork_available {} {
return [check_function_available "fork"]
}
# Returns true iff "mkfifo" is available on the target system.
proc check_mkfifo_available {} {
if {[istarget *-*-cygwin*]} {
# Cygwin has mkfifo, but support is incomplete.
return 0
}
return [check_function_available "mkfifo"]
}
# Returns true iff "__cxa_atexit" is used on the target system.
proc check_cxa_atexit_available { } {
target-supports.exp (get_compiler_messages): Replace with... gcc/testsuite/ * lib/target-supports.exp (get_compiler_messages): Replace with... (check_compile): ...this new procedure. Handle TYPE == executable. Use comments in the source to determine the correct extension. Return a pair containing the compiler output and the output filename. Don't delete the file here. (check_no_compiler_messages_nocache): New procedure. (check_no_compiler_messages): Use it. (check_no_messages_and_pattern_nocache): New procedure. (check_no_messages_and_pattern): Use it. (check_runtime_nocache, check_runtime): New procedures. (check_effective_target_tls): Use check_no_compiler_messages. (check_effective_target_tls_native): Use check_no_messages_and_pattern. (check_effective_target_tls_runtime): Use check_runtime. (check_effective_target_fstack_protector): Likewise. (check_iconv_available): Use check_runtime_nocache. (check_effective_target_fortran_large_real): Use check_no_compiler_messages. (check_effective_target_fortran_large_int): Likewise. (check_effective_target_static_libgfortran): Likewise. (check_750cl_hw_available): Use check_cached_effective_target and check_runtime_nocache. (check_vmx_hw_available): Likewise. (check_effective_target_broken_cplxf_arg): Likewise. (check_alpha_max_hw_available): Use check_runtime. (check_function_available): Use check_no_compiler_messages. (check_cxa_atexit_available): Use check_cached_effective_target and check_runtime_nocache. (check_effective_target_dfp_nocache): Use check_no_compiler_messages_nocache. (check_effective_target_dfprt_nocache): Use check_runtime_nocache. (check_effective_target_dfp): Use check_cached_effective_target. (check_effective_target_dfprt): Likewise. (check_effective_target_arm_neon_hw): Use check_runtime. (check_effective_target_ultrasparc_hw): Likewise. (check_effective_target_c99_runtime): Use check_no_compiler_messages_nocache. From-SVN: r130599
2007-12-04 11:16:17 +01:00
return [check_cached_effective_target cxa_atexit_available {
if { [istarget "hppa*-*-hpux10*"] } {
# HP-UX 10 doesn't have __cxa_atexit but subsequent test passes.
expr 0
re PR debug/23205 ([C++/unit-at-a-time] stabs debug info omitted for global const variables) * gcc.target/i386/sse4_1-roundps-1.c: Skip for vxworks kernel. * gcc.target/i386/sse4_1-roundpd-1.c: Likewise. * gcc.target/i386/sse4_1-roundps-3.c: Likewise. * gcc.target/i386/sse4_1-roundpd-3.c: Likewise. * gcc.target/i386/sse4_1-roundss-1.c: Likewise. * gcc.target/i386/sse4_1-roundsd-1.c: Likewise. * gcc.target/i386/sse4_1-roundss-3.c: Likewise. * gcc.target/i386/sse4_1-roundsd-3.c: Likewise. * gcc.target/i386/sse4_1-roundps-2.c: Likewise. * gcc.target/i386/sse4_1-roundpd-2.c: Likewise. * gcc.target/i386/sse4_1-roundss-2.c: Likewise. * gcc.target/i386/sse4_1-roundsd-2.c: Likewise. * gcc.target/i386/sse4_1-roundss-4.c: Likewise. * gcc.target/i386/sse4_1-roundsd-4.c: Likewise. * gcc.target/i386/pr37191.c: Likewise. * gcc.target/i386/reload-1.c: Likewise. * g++.old-deja/g++.pt/repo1.C: Skip for vxworks kernel. * g++.old-deja/g++.pt/repo2.C: Likewise. * g++.old-deja/g++.pt/repo3.C: Likewise. * g++.old-deja/g++.pt/repo4.C: Likewise. * g++.old-deja/g++.pt/instantiate4.C: Likewise. * g++.old-deja/g++.pt/instantiate6.C: Likewise. * g++.dg/template/repo1.C: Likewise. * g++.dg/template/repo2.C: Likewise. * g++.dg/template/repo3.C: Likewise. * g++.dg/template/repo4.C: Likewise. * g++.dg/template/repo5.C: Likewise. * g++.dg/template/repo6.C: Likewise. * g++.dg/template/repo7.C: Likewise. * g++.dg/template/repo8.C: Likewise. * g++.dg/template/repo9.C: Likewise. * g++.dg/rtti/repo1.C: Likewise. * gcc.dg/cpp/_Pragma6.c: Skip for vxworks. * g++.dg/cpp/_Pragma1.C: Skip for vxworks. * gcc.dg/pthread-init-1.c: Xfail for vxworks rtp. * g++.dg/other/PR23205.C: Skip for vxworks. * g++.dg/ext/visibility/class1.C: Requires PIC. * g++.dg/eh/async-unwind2.C: Requires PIC. * lib/target-supports.exp (check_cxa_atexit_available): Vxworks does not have cxa_exit. From-SVN: r146926
2009-04-29 10:03:33 +02:00
} elseif { [istarget "*-*-vxworks"] } {
# vxworks doesn't have __cxa_atexit but subsequent test passes.
expr 0
} else {
target-supports.exp (get_compiler_messages): Replace with... gcc/testsuite/ * lib/target-supports.exp (get_compiler_messages): Replace with... (check_compile): ...this new procedure. Handle TYPE == executable. Use comments in the source to determine the correct extension. Return a pair containing the compiler output and the output filename. Don't delete the file here. (check_no_compiler_messages_nocache): New procedure. (check_no_compiler_messages): Use it. (check_no_messages_and_pattern_nocache): New procedure. (check_no_messages_and_pattern): Use it. (check_runtime_nocache, check_runtime): New procedures. (check_effective_target_tls): Use check_no_compiler_messages. (check_effective_target_tls_native): Use check_no_messages_and_pattern. (check_effective_target_tls_runtime): Use check_runtime. (check_effective_target_fstack_protector): Likewise. (check_iconv_available): Use check_runtime_nocache. (check_effective_target_fortran_large_real): Use check_no_compiler_messages. (check_effective_target_fortran_large_int): Likewise. (check_effective_target_static_libgfortran): Likewise. (check_750cl_hw_available): Use check_cached_effective_target and check_runtime_nocache. (check_vmx_hw_available): Likewise. (check_effective_target_broken_cplxf_arg): Likewise. (check_alpha_max_hw_available): Use check_runtime. (check_function_available): Use check_no_compiler_messages. (check_cxa_atexit_available): Use check_cached_effective_target and check_runtime_nocache. (check_effective_target_dfp_nocache): Use check_no_compiler_messages_nocache. (check_effective_target_dfprt_nocache): Use check_runtime_nocache. (check_effective_target_dfp): Use check_cached_effective_target. (check_effective_target_dfprt): Likewise. (check_effective_target_arm_neon_hw): Use check_runtime. (check_effective_target_ultrasparc_hw): Likewise. (check_effective_target_c99_runtime): Use check_no_compiler_messages_nocache. From-SVN: r130599
2007-12-04 11:16:17 +01:00
check_runtime_nocache cxa_atexit_available {
// C++
#include <stdlib.h>
static unsigned int count;
struct X
{
X() { count = 1; }
~X()
{
if (count != 3)
exit(1);
count = 4;
}
};
void f()
{
static X x;
}
struct Y
{
Y() { f(); count = 2; }
~Y()
{
if (count != 2)
exit(1);
count = 3;
}
};
Y y;
int main() { return 0; }
}
}
target-supports.exp (get_compiler_messages): Replace with... gcc/testsuite/ * lib/target-supports.exp (get_compiler_messages): Replace with... (check_compile): ...this new procedure. Handle TYPE == executable. Use comments in the source to determine the correct extension. Return a pair containing the compiler output and the output filename. Don't delete the file here. (check_no_compiler_messages_nocache): New procedure. (check_no_compiler_messages): Use it. (check_no_messages_and_pattern_nocache): New procedure. (check_no_messages_and_pattern): Use it. (check_runtime_nocache, check_runtime): New procedures. (check_effective_target_tls): Use check_no_compiler_messages. (check_effective_target_tls_native): Use check_no_messages_and_pattern. (check_effective_target_tls_runtime): Use check_runtime. (check_effective_target_fstack_protector): Likewise. (check_iconv_available): Use check_runtime_nocache. (check_effective_target_fortran_large_real): Use check_no_compiler_messages. (check_effective_target_fortran_large_int): Likewise. (check_effective_target_static_libgfortran): Likewise. (check_750cl_hw_available): Use check_cached_effective_target and check_runtime_nocache. (check_vmx_hw_available): Likewise. (check_effective_target_broken_cplxf_arg): Likewise. (check_alpha_max_hw_available): Use check_runtime. (check_function_available): Use check_no_compiler_messages. (check_cxa_atexit_available): Use check_cached_effective_target and check_runtime_nocache. (check_effective_target_dfp_nocache): Use check_no_compiler_messages_nocache. (check_effective_target_dfprt_nocache): Use check_runtime_nocache. (check_effective_target_dfp): Use check_cached_effective_target. (check_effective_target_dfprt): Likewise. (check_effective_target_arm_neon_hw): Use check_runtime. (check_effective_target_ultrasparc_hw): Likewise. (check_effective_target_c99_runtime): Use check_no_compiler_messages_nocache. From-SVN: r130599
2007-12-04 11:16:17 +01:00
}]
}
# Return 1 if we're generating 32-bit code using default options, 0
# otherwise.
proc check_effective_target_ilp32 { } {
return [check_no_compiler_messages ilp32 object {
int dummy[sizeof (int) == 4
&& sizeof (void *) == 4
&& sizeof (long) == 4 ? 1 : -1];
}]
}
target-supports.exp (check_effective_target_int32plus): New. * lib/target-supports.exp (check_effective_target_int32plus): New. (check_effective_target_ptr32plus): New. (check_effective_target_size32plus): New. (check_effective_target_int16): New. (check_profiling_available): Add m32c to the list of unsupported targets. * gcc.c-torture/compile/20000804-1.c: Skip m32c also. * gcc.c-torture/compile/20001226-1.c: Skip m32c due to small memory size. * gcc.c-torture/compile/20010327-1.c: Skip m32c due to non-SI pointers. * gcc.c-torture/compile/20020604-1.c: Skip m32c due to small size_t. * gcc.c-torture/compile/20050303-1.c: Require >=32 bit integers and size_t. * gcc.c-torture/compile/980506-1.c: Require >=32 bit size_t. * gcc.c-torture/execute/20020404-1.x: Check for any 16 bit target, not just xstormy16. Skip m32c due to weird pointer size. * gcc.c-torture/execute/20021024-1.x: Check for any 16 bit target, not just xstormy16. * gcc.c-torture/execute/shiftdi.x: Check for any 16 bit target, not just xstormy16. * gcc.dg/20020312-2.c: Add m32c support. * gcc.dg/20040622-2.c: Require >=32 bit pointers. * gcc.dg/20050321-1.c: XFail m32c due to incorrect malloc prototype in test. * gcc.dg/20050321-2.c: Require >=32 bit integers. * gcc.dg/asm-1.c: Skip if int and short are the same size. * gcc.dg/fold-mod-1.c: Require >=32 bit integers. * gcc.dg/fold-overflow-1.c: Skip m32c due to small const types in asm. * gcc.dg/format/bitfld-1.c: Require >=32 bit integers due to printf formats * gcc.dg/init-string-2.c: Require >=32 bit integers. * gcc.dg/max-1.c: Skip m32c in r8c or m16c mode due to small pointers. * gcc.dg/noncompile/920923-1.c: Skip small-int message for int16 hosts. * gcc.dg/pch/struct-1.c: Require >= 32 bit integers. * gcc.dg/pr14796-2.c: Require >=32 bit integers. * gcc.dg/pr17112-1.c: Require >=32 bit integers. * gcc.dg/pr18241-1.c: XFail m32c due to incorrect memset prototype in test. * gcc.dg/pr18241-2.c: XFail m32c due to incorrect memset prototype in test. * gcc.dg/pr19340.c: Skip m32c due to lack of scheduling. * gcc.dg/pr23049.c: Require >=32 bit integers. * gcc.dg/torture/pr26565.c: Skip m32c as everything is already packed. * gcc.dg/torture/pr26587.c: Require >=32 bit integers. * gcc.dg/torture/pr26630.c: Require >=32 bit integers. * gcc.dg/tree-ssa/loop-10.c: Require >=32 bit integers. * gcc.dg/tree-ssa/loop-2.c: Require >=32 bit size_t. * gcc.dg/tree-ssa/loop-4.c: Require >=32 bit size_t. * gcc.dg/tree-ssa/ltrans-1.c: Require >=32 bit size_t. * gcc.dg/tree-ssa/ltrans-2.c: Require >=32 bit size_t. * gcc.dg/tree-ssa/ltrans-3.c: Require >=32 bit size_t. * gcc.dg/tree-ssa/ltrans-4.c: Require >=32 bit size_t. * gcc.dg/tree-ssa/pr14341.c: Require >=32 bit integers. * gcc.dg/tree-ssa/pr23382.c: XFail m32c due to incorrect malloc prototype in test. * gcc.dg/tree-ssa/pr24627.c: Require >=32 bit integers. * gcc.dg/tree-ssa/pr26180.c: Require >=32 bit integers. * gcc.dg/tree-ssa/vrp14.c: Require >=32 bit integers. * gcc.dg/tree-ssa/vrp21.c: Require >=32 bit integers. * gcc.dg/tree-ssa/vrp22.c: Require >=32 bit integers. * gcc.c-torture/execute/20040629-1.x: New. Require >16 bit integers. * gcc.c-torture/execute/20040703-1.x: Likewise. * gcc.c-torture/execute/20040705-1.x: Likewise. * gcc.c-torture/execute/20040705-2.x: Likewise. * gcc.c-torture/execute/20040709-1.x: Likewise. * gcc.c-torture/execute/20040709-2.x: Likewise. * gcc.c-torture/execute/20040811-1.x: Likewise. * gcc.c-torture/execute/20050316-1.x: Likewise. * gcc.c-torture/execute/bitfld-4.x: Likewise. * gcc.c-torture/execute/pr19689.x: Likewise. * gcc.c-torture/execute/pr7284-1.x: Likewise. * gcc.c-torture/execute/usmul.x: Likewise. * gcc.c-torture/execute/vrp-5.x: Likewise. * gcc.c-torture/execute/vrp-6.x: Likewise. * gcc.dg/debug/20041023-1.s: Likewise. From-SVN: r112934
2006-04-14 01:14:25 +02:00
# Return 1 if we're generating 32-bit or larger integers using default
# options, 0 otherwise.
proc check_effective_target_int32plus { } {
return [check_no_compiler_messages int32plus object {
int dummy[sizeof (int) >= 4 ? 1 : -1];
}]
}
# Return 1 if we're generating 32-bit or larger pointers using default
# options, 0 otherwise.
proc check_effective_target_ptr32plus { } {
return [check_no_compiler_messages ptr32plus object {
int dummy[sizeof (void *) >= 4 ? 1 : -1];
}]
}
# Return 1 if we support 32-bit or larger array and structure sizes
# using default options, 0 otherwise.
proc check_effective_target_size32plus { } {
return [check_no_compiler_messages size32plus object {
char dummy[65537];
}]
}
# Returns 1 if we're generating 16-bit or smaller integers with the
# default options, 0 otherwise.
proc check_effective_target_int16 { } {
return [check_no_compiler_messages int16 object {
int dummy[sizeof (int) < 4 ? 1 : -1];
}]
}
# Return 1 if we're generating 64-bit code using default options, 0
# otherwise.
proc check_effective_target_lp64 { } {
return [check_no_compiler_messages lp64 object {
int dummy[sizeof (int) == 4
&& sizeof (void *) == 8
&& sizeof (long) == 8 ? 1 : -1];
}]
}
# Return 1 if we're generating 64-bit code using default llp64 options,
# 0 otherwise.
proc check_effective_target_llp64 { } {
return [check_no_compiler_messages llp64 object {
int dummy[sizeof (int) == 4
&& sizeof (void *) == 8
&& sizeof (long long) == 8
&& sizeof (long) == 4 ? 1 : -1];
}]
}
# Return 1 if the target supports long double larger than double,
# 0 otherwise.
proc check_effective_target_large_long_double { } {
return [check_no_compiler_messages large_long_double object {
int dummy[sizeof(long double) > sizeof(double) ? 1 : -1];
}]
}
# Return 1 if the target supports double larger than float,
# 0 otherwise.
proc check_effective_target_large_double { } {
return [check_no_compiler_messages large_double object {
int dummy[sizeof(double) > sizeof(float) ? 1 : -1];
}]
}
# Return 1 if the target supports double of 64 bits,
# 0 otherwise.
proc check_effective_target_double64 { } {
return [check_no_compiler_messages double64 object {
int dummy[sizeof(double) == 8 ? 1 : -1];
}]
}
# Return 1 if the target supports double of at least 64 bits,
# 0 otherwise.
proc check_effective_target_double64plus { } {
return [check_no_compiler_messages double64plus object {
int dummy[sizeof(double) >= 8 ? 1 : -1];
}]
}
target-supports.exp (check_effective_target_fixed_point): New to check if targets have fixed-point supports. * lib/target-supports.exp (check_effective_target_fixed_point): New to check if targets have fixed-point supports. * gcc.dg/fixed-point/fixed-point.exp: New file. * gcc.dg/fixed-point/addsub.c, gcc.dg/fixed-point/allconv.c, * gcc.dg/fixed-point/allop.c, gcc.dg/fixed-point/call-by-value.c, * gcc.dg/fixed-point/cast-bad.c, gcc.dg/fixed-point/composite-type.c, * gcc.dg/fixed-point/const-1.c, gcc.dg/fixed-point/constant.c, * gcc.dg/fixed-point/constants-pedantic.c, * gcc.dg/fixed-point/convert.c, gcc.dg/fixed-point/define.c, * gcc.dg/fixed-point/keywords-c89.c, gcc.dg/fixed-point/keywords-c99.c, * gcc.dg/fixed-point/keywords-ignored-c99.c, * gcc.dg/fixed-point/keywords-pedantic.c, * gcc.dg/fixed-point/keywords-reserved.c, gcc.dg/fixed-point/binary.c, * gcc.dg/fixed-point/modes.c, gcc.dg/fixed-point/noassoc.c, * gcc.dg/fixed-point/types.c, gcc.dg/fixed-point/typespec.c, * gcc.dg/fixed-point/unary.c, gcc.dg/fixed-point/func-array.c, * gcc.dg/fixed-point/func-scalar.c, gcc.dg/fixed-point/func-struct.c, * gcc.dg/fixed-point/func-vararg-mixed.c, * gcc.dg/fixed-point/operator-logical.c, * gcc.dg/fixed-point/struct-union.c, * gcc.dg/fixed-point/bit-complement.c, * gcc.dg/fixed-point/operator-bitwise.c, * gcc.dg/fixed-point/operator-comma.c, * gcc.dg/fixed-point/struct-layout-1.c, * gcc.dg/fixed-point/union-init.c, * gcc.dg/fixed-point/Wbad-function-cast-1.c, * gcc.dg/fixed-point/func-mixed.c, * gcc.dg/fixed-point/func-vararg-size0.c, * gcc.dg/fixed-point/func-vararg.c, gcc.dg/fixed-point/int-warning.c, * gcc.dg/fixed-point/loop-index.c, gcc.dg/fixed-point/operator-cond.c, * gcc.dg/fixed-point/operator-unary.c, * gcc.dg/fixed-point/allop-const.c, * gcc.dg/fixed-point/muldiv-warning.c, * gcc.dg/nofixed-point-1.c, * gcc.target/mips/dpaq_sa_l_w.c, gcc.target/mips/dpsq_sa_l_w.c, * gcc.target/mips/fixed-vector-type.c, * gcc.target/mips/fixed-scalar-type.c: New tests. From-SVN: r128661
2007-09-22 02:27:56 +02:00
# Return 1 if the target supports compiling fixed-point,
# 0 otherwise.
proc check_effective_target_fixed_point { } {
return [check_no_compiler_messages fixed_point object {
_Sat _Fract x; _Sat _Accum y;
}]
}
# Return 1 if the target supports compiling decimal floating point,
# 0 otherwise.
proc check_effective_target_dfp_nocache { } {
verbose "check_effective_target_dfp_nocache: compiling source" 2
target-supports.exp (get_compiler_messages): Replace with... gcc/testsuite/ * lib/target-supports.exp (get_compiler_messages): Replace with... (check_compile): ...this new procedure. Handle TYPE == executable. Use comments in the source to determine the correct extension. Return a pair containing the compiler output and the output filename. Don't delete the file here. (check_no_compiler_messages_nocache): New procedure. (check_no_compiler_messages): Use it. (check_no_messages_and_pattern_nocache): New procedure. (check_no_messages_and_pattern): Use it. (check_runtime_nocache, check_runtime): New procedures. (check_effective_target_tls): Use check_no_compiler_messages. (check_effective_target_tls_native): Use check_no_messages_and_pattern. (check_effective_target_tls_runtime): Use check_runtime. (check_effective_target_fstack_protector): Likewise. (check_iconv_available): Use check_runtime_nocache. (check_effective_target_fortran_large_real): Use check_no_compiler_messages. (check_effective_target_fortran_large_int): Likewise. (check_effective_target_static_libgfortran): Likewise. (check_750cl_hw_available): Use check_cached_effective_target and check_runtime_nocache. (check_vmx_hw_available): Likewise. (check_effective_target_broken_cplxf_arg): Likewise. (check_alpha_max_hw_available): Use check_runtime. (check_function_available): Use check_no_compiler_messages. (check_cxa_atexit_available): Use check_cached_effective_target and check_runtime_nocache. (check_effective_target_dfp_nocache): Use check_no_compiler_messages_nocache. (check_effective_target_dfprt_nocache): Use check_runtime_nocache. (check_effective_target_dfp): Use check_cached_effective_target. (check_effective_target_dfprt): Likewise. (check_effective_target_arm_neon_hw): Use check_runtime. (check_effective_target_ultrasparc_hw): Likewise. (check_effective_target_c99_runtime): Use check_no_compiler_messages_nocache. From-SVN: r130599
2007-12-04 11:16:17 +01:00
set ret [check_no_compiler_messages_nocache dfp object {
_Decimal32 x; _Decimal64 y; _Decimal128 z;
target-supports.exp (get_compiler_messages): Replace with... gcc/testsuite/ * lib/target-supports.exp (get_compiler_messages): Replace with... (check_compile): ...this new procedure. Handle TYPE == executable. Use comments in the source to determine the correct extension. Return a pair containing the compiler output and the output filename. Don't delete the file here. (check_no_compiler_messages_nocache): New procedure. (check_no_compiler_messages): Use it. (check_no_messages_and_pattern_nocache): New procedure. (check_no_messages_and_pattern): Use it. (check_runtime_nocache, check_runtime): New procedures. (check_effective_target_tls): Use check_no_compiler_messages. (check_effective_target_tls_native): Use check_no_messages_and_pattern. (check_effective_target_tls_runtime): Use check_runtime. (check_effective_target_fstack_protector): Likewise. (check_iconv_available): Use check_runtime_nocache. (check_effective_target_fortran_large_real): Use check_no_compiler_messages. (check_effective_target_fortran_large_int): Likewise. (check_effective_target_static_libgfortran): Likewise. (check_750cl_hw_available): Use check_cached_effective_target and check_runtime_nocache. (check_vmx_hw_available): Likewise. (check_effective_target_broken_cplxf_arg): Likewise. (check_alpha_max_hw_available): Use check_runtime. (check_function_available): Use check_no_compiler_messages. (check_cxa_atexit_available): Use check_cached_effective_target and check_runtime_nocache. (check_effective_target_dfp_nocache): Use check_no_compiler_messages_nocache. (check_effective_target_dfprt_nocache): Use check_runtime_nocache. (check_effective_target_dfp): Use check_cached_effective_target. (check_effective_target_dfprt): Likewise. (check_effective_target_arm_neon_hw): Use check_runtime. (check_effective_target_ultrasparc_hw): Likewise. (check_effective_target_c99_runtime): Use check_no_compiler_messages_nocache. From-SVN: r130599
2007-12-04 11:16:17 +01:00
}]
verbose "check_effective_target_dfp_nocache: returning $ret" 2
return $ret
}
proc check_effective_target_dfprt_nocache { } {
target-supports.exp (get_compiler_messages): Replace with... gcc/testsuite/ * lib/target-supports.exp (get_compiler_messages): Replace with... (check_compile): ...this new procedure. Handle TYPE == executable. Use comments in the source to determine the correct extension. Return a pair containing the compiler output and the output filename. Don't delete the file here. (check_no_compiler_messages_nocache): New procedure. (check_no_compiler_messages): Use it. (check_no_messages_and_pattern_nocache): New procedure. (check_no_messages_and_pattern): Use it. (check_runtime_nocache, check_runtime): New procedures. (check_effective_target_tls): Use check_no_compiler_messages. (check_effective_target_tls_native): Use check_no_messages_and_pattern. (check_effective_target_tls_runtime): Use check_runtime. (check_effective_target_fstack_protector): Likewise. (check_iconv_available): Use check_runtime_nocache. (check_effective_target_fortran_large_real): Use check_no_compiler_messages. (check_effective_target_fortran_large_int): Likewise. (check_effective_target_static_libgfortran): Likewise. (check_750cl_hw_available): Use check_cached_effective_target and check_runtime_nocache. (check_vmx_hw_available): Likewise. (check_effective_target_broken_cplxf_arg): Likewise. (check_alpha_max_hw_available): Use check_runtime. (check_function_available): Use check_no_compiler_messages. (check_cxa_atexit_available): Use check_cached_effective_target and check_runtime_nocache. (check_effective_target_dfp_nocache): Use check_no_compiler_messages_nocache. (check_effective_target_dfprt_nocache): Use check_runtime_nocache. (check_effective_target_dfp): Use check_cached_effective_target. (check_effective_target_dfprt): Likewise. (check_effective_target_arm_neon_hw): Use check_runtime. (check_effective_target_ultrasparc_hw): Likewise. (check_effective_target_c99_runtime): Use check_no_compiler_messages_nocache. From-SVN: r130599
2007-12-04 11:16:17 +01:00
return [check_runtime_nocache dfprt {
_Decimal32 x = 1.2df; _Decimal64 y = 2.3dd; _Decimal128 z;
int main () { z = x + y; return 0; }
}]
}
# Return 1 if the target supports compiling Decimal Floating Point,
# 0 otherwise.
nodfp-1.c: New test. * gcc.dg/nodfp-1.c: New test. * gcc.dg/compat/scalar-return-dfp_x.c: Likewise. * gcc.dg/compat/scalar-return-dfp_x.c: Likewise. * gcc.dg/compat/scalar-return-dfp_main.c: Likewise. * gcc.dg/compat/scalar-by-value-dfp_main.c: Likewise. * gcc.dg/compat/scalar-by-value-dfp_x.c: Likewise. * gcc.dg/compat/scalar-return-dfp_y.c: Likewise. * gcc.dg/compat/scalar-by-value-dfp_y.c: Likewise. * gcc.dg/debug/dwarf2/dwarf-float.c: Likewise. * gcc.dg/debug/dwarf2/dwarf-dfp.c: Likewise. * gcc.dg/format/dfp-scanf-1.c: Likewise. * gcc.dg/format/dfp-printf-1.c: Likewise. * gcc.dg/compat/struct-layout-1.exp: Use c-compat.exp. (compat_setup_dfp): New. * gcc.dg/compat/compat.exp: Use it. (compat-use-alt-compiler, compat-use-tst-compiler): Move to new file. Make some variables global, prepend "compat_" to their names. * gcc.dg/compat/struct-layout-1.h: Conditional DFP support. * gcc.dg/compat/struct-layout-1_generate.c: Ditto. * gcc.misc-tests/dectest.exp: New test driver for decTest. * lib/compat.exp (compat_skip_list): Make global, rename. * lib/c-compat.exp: New file. * lib/target-supports.exp (check_effective_target_dfp): New. * gcc.dg/dfp/dec-eval-method.c, gcc.dg/dfp/func-array.c, gcc.dg/dfp/convert-dfp-fold.c, gcc.dg/dfp/struct-union.c, gcc.dg/dfp/compare-rel.h, gcc.dg/dfp/convert-dfp-round.c, gcc.dg/dfp/func-struct.c, gcc.dg/dfp/constants-c99.c, gcc.dg/dfp/compare-eq-d32.c, gcc.dg/dfp/func-vararg-mixed.c, gcc.dg/dfp/compare-rel-d128.c, gcc.dg/dfp/operator-comma.c, gcc.dg/dfp/decfloat-constants.c, gcc.dg/dfp/operator-bitwise.c, gcc.dg/dfp/func-mixed.c, gcc.dg/dfp/compare-eq-dfp.c, gcc.dg/dfp/operator-assignment.c, gcc.dg/dfp/dfp-round.h, gcc.dg/dfp/modes.c, gcc.dg/dfp/keywords-c99.c, gcc.dg/dfp/nan-1.c, gcc.dg/dfp/loop-index.c, gcc.dg/dfp/compare-eq-d64.c, gcc.dg/dfp/convert-bfp.c, gcc.dg/dfp/usual-arith-conv-const.c, gcc.dg/dfp/convert-dfp.c, gcc.dg/dfp/compare-rel-const.c, gcc.dg/dfp/convert-int-fold.c, gcc.dg/dfp/keywords-pedantic.c, gcc.dg/dfp/compare-rel-d32.c, gcc.dg/dfp/call-by-value.c, gcc.dg/dfp/constants-hex.c, gcc.dg/dfp/func-scalar.c, gcc.dg/dfp/keywords-ignored-c99.c, gcc.dg/dfp/snan.c, gcc.dg/dfp/usual-arith-conv.c, gcc.dg/dfp/constants-pedantic.c, gcc.dg/dfp/operator-logical.c, gcc.dg/dfp/compare-eq-d128.c, gcc.dg/dfp/convert-bfp-fold.c, gcc.dg/dfp/ctypes.c, gcc.dg/dfp/convert-int.c, gcc.dg/dfp/keywords-c89.c, gcc.dg/dfp/constants.c, gcc.dg/dfp/compare-rel-dfp.c, gcc.dg/dfp/compare-eq-const.c, gcc.dg/dfp/cast-bad.c, gcc.dg/dfp/operator-arith-fold.c, gcc.dg/dfp/union-init.c, gcc.dg/dfp/struct-layout-1.c, gcc.dg/dfp/compare-eq.hgcc.dg/dfp/convert-int-saturate.c, gcc.dg/dfp/compare-rel-d64.c, gcc.dg/dfp/func-vararg-size0.c, gcc.dg/dfp/Wconversion-2.c, gcc.dg/dfp/nan-2.c, gcc.dg/dfp/operator-cond.c, gcc.dg/dfp/composite-type.c, gcc.dg/dfp/func-vararg-dfp.c, gcc.dg/dfp/dfp.expgcc.dg/dfp/keywords-reserved.c, gcc.dg/dfp/convert-complex.c, gcc.dg/dfp/Wbad-function-cast-1.c, gcc.dg/dfp/operator-unary.c, gcc.dg/dfp/altivec-types.c, gcc.dg/dfp/cast.c, gcc.dg/dfp/typespec.c, gcc.dg/dfp/wtr-conversion-1.c: New tests. Co-Authored-By: Ben Elliston <bje@au.ibm.com> Co-Authored-By: Jon Grimm <jgrimm2@us.ibm.com> Co-Authored-By: Yao Qi <qiyaoltc@cn.ibm.com> From-SVN: r109604
2006-01-11 22:29:59 +01:00
#
# This won't change for different subtargets so cache the result.
proc check_effective_target_dfp { } {
target-supports.exp (get_compiler_messages): Replace with... gcc/testsuite/ * lib/target-supports.exp (get_compiler_messages): Replace with... (check_compile): ...this new procedure. Handle TYPE == executable. Use comments in the source to determine the correct extension. Return a pair containing the compiler output and the output filename. Don't delete the file here. (check_no_compiler_messages_nocache): New procedure. (check_no_compiler_messages): Use it. (check_no_messages_and_pattern_nocache): New procedure. (check_no_messages_and_pattern): Use it. (check_runtime_nocache, check_runtime): New procedures. (check_effective_target_tls): Use check_no_compiler_messages. (check_effective_target_tls_native): Use check_no_messages_and_pattern. (check_effective_target_tls_runtime): Use check_runtime. (check_effective_target_fstack_protector): Likewise. (check_iconv_available): Use check_runtime_nocache. (check_effective_target_fortran_large_real): Use check_no_compiler_messages. (check_effective_target_fortran_large_int): Likewise. (check_effective_target_static_libgfortran): Likewise. (check_750cl_hw_available): Use check_cached_effective_target and check_runtime_nocache. (check_vmx_hw_available): Likewise. (check_effective_target_broken_cplxf_arg): Likewise. (check_alpha_max_hw_available): Use check_runtime. (check_function_available): Use check_no_compiler_messages. (check_cxa_atexit_available): Use check_cached_effective_target and check_runtime_nocache. (check_effective_target_dfp_nocache): Use check_no_compiler_messages_nocache. (check_effective_target_dfprt_nocache): Use check_runtime_nocache. (check_effective_target_dfp): Use check_cached_effective_target. (check_effective_target_dfprt): Likewise. (check_effective_target_arm_neon_hw): Use check_runtime. (check_effective_target_ultrasparc_hw): Likewise. (check_effective_target_c99_runtime): Use check_no_compiler_messages_nocache. From-SVN: r130599
2007-12-04 11:16:17 +01:00
return [check_cached_effective_target dfp {
check_effective_target_dfp_nocache
}]
nodfp-1.c: New test. * gcc.dg/nodfp-1.c: New test. * gcc.dg/compat/scalar-return-dfp_x.c: Likewise. * gcc.dg/compat/scalar-return-dfp_x.c: Likewise. * gcc.dg/compat/scalar-return-dfp_main.c: Likewise. * gcc.dg/compat/scalar-by-value-dfp_main.c: Likewise. * gcc.dg/compat/scalar-by-value-dfp_x.c: Likewise. * gcc.dg/compat/scalar-return-dfp_y.c: Likewise. * gcc.dg/compat/scalar-by-value-dfp_y.c: Likewise. * gcc.dg/debug/dwarf2/dwarf-float.c: Likewise. * gcc.dg/debug/dwarf2/dwarf-dfp.c: Likewise. * gcc.dg/format/dfp-scanf-1.c: Likewise. * gcc.dg/format/dfp-printf-1.c: Likewise. * gcc.dg/compat/struct-layout-1.exp: Use c-compat.exp. (compat_setup_dfp): New. * gcc.dg/compat/compat.exp: Use it. (compat-use-alt-compiler, compat-use-tst-compiler): Move to new file. Make some variables global, prepend "compat_" to their names. * gcc.dg/compat/struct-layout-1.h: Conditional DFP support. * gcc.dg/compat/struct-layout-1_generate.c: Ditto. * gcc.misc-tests/dectest.exp: New test driver for decTest. * lib/compat.exp (compat_skip_list): Make global, rename. * lib/c-compat.exp: New file. * lib/target-supports.exp (check_effective_target_dfp): New. * gcc.dg/dfp/dec-eval-method.c, gcc.dg/dfp/func-array.c, gcc.dg/dfp/convert-dfp-fold.c, gcc.dg/dfp/struct-union.c, gcc.dg/dfp/compare-rel.h, gcc.dg/dfp/convert-dfp-round.c, gcc.dg/dfp/func-struct.c, gcc.dg/dfp/constants-c99.c, gcc.dg/dfp/compare-eq-d32.c, gcc.dg/dfp/func-vararg-mixed.c, gcc.dg/dfp/compare-rel-d128.c, gcc.dg/dfp/operator-comma.c, gcc.dg/dfp/decfloat-constants.c, gcc.dg/dfp/operator-bitwise.c, gcc.dg/dfp/func-mixed.c, gcc.dg/dfp/compare-eq-dfp.c, gcc.dg/dfp/operator-assignment.c, gcc.dg/dfp/dfp-round.h, gcc.dg/dfp/modes.c, gcc.dg/dfp/keywords-c99.c, gcc.dg/dfp/nan-1.c, gcc.dg/dfp/loop-index.c, gcc.dg/dfp/compare-eq-d64.c, gcc.dg/dfp/convert-bfp.c, gcc.dg/dfp/usual-arith-conv-const.c, gcc.dg/dfp/convert-dfp.c, gcc.dg/dfp/compare-rel-const.c, gcc.dg/dfp/convert-int-fold.c, gcc.dg/dfp/keywords-pedantic.c, gcc.dg/dfp/compare-rel-d32.c, gcc.dg/dfp/call-by-value.c, gcc.dg/dfp/constants-hex.c, gcc.dg/dfp/func-scalar.c, gcc.dg/dfp/keywords-ignored-c99.c, gcc.dg/dfp/snan.c, gcc.dg/dfp/usual-arith-conv.c, gcc.dg/dfp/constants-pedantic.c, gcc.dg/dfp/operator-logical.c, gcc.dg/dfp/compare-eq-d128.c, gcc.dg/dfp/convert-bfp-fold.c, gcc.dg/dfp/ctypes.c, gcc.dg/dfp/convert-int.c, gcc.dg/dfp/keywords-c89.c, gcc.dg/dfp/constants.c, gcc.dg/dfp/compare-rel-dfp.c, gcc.dg/dfp/compare-eq-const.c, gcc.dg/dfp/cast-bad.c, gcc.dg/dfp/operator-arith-fold.c, gcc.dg/dfp/union-init.c, gcc.dg/dfp/struct-layout-1.c, gcc.dg/dfp/compare-eq.hgcc.dg/dfp/convert-int-saturate.c, gcc.dg/dfp/compare-rel-d64.c, gcc.dg/dfp/func-vararg-size0.c, gcc.dg/dfp/Wconversion-2.c, gcc.dg/dfp/nan-2.c, gcc.dg/dfp/operator-cond.c, gcc.dg/dfp/composite-type.c, gcc.dg/dfp/func-vararg-dfp.c, gcc.dg/dfp/dfp.expgcc.dg/dfp/keywords-reserved.c, gcc.dg/dfp/convert-complex.c, gcc.dg/dfp/Wbad-function-cast-1.c, gcc.dg/dfp/operator-unary.c, gcc.dg/dfp/altivec-types.c, gcc.dg/dfp/cast.c, gcc.dg/dfp/typespec.c, gcc.dg/dfp/wtr-conversion-1.c: New tests. Co-Authored-By: Ben Elliston <bje@au.ibm.com> Co-Authored-By: Jon Grimm <jgrimm2@us.ibm.com> Co-Authored-By: Yao Qi <qiyaoltc@cn.ibm.com> From-SVN: r109604
2006-01-11 22:29:59 +01:00
}
# Return 1 if the target supports linking and executing Decimal Floating
# Point, # 0 otherwise.
#
# This won't change for different subtargets so cache the result.
proc check_effective_target_dfprt { } {
target-supports.exp (get_compiler_messages): Replace with... gcc/testsuite/ * lib/target-supports.exp (get_compiler_messages): Replace with... (check_compile): ...this new procedure. Handle TYPE == executable. Use comments in the source to determine the correct extension. Return a pair containing the compiler output and the output filename. Don't delete the file here. (check_no_compiler_messages_nocache): New procedure. (check_no_compiler_messages): Use it. (check_no_messages_and_pattern_nocache): New procedure. (check_no_messages_and_pattern): Use it. (check_runtime_nocache, check_runtime): New procedures. (check_effective_target_tls): Use check_no_compiler_messages. (check_effective_target_tls_native): Use check_no_messages_and_pattern. (check_effective_target_tls_runtime): Use check_runtime. (check_effective_target_fstack_protector): Likewise. (check_iconv_available): Use check_runtime_nocache. (check_effective_target_fortran_large_real): Use check_no_compiler_messages. (check_effective_target_fortran_large_int): Likewise. (check_effective_target_static_libgfortran): Likewise. (check_750cl_hw_available): Use check_cached_effective_target and check_runtime_nocache. (check_vmx_hw_available): Likewise. (check_effective_target_broken_cplxf_arg): Likewise. (check_alpha_max_hw_available): Use check_runtime. (check_function_available): Use check_no_compiler_messages. (check_cxa_atexit_available): Use check_cached_effective_target and check_runtime_nocache. (check_effective_target_dfp_nocache): Use check_no_compiler_messages_nocache. (check_effective_target_dfprt_nocache): Use check_runtime_nocache. (check_effective_target_dfp): Use check_cached_effective_target. (check_effective_target_dfprt): Likewise. (check_effective_target_arm_neon_hw): Use check_runtime. (check_effective_target_ultrasparc_hw): Likewise. (check_effective_target_c99_runtime): Use check_no_compiler_messages_nocache. From-SVN: r130599
2007-12-04 11:16:17 +01:00
return [check_cached_effective_target dfprt {
check_effective_target_dfprt_nocache
}]
}
# Return 1 if the target needs a command line argument to enable a SIMD
# instruction set.
proc check_effective_target_vect_cmdline_needed { } {
global et_vect_cmdline_needed_saved
global et_vect_cmdline_needed_target_name
if { ![info exists et_vect_cmdline_needed_target_name] } {
set et_vect_cmdline_needed_target_name ""
}
# If the target has changed since we set the cached value, clear it.
set current_target [current_target_name]
if { $current_target != $et_vect_cmdline_needed_target_name } {
verbose "check_effective_target_vect_cmdline_needed: `$et_vect_cmdline_needed_target_name' `$current_target'" 2
set et_vect_cmdline_needed_target_name $current_target
if { [info exists et_vect_cmdline_needed_saved] } {
verbose "check_effective_target_vect_cmdline_needed: removing cached result" 2
unset et_vect_cmdline_needed_saved
}
}
if [info exists et_vect_cmdline_needed_saved] {
verbose "check_effective_target_vect_cmdline_needed: using cached result" 2
} else {
set et_vect_cmdline_needed_saved 1
if { [istarget ia64-*-*]
|| (([istarget x86_64-*-*] || [istarget i?86-*-*])
&& [check_effective_target_lp64])
|| ([istarget powerpc*-*-*]
&& ([check_effective_target_powerpc_spe]
|| [check_effective_target_powerpc_altivec]))
|| [istarget spu-*-*]
|| ([istarget arm*-*-*] && [check_effective_target_arm_neon]) } {
set et_vect_cmdline_needed_saved 0
}
}
verbose "check_effective_target_vect_cmdline_needed: returning $et_vect_cmdline_needed_saved" 2
return $et_vect_cmdline_needed_saved
}
target-supports.exp (check_effective_target_vect_int): New * lib/target-supports.exp (check_effective_target_vect_int): New (check_effective_target_vect_float): New (check_effective_target_vect_double): New. (is-effective-target): Support new effective targets keywords. * gcc.dg/vect/vect.exp: Set target-dependent vector flags and default action for dg-do. * gcc.dg/vect/pr16105.c: Use new support. * gcc.dg/vect/pr18400.c: Ditto. * gcc.dg/vect/pr18425.c: Ditto. * gcc.dg/vect/vect-1.c: Ditto. * gcc.dg/vect/vect-10.c: Ditto. * gcc.dg/vect/vect-11.c: Ditto. * gcc.dg/vect/vect-12.c: Ditto. * gcc.dg/vect/vect-13.c: Ditto. * gcc.dg/vect/vect-14.c: Ditto. * gcc.dg/vect/vect-15.c: Ditto. * gcc.dg/vect/vect-16.c: Ditto. * gcc.dg/vect/vect-17.c: Ditto. * gcc.dg/vect/vect-18.c: Ditto. * gcc.dg/vect/vect-19.c: Ditto. * gcc.dg/vect/vect-2.c: Ditto. * gcc.dg/vect/vect-20.c: Ditto. * gcc.dg/vect/vect-21.c: Ditto. * gcc.dg/vect/vect-22.c: Ditto. * gcc.dg/vect/vect-23.c: Ditto. * gcc.dg/vect/vect-24.c: Ditto. * gcc.dg/vect/vect-25.c: Ditto. * gcc.dg/vect/vect-26.c: Ditto. * gcc.dg/vect/vect-27.c: Ditto. * gcc.dg/vect/vect-27a.c: Ditto. * gcc.dg/vect/vect-28.c: Ditto. * gcc.dg/vect/vect-29.c: Ditto. * gcc.dg/vect/vect-29a.c: Ditto. * gcc.dg/vect/vect-3.c: Ditto. * gcc.dg/vect/vect-30.c: Ditto. * gcc.dg/vect/vect-31.c: Ditto. * gcc.dg/vect/vect-32.c: Ditto. * gcc.dg/vect/vect-33.c: Ditto. * gcc.dg/vect/vect-34.c: Ditto. * gcc.dg/vect/vect-35.c: Ditto. * gcc.dg/vect/vect-36.c: Ditto. * gcc.dg/vect/vect-37.c: Ditto. * gcc.dg/vect/vect-38.c: Ditto. * gcc.dg/vect/vect-4.c: Ditto. * gcc.dg/vect/vect-40.c: Ditto. * gcc.dg/vect/vect-41.c: Ditto. * gcc.dg/vect/vect-42.c: Ditto. * gcc.dg/vect/vect-43.c: Ditto. * gcc.dg/vect/vect-44.c: Ditto. * gcc.dg/vect/vect-45.c: Ditto. * gcc.dg/vect/vect-46.c: Ditto. * gcc.dg/vect/vect-47.c: Ditto. * gcc.dg/vect/vect-48.c: Ditto. * gcc.dg/vect/vect-48a.c: Ditto. * gcc.dg/vect/vect-49.c: Ditto. * gcc.dg/vect/vect-5.c: Ditto. * gcc.dg/vect/vect-50.c: Ditto. * gcc.dg/vect/vect-51.c: Ditto. * gcc.dg/vect/vect-52.c: Ditto. * gcc.dg/vect/vect-53.c: Ditto. * gcc.dg/vect/vect-54.c: Ditto. * gcc.dg/vect/vect-55.c: Ditto. * gcc.dg/vect/vect-56.c: Ditto. * gcc.dg/vect/vect-56a.c: Ditto. * gcc.dg/vect/vect-57.c: Ditto. * gcc.dg/vect/vect-58.c: Ditto. * gcc.dg/vect/vect-59.c: Ditto. * gcc.dg/vect/vect-6.c: Ditto. * gcc.dg/vect/vect-60.c: Ditto. * gcc.dg/vect/vect-61.c: Ditto. * gcc.dg/vect/vect-62.c: Ditto. * gcc.dg/vect/vect-63.c: Ditto. * gcc.dg/vect/vect-64.c: Ditto. * gcc.dg/vect/vect-65.c: Ditto. * gcc.dg/vect/vect-66.c: Ditto. * gcc.dg/vect/vect-67.c: Ditto. * gcc.dg/vect/vect-68.c: Ditto. * gcc.dg/vect/vect-69.c: Ditto. * gcc.dg/vect/vect-7.c: Ditto. * gcc.dg/vect/vect-72.c: Ditto. * gcc.dg/vect/vect-72a.c: Ditto. * gcc.dg/vect/vect-73.c: Ditto. * gcc.dg/vect/vect-74.c: Ditto. * gcc.dg/vect/vect-75.c: Ditto. * gcc.dg/vect/vect-76.c: Ditto. * gcc.dg/vect/vect-77.c: Ditto. * gcc.dg/vect/vect-77a.c: Ditto. * gcc.dg/vect/vect-78.c: Ditto. * gcc.dg/vect/vect-79.c: Ditto. * gcc.dg/vect/vect-8.c: Ditto. * gcc.dg/vect/vect-80.c: Ditto. * gcc.dg/vect/vect-82.c: Ditto. * gcc.dg/vect/vect-82_64.c: Ditto. * gcc.dg/vect/vect-83.c: Ditto. * gcc.dg/vect/vect-83_64.c: Ditto. * gcc.dg/vect/vect-9.c: Ditto. * gcc.dg/vect/vect-all.c: Ditto. * gcc.dg/vect/vect-none.c: Ditto. Co-Authored-By: Aldy Hernandez <aldyh@redhat.com> From-SVN: r90831
2004-11-18 00:47:21 +01:00
# Return 1 if the target supports hardware vectors of int, 0 otherwise.
#
# This won't change for different subtargets so cache the result.
proc check_effective_target_vect_int { } {
global et_vect_int_saved
if [info exists et_vect_int_saved] {
verbose "check_effective_target_vect_int: using cached result" 2
} else {
set et_vect_int_saved 0
if { [istarget i?86-*-*]
|| ([istarget powerpc*-*-*]
&& ![istarget powerpc-*-linux*paired*])
|| [istarget spu-*-*]
target-supports.exp (check_effective_target_vect_int): New * lib/target-supports.exp (check_effective_target_vect_int): New (check_effective_target_vect_float): New (check_effective_target_vect_double): New. (is-effective-target): Support new effective targets keywords. * gcc.dg/vect/vect.exp: Set target-dependent vector flags and default action for dg-do. * gcc.dg/vect/pr16105.c: Use new support. * gcc.dg/vect/pr18400.c: Ditto. * gcc.dg/vect/pr18425.c: Ditto. * gcc.dg/vect/vect-1.c: Ditto. * gcc.dg/vect/vect-10.c: Ditto. * gcc.dg/vect/vect-11.c: Ditto. * gcc.dg/vect/vect-12.c: Ditto. * gcc.dg/vect/vect-13.c: Ditto. * gcc.dg/vect/vect-14.c: Ditto. * gcc.dg/vect/vect-15.c: Ditto. * gcc.dg/vect/vect-16.c: Ditto. * gcc.dg/vect/vect-17.c: Ditto. * gcc.dg/vect/vect-18.c: Ditto. * gcc.dg/vect/vect-19.c: Ditto. * gcc.dg/vect/vect-2.c: Ditto. * gcc.dg/vect/vect-20.c: Ditto. * gcc.dg/vect/vect-21.c: Ditto. * gcc.dg/vect/vect-22.c: Ditto. * gcc.dg/vect/vect-23.c: Ditto. * gcc.dg/vect/vect-24.c: Ditto. * gcc.dg/vect/vect-25.c: Ditto. * gcc.dg/vect/vect-26.c: Ditto. * gcc.dg/vect/vect-27.c: Ditto. * gcc.dg/vect/vect-27a.c: Ditto. * gcc.dg/vect/vect-28.c: Ditto. * gcc.dg/vect/vect-29.c: Ditto. * gcc.dg/vect/vect-29a.c: Ditto. * gcc.dg/vect/vect-3.c: Ditto. * gcc.dg/vect/vect-30.c: Ditto. * gcc.dg/vect/vect-31.c: Ditto. * gcc.dg/vect/vect-32.c: Ditto. * gcc.dg/vect/vect-33.c: Ditto. * gcc.dg/vect/vect-34.c: Ditto. * gcc.dg/vect/vect-35.c: Ditto. * gcc.dg/vect/vect-36.c: Ditto. * gcc.dg/vect/vect-37.c: Ditto. * gcc.dg/vect/vect-38.c: Ditto. * gcc.dg/vect/vect-4.c: Ditto. * gcc.dg/vect/vect-40.c: Ditto. * gcc.dg/vect/vect-41.c: Ditto. * gcc.dg/vect/vect-42.c: Ditto. * gcc.dg/vect/vect-43.c: Ditto. * gcc.dg/vect/vect-44.c: Ditto. * gcc.dg/vect/vect-45.c: Ditto. * gcc.dg/vect/vect-46.c: Ditto. * gcc.dg/vect/vect-47.c: Ditto. * gcc.dg/vect/vect-48.c: Ditto. * gcc.dg/vect/vect-48a.c: Ditto. * gcc.dg/vect/vect-49.c: Ditto. * gcc.dg/vect/vect-5.c: Ditto. * gcc.dg/vect/vect-50.c: Ditto. * gcc.dg/vect/vect-51.c: Ditto. * gcc.dg/vect/vect-52.c: Ditto. * gcc.dg/vect/vect-53.c: Ditto. * gcc.dg/vect/vect-54.c: Ditto. * gcc.dg/vect/vect-55.c: Ditto. * gcc.dg/vect/vect-56.c: Ditto. * gcc.dg/vect/vect-56a.c: Ditto. * gcc.dg/vect/vect-57.c: Ditto. * gcc.dg/vect/vect-58.c: Ditto. * gcc.dg/vect/vect-59.c: Ditto. * gcc.dg/vect/vect-6.c: Ditto. * gcc.dg/vect/vect-60.c: Ditto. * gcc.dg/vect/vect-61.c: Ditto. * gcc.dg/vect/vect-62.c: Ditto. * gcc.dg/vect/vect-63.c: Ditto. * gcc.dg/vect/vect-64.c: Ditto. * gcc.dg/vect/vect-65.c: Ditto. * gcc.dg/vect/vect-66.c: Ditto. * gcc.dg/vect/vect-67.c: Ditto. * gcc.dg/vect/vect-68.c: Ditto. * gcc.dg/vect/vect-69.c: Ditto. * gcc.dg/vect/vect-7.c: Ditto. * gcc.dg/vect/vect-72.c: Ditto. * gcc.dg/vect/vect-72a.c: Ditto. * gcc.dg/vect/vect-73.c: Ditto. * gcc.dg/vect/vect-74.c: Ditto. * gcc.dg/vect/vect-75.c: Ditto. * gcc.dg/vect/vect-76.c: Ditto. * gcc.dg/vect/vect-77.c: Ditto. * gcc.dg/vect/vect-77a.c: Ditto. * gcc.dg/vect/vect-78.c: Ditto. * gcc.dg/vect/vect-79.c: Ditto. * gcc.dg/vect/vect-8.c: Ditto. * gcc.dg/vect/vect-80.c: Ditto. * gcc.dg/vect/vect-82.c: Ditto. * gcc.dg/vect/vect-82_64.c: Ditto. * gcc.dg/vect/vect-83.c: Ditto. * gcc.dg/vect/vect-83_64.c: Ditto. * gcc.dg/vect/vect-9.c: Ditto. * gcc.dg/vect/vect-all.c: Ditto. * gcc.dg/vect/vect-none.c: Ditto. Co-Authored-By: Aldy Hernandez <aldyh@redhat.com> From-SVN: r90831
2004-11-18 00:47:21 +01:00
|| [istarget x86_64-*-*]
|| [istarget sparc*-*-*]
ia64.c (TARGET_VECTOR_MODE_SUPPORTED_P): New. * config/ia64/ia64.c (TARGET_VECTOR_MODE_SUPPORTED_P): New. (ia64_const_ok_for_letter_p): New. (ia64_const_double_ok_for_letter_p): New. (ia64_extra_constraint): New. (ia64_expand_vecint_compare): New. (ia64_expand_vcondu_v2si): New. (ia64_expand_vecint_cmov): New. (ia64_expand_vecint_minmax): New. (ia64_print_operand): Add 'v'. (ia64_preferred_reload_class): New. (ia64_vector_mode_supported_p): New. * config/ia64/ia64.h (UNITS_PER_SIMD_WORD): New. (PREFERRED_RELOAD_CLASS): Move to function. (CONST_OK_FOR_LETTER_P): Move to function. (CONST_DOUBLE_OK_FOR_LETTER_P): Move to function. (CONSTRAINT_OK_FOR_Q, CONSTRAINT_OK_FOR_R): Remove. (CONSTRAINT_OK_FOR_S, CONSTRAINT_OK_FOR_T): Remove. (EXTRA_CONSTRAINT): Move to function. * config/ia64/ia64.md: Include vect.md. (itanium_class): Add mmalua. (type): Handle it. * config/ia64/itanium1.md (1_mmalua): New. Add it to bypasses. (1b_mmalua): New. * config/ia64/itanium2.md (2_mmalua, 2b_mmalua): Similarly. * config/ia64/predicates.md (gr_reg_or_0_operand): Accept any CONST0_RTX. (const_int_2bit_operand): New. (fr_reg_or_0_operand): New. * config/ia64/ia64-modes.def: Add vector modes. * config/ia64/ia64-protos.h: Update. * config/ia64/vect.md: New file. * gcc.dg/vect/vect.exp: Enable for ia64. * lib/target-supports.exp (check_effective_target_vect_int): Likewise. (check_effective_target_vect_float): Likewise. (check_effective_target_vect_no_align): Likewise. * gcc.dg/vect/vect-30.c: XFAIL for vect_no_align. * gcc.dg/vect/vect-8.c: Likewise. From-SVN: r92862
2005-01-03 20:59:13 +01:00
|| [istarget alpha*-*-*]
|| [istarget ia64-*-*]
|| [check_effective_target_arm32] } {
target-supports.exp (check_effective_target_vect_int): New * lib/target-supports.exp (check_effective_target_vect_int): New (check_effective_target_vect_float): New (check_effective_target_vect_double): New. (is-effective-target): Support new effective targets keywords. * gcc.dg/vect/vect.exp: Set target-dependent vector flags and default action for dg-do. * gcc.dg/vect/pr16105.c: Use new support. * gcc.dg/vect/pr18400.c: Ditto. * gcc.dg/vect/pr18425.c: Ditto. * gcc.dg/vect/vect-1.c: Ditto. * gcc.dg/vect/vect-10.c: Ditto. * gcc.dg/vect/vect-11.c: Ditto. * gcc.dg/vect/vect-12.c: Ditto. * gcc.dg/vect/vect-13.c: Ditto. * gcc.dg/vect/vect-14.c: Ditto. * gcc.dg/vect/vect-15.c: Ditto. * gcc.dg/vect/vect-16.c: Ditto. * gcc.dg/vect/vect-17.c: Ditto. * gcc.dg/vect/vect-18.c: Ditto. * gcc.dg/vect/vect-19.c: Ditto. * gcc.dg/vect/vect-2.c: Ditto. * gcc.dg/vect/vect-20.c: Ditto. * gcc.dg/vect/vect-21.c: Ditto. * gcc.dg/vect/vect-22.c: Ditto. * gcc.dg/vect/vect-23.c: Ditto. * gcc.dg/vect/vect-24.c: Ditto. * gcc.dg/vect/vect-25.c: Ditto. * gcc.dg/vect/vect-26.c: Ditto. * gcc.dg/vect/vect-27.c: Ditto. * gcc.dg/vect/vect-27a.c: Ditto. * gcc.dg/vect/vect-28.c: Ditto. * gcc.dg/vect/vect-29.c: Ditto. * gcc.dg/vect/vect-29a.c: Ditto. * gcc.dg/vect/vect-3.c: Ditto. * gcc.dg/vect/vect-30.c: Ditto. * gcc.dg/vect/vect-31.c: Ditto. * gcc.dg/vect/vect-32.c: Ditto. * gcc.dg/vect/vect-33.c: Ditto. * gcc.dg/vect/vect-34.c: Ditto. * gcc.dg/vect/vect-35.c: Ditto. * gcc.dg/vect/vect-36.c: Ditto. * gcc.dg/vect/vect-37.c: Ditto. * gcc.dg/vect/vect-38.c: Ditto. * gcc.dg/vect/vect-4.c: Ditto. * gcc.dg/vect/vect-40.c: Ditto. * gcc.dg/vect/vect-41.c: Ditto. * gcc.dg/vect/vect-42.c: Ditto. * gcc.dg/vect/vect-43.c: Ditto. * gcc.dg/vect/vect-44.c: Ditto. * gcc.dg/vect/vect-45.c: Ditto. * gcc.dg/vect/vect-46.c: Ditto. * gcc.dg/vect/vect-47.c: Ditto. * gcc.dg/vect/vect-48.c: Ditto. * gcc.dg/vect/vect-48a.c: Ditto. * gcc.dg/vect/vect-49.c: Ditto. * gcc.dg/vect/vect-5.c: Ditto. * gcc.dg/vect/vect-50.c: Ditto. * gcc.dg/vect/vect-51.c: Ditto. * gcc.dg/vect/vect-52.c: Ditto. * gcc.dg/vect/vect-53.c: Ditto. * gcc.dg/vect/vect-54.c: Ditto. * gcc.dg/vect/vect-55.c: Ditto. * gcc.dg/vect/vect-56.c: Ditto. * gcc.dg/vect/vect-56a.c: Ditto. * gcc.dg/vect/vect-57.c: Ditto. * gcc.dg/vect/vect-58.c: Ditto. * gcc.dg/vect/vect-59.c: Ditto. * gcc.dg/vect/vect-6.c: Ditto. * gcc.dg/vect/vect-60.c: Ditto. * gcc.dg/vect/vect-61.c: Ditto. * gcc.dg/vect/vect-62.c: Ditto. * gcc.dg/vect/vect-63.c: Ditto. * gcc.dg/vect/vect-64.c: Ditto. * gcc.dg/vect/vect-65.c: Ditto. * gcc.dg/vect/vect-66.c: Ditto. * gcc.dg/vect/vect-67.c: Ditto. * gcc.dg/vect/vect-68.c: Ditto. * gcc.dg/vect/vect-69.c: Ditto. * gcc.dg/vect/vect-7.c: Ditto. * gcc.dg/vect/vect-72.c: Ditto. * gcc.dg/vect/vect-72a.c: Ditto. * gcc.dg/vect/vect-73.c: Ditto. * gcc.dg/vect/vect-74.c: Ditto. * gcc.dg/vect/vect-75.c: Ditto. * gcc.dg/vect/vect-76.c: Ditto. * gcc.dg/vect/vect-77.c: Ditto. * gcc.dg/vect/vect-77a.c: Ditto. * gcc.dg/vect/vect-78.c: Ditto. * gcc.dg/vect/vect-79.c: Ditto. * gcc.dg/vect/vect-8.c: Ditto. * gcc.dg/vect/vect-80.c: Ditto. * gcc.dg/vect/vect-82.c: Ditto. * gcc.dg/vect/vect-82_64.c: Ditto. * gcc.dg/vect/vect-83.c: Ditto. * gcc.dg/vect/vect-83_64.c: Ditto. * gcc.dg/vect/vect-9.c: Ditto. * gcc.dg/vect/vect-all.c: Ditto. * gcc.dg/vect/vect-none.c: Ditto. Co-Authored-By: Aldy Hernandez <aldyh@redhat.com> From-SVN: r90831
2004-11-18 00:47:21 +01:00
set et_vect_int_saved 1
}
}
verbose "check_effective_target_vect_int: returning $et_vect_int_saved" 2
return $et_vect_int_saved
}
# Return 1 if the target supports signed int->float conversion
#
proc check_effective_target_vect_intfloat_cvt { } {
global et_vect_intfloat_cvt_saved
if [info exists et_vect_intfloat_cvt_saved] {
verbose "check_effective_target_vect_intfloat_cvt: using cached result" 2
} else {
set et_vect_intfloat_cvt_saved 0
if { [istarget i?86-*-*]
|| ([istarget powerpc*-*-*]
&& ![istarget powerpc-*-linux*paired*])
|| [istarget x86_64-*-*] } {
set et_vect_intfloat_cvt_saved 1
}
}
verbose "check_effective_target_vect_intfloat_cvt: returning $et_vect_intfloat_cvt_saved" 2
return $et_vect_intfloat_cvt_saved
}
# Return 1 if the target supports unsigned int->float conversion
#
proc check_effective_target_vect_uintfloat_cvt { } {
global et_vect_uintfloat_cvt_saved
if [info exists et_vect_uintfloat_cvt_saved] {
verbose "check_effective_target_vect_uintfloat_cvt: using cached result" 2
} else {
set et_vect_uintfloat_cvt_saved 0
if { ([istarget powerpc*-*-*]
&& ![istarget powerpc-*-linux*paired*]) } {
set et_vect_uintfloat_cvt_saved 1
}
}
verbose "check_effective_target_vect_uintfloat_cvt: returning $et_vect_uintfloat_cvt_saved" 2
return $et_vect_uintfloat_cvt_saved
}
# Return 1 if the target supports signed float->int conversion
#
proc check_effective_target_vect_floatint_cvt { } {
global et_vect_floatint_cvt_saved
if [info exists et_vect_floatint_cvt_saved] {
verbose "check_effective_target_vect_floatint_cvt: using cached result" 2
} else {
set et_vect_floatint_cvt_saved 0
if { [istarget i?86-*-*]
|| ([istarget powerpc*-*-*]
&& ![istarget powerpc-*-linux*paired*])
|| [istarget x86_64-*-*] } {
set et_vect_floatint_cvt_saved 1
}
}
verbose "check_effective_target_vect_floatint_cvt: returning $et_vect_floatint_cvt_saved" 2
return $et_vect_floatint_cvt_saved
}
# Return 1 if the target supports unsigned float->int conversion
#
proc check_effective_target_vect_floatuint_cvt { } {
global et_vect_floatuint_cvt_saved
if [info exists et_vect_floatuint_cvt_saved] {
verbose "check_effective_target_vect_floatuint_cvt: using cached result" 2
} else {
set et_vect_floatuint_cvt_saved 0
if { ([istarget powerpc*-*-*]
&& ![istarget powerpc-*-linux*paired*]) } {
set et_vect_floatuint_cvt_saved 1
}
}
verbose "check_effective_target_vect_floatuint_cvt: returning $et_vect_floatuint_cvt_saved" 2
return $et_vect_floatuint_cvt_saved
}
# Return 1 is this is an arm target using 32-bit instructions
proc check_effective_target_arm32 { } {
return [check_no_compiler_messages arm32 assembly {
#if !defined(__arm__) || (defined(__thumb__) && !defined(__thumb2__))
#error FOO
#endif
}]
}
# Return 1 if this is an ARM target supporting -mfpu=vfp
# -mfloat-abi=softfp. Some multilibs may be incompatible with these
# options.
proc check_effective_target_arm_vfp_ok { } {
if { [check_effective_target_arm32] } {
return [check_no_compiler_messages arm_vfp_ok object {
int dummy;
} "-mfpu=vfp -mfloat-abi=softfp"]
} else {
return 0
}
}
Makefile.in (TEXI_GCC_FILES): Add arm-neon-intrinsics.texi. gcc/ * Makefile.in (TEXI_GCC_FILES): Add arm-neon-intrinsics.texi. * config.gcc (arm*-*-*): Add arm_neon.h to extra headers. (with_fpu): Allow --with-fpu=neon. * config/arm/aof.h (ADDITIONAL_REGISTER_NAMES): Add Q0-Q15. * config/arm/aout.h (ADDITIONAL_REGISTER_NAMES): Add Q0-Q15. * config/arm/arm-modes.def (EI, OI, CI, XI): New modes. * config/arm/arm-protos.h (neon_immediate_valid_for_move) (neon_immediate_valid_for_logic, neon_output_logic_immediate) (neon_pairwise_reduce, neon_expand_vector_init, neon_reinterpret) (neon_emit_pair_result_insn, neon_disambiguate_copy) (neon_vector_mem_operand, neon_struct_mem_operand, output_move_quad) (output_move_neon): Add prototypes. * config/arm/arm.c (FL_NEON): New flag for NEON processor capability. (all_fpus): Add FPUTYPE_NEON. (fp_model_for_fpu): Add NEON field. (arm_return_in_memory): Return vectors <= 16 bytes in ARM registers. (arm_arg_partial_bytes): Allow NEON vectors to be passed partially in registers. (arm_legitimate_address_p): Don't support fancy addressing for NEON structure moves. (thumb2_legitimate_address_p): Likewise. (neon_valid_immediate): Recognize and prepare constants suitable for NEON instructions. (neon_immediate_valid_for_move): New function. Recognize and prepare immediates for NEON move instructions. (neon_immediate_valid_for_logic): New function. Recognize and prepare immediates for NEON logic instructions. (neon_output_logic_immediate): New function. Create asm string suitable for outputting immediate logic instructions. (neon_pairwise_reduce): New function. Implement reduction using pairwise operations. (neon_expand_vector_init): New function. Expand a (possibly non-constant) vector initialization. (neon_vector_mem_operand): New function. Memory operands supported for quad-word loads/stores to/from ARM or NEON registers. Don't allow base+offset addressing for core regs. (neon_struct_mem_operand): New function. Valid mems for NEON structure moves. (coproc_secondary_reload_class): Enable NEON registers to be loaded from neon_vector_mem_operand addresses without a secondary register. (add_minipool_forward_ref): Handle >8-byte minipool entries. (add_minipool_backward_ref): Likewise. (dump_minipool): Likewise. (push_minipool_fix): Likewise. (output_move_quad): New function. Output quad-word moves, loads and stores using ARM registers. (output_move_vfp): Add support for vectors in VFP (NEON) D registers. (output_move_neon): Output a NEON load/store to/from a quadword register. (arm_print_operand): Implement new codes: - 'c' for unadorned integers (without a # sign). - 'J', 'K' for reg+2/reg+3, reg+3/reg+2 in little/big-endian mode. - 'e', 'f' for the low and high D parts of a NEON Q register. - 'q' outputs a NEON Q register. - 'h' outputs ranges of D registers for VLDM/VSTM etc. - 'T' prints NEON opcode features from a coded bitmask. - 'F' is similar to T, but signed/unsigned codes both print as 'i'. - 't' is similar to T, but 'u' is printed instead of 'p'. - 'O' prints 'r' if NEON instruction should perform rounding (as specified by bitmask), else prints nothing. - '#' is a punctuation character to stop operand numbers from running together with following digits in the assembler strings for instructions (when using mode attributes). (arm_assemble_integer): Handle extra NEON vector modes. Permute constant vectors in big-endian mode, where necessary. (arm_hard_regno_mode_ok): Allow vectors in VFP/NEON registers. Handle EI, OI, CI, XI modes. (ashlv4hi3, ashlv2si3, lshrv4hi3, lshrv2si3, ashrv4hi3) (ashrv2si3): Rename IWMMXT2_BUILTINs to... (ashlv4hi3_iwmmxt, ashlv2si3_iwmmxt, lshrv4hi3_iwmmxt) (lshrv2si3_iwmmxt, ashrv4hi3_iwmmxt, ashrv2si3_iwmmxt): New names. (neon_builtin_type_bits): Add enumeration, one bit for each vector type. (v8qi_UP, v4hi_UP, v2si_UP, v2sf_UP, di_UP, v16qi_UP, v8hi_UP) (v4si_UP, v4sf_UP, v2di_UP, ti_UP, ei_UP, oi_UP, UP): Define macros to turn v8qi, etc. into bits defined above. (neon_itype): New enumeration. Classifications of NEON builtins. (neon_builtin_datum): Define struct. Contains information about a single builtin (with multiple modes). (CF): Define helper macro for... (VAR1...VAR10): Define builtins with a type, name and 1-10 different modes. (neon_builtin_data): New array. Define information about builtins for use during initialization/expansion. (arm_init_neon_builtins): New function. (arm_init_builtins): Call arm_init_neon_builtins if TARGET_NEON is true. (neon_builtin_compare): New function. (locate_neon_builtin_icode): New function. Find an insn code for a builtin given a function code for that builtin. Also return type of builtin (NEON_BINOP, NEON_UNOP etc.). (builtin_arg): New enumeration. Types of arguments for builtins. (arm_expand_neon_args): New function. Expand a generic NEON builtin. Takes a variable argument list of builtin_arg types, terminated by NEON_ARG_STOP. (arm_expand_neon_builtin): New function. Expand a NEON builtin. (neon_reinterpret): New function. Expand NEON reinterpret intrinsic. (neon_emit_pair_result_insn): New function. Support returning pairs of vectors via a pointer. (neon_disambiguate_copy): New function. Set up operands for a multi-word copy such that registers do not get clobbered. (arm_expand_builtin): Call arm_expand_neon_builtin if fcode >= ARM_BUILTIN_NEON_BASE. (arm_file_start): Set float-abi attribute for NEON. (arm_vector_mode_supported_p): Enable NEON vector modes. (arm_mangle_map_entry): New. (arm_mangle_map): New. (arm_mangle_vector_type): New. * config/arm/arm.h (TARGET_CPU_CPP_BUILTINS): Define __ARM_NEON__ when appropriate. (TARGET_NEON): New macro. Target supports NEON. (fputype): Add FPUTYPE_NEON. (UNITS_PER_SIMD_WORD): Define. Allow quad-word registers to be used for vectorization based on command-line arg. (NEON_REGNO_OK_FOR_NREGS): Define. (VALID_NEON_DREG_MODE, VALID_NEON_QREG_MODE) (VALID_NEON_STRUCT_MODE): Define. (PRINT_OPERAND_PUNCT_VALID_P): '#' is valid punctuation. (arm_builtins): Add ARM_BUILTIN_NEON_BASE. * config/arm/arm.md (VUNSPEC_POOL_16): Insert constant for unspec. (consttable_16): Add pattern for outputting 16-byte minipool entries. (movv2si, movv4hi, movv8qi): Remove blank expanders (redefined in vec-common.md). (vec-common.md, neon.md): Include md files. * config/arm/arm.opt (mvectorize-with-neon-quad): Add option. * config/arm/constraints.md (constraint "Dn", "Dl", "DL"): Define. (memory_constraint "Ut", "Un", "Us"): Define. * config/arm/iwmmxt.md (VMMX, VSHFT): New mode macros. (MMX_char): New mode attribute. (addv8qi3, addv4hi3, addv2si3): Remove. Replace with... (*add<mode>3_iwmmxt): New insn pattern. (subv8qi3, subv4hi3, subv2si3): Remove. Replace with... (*sub<mode>3_iwmmxt): New insn pattern. (mulv4hi3): Rename to... (*mulv4hi3_iwmmxt): This. (smaxv8qi3, smaxv4hi3, smaxv2si3, umaxv8qi3, umaxv4hi3) (umaxv2si3, sminv8qi3, sminv4hi3, sminv2si3, uminv8qi3) (uminv4hi3, uminv2si3): Remove. Replace with... (*smax<mode>3_iwmmxt, *umax<mode>3_iwmmxt, *smin<mode>3_iwmmxt) (*umin<mode>3_iwmmxt): These. (ashrv4hi3, ashrv2si3, ashrdi3_iwmmxt): Replace with... (ashr<mode>3_iwmmxt): This new pattern. (lshrv4hi3, lshrv2si3, lshrdi3_iwmmxt): Replace with... (lshr<mode>3_iwmmxt): This new pattern. (ashlv4hi3, ashlv2si3, ashldi3_iwmmxt): Replace with... (ashl<mode>3_iwmmxt): This new pattern. * config/arm/neon-docgen.ml: New file. Generate documentation for intrinsics. * config/arm/neon-gen.ml: New file. Generate arm_neon.h header. * config/arm/arm_neon.h: New (autogenerated). * config/arm/neon-testgen.ml: New file. Generate NEON tests automatically. * config/arm/neon.md: New file. Define NEON instructions. * config/arm/neon.ml: New file. Abstract description of NEON instructions, used to generate arm_neon.h header, documentation and tests. * config/arm/t-arm (MD_INCLUDES): Add vec-common.md, neon.md. * vec-common.md: New file. Shared parts for iWMMXt and NEON vector support. * doc/extend.texi (ARM Built-in Functions): Rename and remove extraneous comma. (ARM NEON Intrinsics): New subsection. * doc/arm-neon-intrinsics.texi: New (autogenerated). gcc/testsuite/ * gcc.dg/vect/vect.exp: Check is-effective-target arm_neon_hw. * gcc.dg/vect/tree-vect.h: Check for NEON SIMD support. * lib/gcc-dg.exp (cleanup-saved-temps): Fix comment. * lib/target-supports.exp (check_effective_target_arm_neon_ok) (check_effective_target_arm_neon_hw): New. * gcc.target/arm/neon/neon.exp: New file. * gcc.target/arm/neon/polytypes.c: New file. * gcc.target/arm/neon/v*.c (1870 files): New (autogenerated). Co-Authored-By: Joseph Myers <joseph@codesourcery.com> Co-Authored-By: Mark Shinwell <shinwell@codesourcery.com> Co-Authored-By: Paul Brook <paul@codesourcery.com> From-SVN: r126911
2007-07-25 14:28:31 +02:00
# Return 1 if this is an ARM target supporting -mfpu=neon
# -mfloat-abi=softfp. Some multilibs may be incompatible with these
# options.
proc check_effective_target_arm_neon_ok { } {
if { [check_effective_target_arm32] } {
return [check_no_compiler_messages arm_neon_ok object {
int dummy;
} "-mfpu=neon -mfloat-abi=softfp"]
} else {
return 0
}
}
# Return 1 is this is an ARM target where -mthumb causes Thumb-1 to be
# used.
proc check_effective_target_arm_thumb1_ok { } {
return [check_no_compiler_messages arm_thumb1_ok assembly {
#if !defined(__arm__) || !defined(__thumb__) || defined(__thumb2__)
#error FOO
#endif
} "-mthumb"]
}
# Return 1 is this is an ARM target where -mthumb causes Thumb-2 to be
# used.
proc check_effective_target_arm_thumb2_ok { } {
return [check_no_compiler_messages arm_thumb2_ok assembly {
#if !defined(__thumb2__)
#error FOO
#endif
} "-mthumb"]
}
Makefile.in (TEXI_GCC_FILES): Add arm-neon-intrinsics.texi. gcc/ * Makefile.in (TEXI_GCC_FILES): Add arm-neon-intrinsics.texi. * config.gcc (arm*-*-*): Add arm_neon.h to extra headers. (with_fpu): Allow --with-fpu=neon. * config/arm/aof.h (ADDITIONAL_REGISTER_NAMES): Add Q0-Q15. * config/arm/aout.h (ADDITIONAL_REGISTER_NAMES): Add Q0-Q15. * config/arm/arm-modes.def (EI, OI, CI, XI): New modes. * config/arm/arm-protos.h (neon_immediate_valid_for_move) (neon_immediate_valid_for_logic, neon_output_logic_immediate) (neon_pairwise_reduce, neon_expand_vector_init, neon_reinterpret) (neon_emit_pair_result_insn, neon_disambiguate_copy) (neon_vector_mem_operand, neon_struct_mem_operand, output_move_quad) (output_move_neon): Add prototypes. * config/arm/arm.c (FL_NEON): New flag for NEON processor capability. (all_fpus): Add FPUTYPE_NEON. (fp_model_for_fpu): Add NEON field. (arm_return_in_memory): Return vectors <= 16 bytes in ARM registers. (arm_arg_partial_bytes): Allow NEON vectors to be passed partially in registers. (arm_legitimate_address_p): Don't support fancy addressing for NEON structure moves. (thumb2_legitimate_address_p): Likewise. (neon_valid_immediate): Recognize and prepare constants suitable for NEON instructions. (neon_immediate_valid_for_move): New function. Recognize and prepare immediates for NEON move instructions. (neon_immediate_valid_for_logic): New function. Recognize and prepare immediates for NEON logic instructions. (neon_output_logic_immediate): New function. Create asm string suitable for outputting immediate logic instructions. (neon_pairwise_reduce): New function. Implement reduction using pairwise operations. (neon_expand_vector_init): New function. Expand a (possibly non-constant) vector initialization. (neon_vector_mem_operand): New function. Memory operands supported for quad-word loads/stores to/from ARM or NEON registers. Don't allow base+offset addressing for core regs. (neon_struct_mem_operand): New function. Valid mems for NEON structure moves. (coproc_secondary_reload_class): Enable NEON registers to be loaded from neon_vector_mem_operand addresses without a secondary register. (add_minipool_forward_ref): Handle >8-byte minipool entries. (add_minipool_backward_ref): Likewise. (dump_minipool): Likewise. (push_minipool_fix): Likewise. (output_move_quad): New function. Output quad-word moves, loads and stores using ARM registers. (output_move_vfp): Add support for vectors in VFP (NEON) D registers. (output_move_neon): Output a NEON load/store to/from a quadword register. (arm_print_operand): Implement new codes: - 'c' for unadorned integers (without a # sign). - 'J', 'K' for reg+2/reg+3, reg+3/reg+2 in little/big-endian mode. - 'e', 'f' for the low and high D parts of a NEON Q register. - 'q' outputs a NEON Q register. - 'h' outputs ranges of D registers for VLDM/VSTM etc. - 'T' prints NEON opcode features from a coded bitmask. - 'F' is similar to T, but signed/unsigned codes both print as 'i'. - 't' is similar to T, but 'u' is printed instead of 'p'. - 'O' prints 'r' if NEON instruction should perform rounding (as specified by bitmask), else prints nothing. - '#' is a punctuation character to stop operand numbers from running together with following digits in the assembler strings for instructions (when using mode attributes). (arm_assemble_integer): Handle extra NEON vector modes. Permute constant vectors in big-endian mode, where necessary. (arm_hard_regno_mode_ok): Allow vectors in VFP/NEON registers. Handle EI, OI, CI, XI modes. (ashlv4hi3, ashlv2si3, lshrv4hi3, lshrv2si3, ashrv4hi3) (ashrv2si3): Rename IWMMXT2_BUILTINs to... (ashlv4hi3_iwmmxt, ashlv2si3_iwmmxt, lshrv4hi3_iwmmxt) (lshrv2si3_iwmmxt, ashrv4hi3_iwmmxt, ashrv2si3_iwmmxt): New names. (neon_builtin_type_bits): Add enumeration, one bit for each vector type. (v8qi_UP, v4hi_UP, v2si_UP, v2sf_UP, di_UP, v16qi_UP, v8hi_UP) (v4si_UP, v4sf_UP, v2di_UP, ti_UP, ei_UP, oi_UP, UP): Define macros to turn v8qi, etc. into bits defined above. (neon_itype): New enumeration. Classifications of NEON builtins. (neon_builtin_datum): Define struct. Contains information about a single builtin (with multiple modes). (CF): Define helper macro for... (VAR1...VAR10): Define builtins with a type, name and 1-10 different modes. (neon_builtin_data): New array. Define information about builtins for use during initialization/expansion. (arm_init_neon_builtins): New function. (arm_init_builtins): Call arm_init_neon_builtins if TARGET_NEON is true. (neon_builtin_compare): New function. (locate_neon_builtin_icode): New function. Find an insn code for a builtin given a function code for that builtin. Also return type of builtin (NEON_BINOP, NEON_UNOP etc.). (builtin_arg): New enumeration. Types of arguments for builtins. (arm_expand_neon_args): New function. Expand a generic NEON builtin. Takes a variable argument list of builtin_arg types, terminated by NEON_ARG_STOP. (arm_expand_neon_builtin): New function. Expand a NEON builtin. (neon_reinterpret): New function. Expand NEON reinterpret intrinsic. (neon_emit_pair_result_insn): New function. Support returning pairs of vectors via a pointer. (neon_disambiguate_copy): New function. Set up operands for a multi-word copy such that registers do not get clobbered. (arm_expand_builtin): Call arm_expand_neon_builtin if fcode >= ARM_BUILTIN_NEON_BASE. (arm_file_start): Set float-abi attribute for NEON. (arm_vector_mode_supported_p): Enable NEON vector modes. (arm_mangle_map_entry): New. (arm_mangle_map): New. (arm_mangle_vector_type): New. * config/arm/arm.h (TARGET_CPU_CPP_BUILTINS): Define __ARM_NEON__ when appropriate. (TARGET_NEON): New macro. Target supports NEON. (fputype): Add FPUTYPE_NEON. (UNITS_PER_SIMD_WORD): Define. Allow quad-word registers to be used for vectorization based on command-line arg. (NEON_REGNO_OK_FOR_NREGS): Define. (VALID_NEON_DREG_MODE, VALID_NEON_QREG_MODE) (VALID_NEON_STRUCT_MODE): Define. (PRINT_OPERAND_PUNCT_VALID_P): '#' is valid punctuation. (arm_builtins): Add ARM_BUILTIN_NEON_BASE. * config/arm/arm.md (VUNSPEC_POOL_16): Insert constant for unspec. (consttable_16): Add pattern for outputting 16-byte minipool entries. (movv2si, movv4hi, movv8qi): Remove blank expanders (redefined in vec-common.md). (vec-common.md, neon.md): Include md files. * config/arm/arm.opt (mvectorize-with-neon-quad): Add option. * config/arm/constraints.md (constraint "Dn", "Dl", "DL"): Define. (memory_constraint "Ut", "Un", "Us"): Define. * config/arm/iwmmxt.md (VMMX, VSHFT): New mode macros. (MMX_char): New mode attribute. (addv8qi3, addv4hi3, addv2si3): Remove. Replace with... (*add<mode>3_iwmmxt): New insn pattern. (subv8qi3, subv4hi3, subv2si3): Remove. Replace with... (*sub<mode>3_iwmmxt): New insn pattern. (mulv4hi3): Rename to... (*mulv4hi3_iwmmxt): This. (smaxv8qi3, smaxv4hi3, smaxv2si3, umaxv8qi3, umaxv4hi3) (umaxv2si3, sminv8qi3, sminv4hi3, sminv2si3, uminv8qi3) (uminv4hi3, uminv2si3): Remove. Replace with... (*smax<mode>3_iwmmxt, *umax<mode>3_iwmmxt, *smin<mode>3_iwmmxt) (*umin<mode>3_iwmmxt): These. (ashrv4hi3, ashrv2si3, ashrdi3_iwmmxt): Replace with... (ashr<mode>3_iwmmxt): This new pattern. (lshrv4hi3, lshrv2si3, lshrdi3_iwmmxt): Replace with... (lshr<mode>3_iwmmxt): This new pattern. (ashlv4hi3, ashlv2si3, ashldi3_iwmmxt): Replace with... (ashl<mode>3_iwmmxt): This new pattern. * config/arm/neon-docgen.ml: New file. Generate documentation for intrinsics. * config/arm/neon-gen.ml: New file. Generate arm_neon.h header. * config/arm/arm_neon.h: New (autogenerated). * config/arm/neon-testgen.ml: New file. Generate NEON tests automatically. * config/arm/neon.md: New file. Define NEON instructions. * config/arm/neon.ml: New file. Abstract description of NEON instructions, used to generate arm_neon.h header, documentation and tests. * config/arm/t-arm (MD_INCLUDES): Add vec-common.md, neon.md. * vec-common.md: New file. Shared parts for iWMMXt and NEON vector support. * doc/extend.texi (ARM Built-in Functions): Rename and remove extraneous comma. (ARM NEON Intrinsics): New subsection. * doc/arm-neon-intrinsics.texi: New (autogenerated). gcc/testsuite/ * gcc.dg/vect/vect.exp: Check is-effective-target arm_neon_hw. * gcc.dg/vect/tree-vect.h: Check for NEON SIMD support. * lib/gcc-dg.exp (cleanup-saved-temps): Fix comment. * lib/target-supports.exp (check_effective_target_arm_neon_ok) (check_effective_target_arm_neon_hw): New. * gcc.target/arm/neon/neon.exp: New file. * gcc.target/arm/neon/polytypes.c: New file. * gcc.target/arm/neon/v*.c (1870 files): New (autogenerated). Co-Authored-By: Joseph Myers <joseph@codesourcery.com> Co-Authored-By: Mark Shinwell <shinwell@codesourcery.com> Co-Authored-By: Paul Brook <paul@codesourcery.com> From-SVN: r126911
2007-07-25 14:28:31 +02:00
# Return 1 if the target supports executing NEON instructions, 0
# otherwise. Cache the result.
proc check_effective_target_arm_neon_hw { } {
target-supports.exp (get_compiler_messages): Replace with... gcc/testsuite/ * lib/target-supports.exp (get_compiler_messages): Replace with... (check_compile): ...this new procedure. Handle TYPE == executable. Use comments in the source to determine the correct extension. Return a pair containing the compiler output and the output filename. Don't delete the file here. (check_no_compiler_messages_nocache): New procedure. (check_no_compiler_messages): Use it. (check_no_messages_and_pattern_nocache): New procedure. (check_no_messages_and_pattern): Use it. (check_runtime_nocache, check_runtime): New procedures. (check_effective_target_tls): Use check_no_compiler_messages. (check_effective_target_tls_native): Use check_no_messages_and_pattern. (check_effective_target_tls_runtime): Use check_runtime. (check_effective_target_fstack_protector): Likewise. (check_iconv_available): Use check_runtime_nocache. (check_effective_target_fortran_large_real): Use check_no_compiler_messages. (check_effective_target_fortran_large_int): Likewise. (check_effective_target_static_libgfortran): Likewise. (check_750cl_hw_available): Use check_cached_effective_target and check_runtime_nocache. (check_vmx_hw_available): Likewise. (check_effective_target_broken_cplxf_arg): Likewise. (check_alpha_max_hw_available): Use check_runtime. (check_function_available): Use check_no_compiler_messages. (check_cxa_atexit_available): Use check_cached_effective_target and check_runtime_nocache. (check_effective_target_dfp_nocache): Use check_no_compiler_messages_nocache. (check_effective_target_dfprt_nocache): Use check_runtime_nocache. (check_effective_target_dfp): Use check_cached_effective_target. (check_effective_target_dfprt): Likewise. (check_effective_target_arm_neon_hw): Use check_runtime. (check_effective_target_ultrasparc_hw): Likewise. (check_effective_target_c99_runtime): Use check_no_compiler_messages_nocache. From-SVN: r130599
2007-12-04 11:16:17 +01:00
return [check_runtime arm_neon_hw_available {
int
main (void)
{
long long a = 0, b = 1;
asm ("vorr %P0, %P1, %P2"
: "=w" (a)
: "0" (a), "w" (b));
return (a != 1);
}
} "-mfpu=neon -mfloat-abi=softfp"]
Makefile.in (TEXI_GCC_FILES): Add arm-neon-intrinsics.texi. gcc/ * Makefile.in (TEXI_GCC_FILES): Add arm-neon-intrinsics.texi. * config.gcc (arm*-*-*): Add arm_neon.h to extra headers. (with_fpu): Allow --with-fpu=neon. * config/arm/aof.h (ADDITIONAL_REGISTER_NAMES): Add Q0-Q15. * config/arm/aout.h (ADDITIONAL_REGISTER_NAMES): Add Q0-Q15. * config/arm/arm-modes.def (EI, OI, CI, XI): New modes. * config/arm/arm-protos.h (neon_immediate_valid_for_move) (neon_immediate_valid_for_logic, neon_output_logic_immediate) (neon_pairwise_reduce, neon_expand_vector_init, neon_reinterpret) (neon_emit_pair_result_insn, neon_disambiguate_copy) (neon_vector_mem_operand, neon_struct_mem_operand, output_move_quad) (output_move_neon): Add prototypes. * config/arm/arm.c (FL_NEON): New flag for NEON processor capability. (all_fpus): Add FPUTYPE_NEON. (fp_model_for_fpu): Add NEON field. (arm_return_in_memory): Return vectors <= 16 bytes in ARM registers. (arm_arg_partial_bytes): Allow NEON vectors to be passed partially in registers. (arm_legitimate_address_p): Don't support fancy addressing for NEON structure moves. (thumb2_legitimate_address_p): Likewise. (neon_valid_immediate): Recognize and prepare constants suitable for NEON instructions. (neon_immediate_valid_for_move): New function. Recognize and prepare immediates for NEON move instructions. (neon_immediate_valid_for_logic): New function. Recognize and prepare immediates for NEON logic instructions. (neon_output_logic_immediate): New function. Create asm string suitable for outputting immediate logic instructions. (neon_pairwise_reduce): New function. Implement reduction using pairwise operations. (neon_expand_vector_init): New function. Expand a (possibly non-constant) vector initialization. (neon_vector_mem_operand): New function. Memory operands supported for quad-word loads/stores to/from ARM or NEON registers. Don't allow base+offset addressing for core regs. (neon_struct_mem_operand): New function. Valid mems for NEON structure moves. (coproc_secondary_reload_class): Enable NEON registers to be loaded from neon_vector_mem_operand addresses without a secondary register. (add_minipool_forward_ref): Handle >8-byte minipool entries. (add_minipool_backward_ref): Likewise. (dump_minipool): Likewise. (push_minipool_fix): Likewise. (output_move_quad): New function. Output quad-word moves, loads and stores using ARM registers. (output_move_vfp): Add support for vectors in VFP (NEON) D registers. (output_move_neon): Output a NEON load/store to/from a quadword register. (arm_print_operand): Implement new codes: - 'c' for unadorned integers (without a # sign). - 'J', 'K' for reg+2/reg+3, reg+3/reg+2 in little/big-endian mode. - 'e', 'f' for the low and high D parts of a NEON Q register. - 'q' outputs a NEON Q register. - 'h' outputs ranges of D registers for VLDM/VSTM etc. - 'T' prints NEON opcode features from a coded bitmask. - 'F' is similar to T, but signed/unsigned codes both print as 'i'. - 't' is similar to T, but 'u' is printed instead of 'p'. - 'O' prints 'r' if NEON instruction should perform rounding (as specified by bitmask), else prints nothing. - '#' is a punctuation character to stop operand numbers from running together with following digits in the assembler strings for instructions (when using mode attributes). (arm_assemble_integer): Handle extra NEON vector modes. Permute constant vectors in big-endian mode, where necessary. (arm_hard_regno_mode_ok): Allow vectors in VFP/NEON registers. Handle EI, OI, CI, XI modes. (ashlv4hi3, ashlv2si3, lshrv4hi3, lshrv2si3, ashrv4hi3) (ashrv2si3): Rename IWMMXT2_BUILTINs to... (ashlv4hi3_iwmmxt, ashlv2si3_iwmmxt, lshrv4hi3_iwmmxt) (lshrv2si3_iwmmxt, ashrv4hi3_iwmmxt, ashrv2si3_iwmmxt): New names. (neon_builtin_type_bits): Add enumeration, one bit for each vector type. (v8qi_UP, v4hi_UP, v2si_UP, v2sf_UP, di_UP, v16qi_UP, v8hi_UP) (v4si_UP, v4sf_UP, v2di_UP, ti_UP, ei_UP, oi_UP, UP): Define macros to turn v8qi, etc. into bits defined above. (neon_itype): New enumeration. Classifications of NEON builtins. (neon_builtin_datum): Define struct. Contains information about a single builtin (with multiple modes). (CF): Define helper macro for... (VAR1...VAR10): Define builtins with a type, name and 1-10 different modes. (neon_builtin_data): New array. Define information about builtins for use during initialization/expansion. (arm_init_neon_builtins): New function. (arm_init_builtins): Call arm_init_neon_builtins if TARGET_NEON is true. (neon_builtin_compare): New function. (locate_neon_builtin_icode): New function. Find an insn code for a builtin given a function code for that builtin. Also return type of builtin (NEON_BINOP, NEON_UNOP etc.). (builtin_arg): New enumeration. Types of arguments for builtins. (arm_expand_neon_args): New function. Expand a generic NEON builtin. Takes a variable argument list of builtin_arg types, terminated by NEON_ARG_STOP. (arm_expand_neon_builtin): New function. Expand a NEON builtin. (neon_reinterpret): New function. Expand NEON reinterpret intrinsic. (neon_emit_pair_result_insn): New function. Support returning pairs of vectors via a pointer. (neon_disambiguate_copy): New function. Set up operands for a multi-word copy such that registers do not get clobbered. (arm_expand_builtin): Call arm_expand_neon_builtin if fcode >= ARM_BUILTIN_NEON_BASE. (arm_file_start): Set float-abi attribute for NEON. (arm_vector_mode_supported_p): Enable NEON vector modes. (arm_mangle_map_entry): New. (arm_mangle_map): New. (arm_mangle_vector_type): New. * config/arm/arm.h (TARGET_CPU_CPP_BUILTINS): Define __ARM_NEON__ when appropriate. (TARGET_NEON): New macro. Target supports NEON. (fputype): Add FPUTYPE_NEON. (UNITS_PER_SIMD_WORD): Define. Allow quad-word registers to be used for vectorization based on command-line arg. (NEON_REGNO_OK_FOR_NREGS): Define. (VALID_NEON_DREG_MODE, VALID_NEON_QREG_MODE) (VALID_NEON_STRUCT_MODE): Define. (PRINT_OPERAND_PUNCT_VALID_P): '#' is valid punctuation. (arm_builtins): Add ARM_BUILTIN_NEON_BASE. * config/arm/arm.md (VUNSPEC_POOL_16): Insert constant for unspec. (consttable_16): Add pattern for outputting 16-byte minipool entries. (movv2si, movv4hi, movv8qi): Remove blank expanders (redefined in vec-common.md). (vec-common.md, neon.md): Include md files. * config/arm/arm.opt (mvectorize-with-neon-quad): Add option. * config/arm/constraints.md (constraint "Dn", "Dl", "DL"): Define. (memory_constraint "Ut", "Un", "Us"): Define. * config/arm/iwmmxt.md (VMMX, VSHFT): New mode macros. (MMX_char): New mode attribute. (addv8qi3, addv4hi3, addv2si3): Remove. Replace with... (*add<mode>3_iwmmxt): New insn pattern. (subv8qi3, subv4hi3, subv2si3): Remove. Replace with... (*sub<mode>3_iwmmxt): New insn pattern. (mulv4hi3): Rename to... (*mulv4hi3_iwmmxt): This. (smaxv8qi3, smaxv4hi3, smaxv2si3, umaxv8qi3, umaxv4hi3) (umaxv2si3, sminv8qi3, sminv4hi3, sminv2si3, uminv8qi3) (uminv4hi3, uminv2si3): Remove. Replace with... (*smax<mode>3_iwmmxt, *umax<mode>3_iwmmxt, *smin<mode>3_iwmmxt) (*umin<mode>3_iwmmxt): These. (ashrv4hi3, ashrv2si3, ashrdi3_iwmmxt): Replace with... (ashr<mode>3_iwmmxt): This new pattern. (lshrv4hi3, lshrv2si3, lshrdi3_iwmmxt): Replace with... (lshr<mode>3_iwmmxt): This new pattern. (ashlv4hi3, ashlv2si3, ashldi3_iwmmxt): Replace with... (ashl<mode>3_iwmmxt): This new pattern. * config/arm/neon-docgen.ml: New file. Generate documentation for intrinsics. * config/arm/neon-gen.ml: New file. Generate arm_neon.h header. * config/arm/arm_neon.h: New (autogenerated). * config/arm/neon-testgen.ml: New file. Generate NEON tests automatically. * config/arm/neon.md: New file. Define NEON instructions. * config/arm/neon.ml: New file. Abstract description of NEON instructions, used to generate arm_neon.h header, documentation and tests. * config/arm/t-arm (MD_INCLUDES): Add vec-common.md, neon.md. * vec-common.md: New file. Shared parts for iWMMXt and NEON vector support. * doc/extend.texi (ARM Built-in Functions): Rename and remove extraneous comma. (ARM NEON Intrinsics): New subsection. * doc/arm-neon-intrinsics.texi: New (autogenerated). gcc/testsuite/ * gcc.dg/vect/vect.exp: Check is-effective-target arm_neon_hw. * gcc.dg/vect/tree-vect.h: Check for NEON SIMD support. * lib/gcc-dg.exp (cleanup-saved-temps): Fix comment. * lib/target-supports.exp (check_effective_target_arm_neon_ok) (check_effective_target_arm_neon_hw): New. * gcc.target/arm/neon/neon.exp: New file. * gcc.target/arm/neon/polytypes.c: New file. * gcc.target/arm/neon/v*.c (1870 files): New (autogenerated). Co-Authored-By: Joseph Myers <joseph@codesourcery.com> Co-Authored-By: Mark Shinwell <shinwell@codesourcery.com> Co-Authored-By: Paul Brook <paul@codesourcery.com> From-SVN: r126911
2007-07-25 14:28:31 +02:00
}
# Return 1 if this is a ARM target with NEON enabled.
proc check_effective_target_arm_neon { } {
if { [check_effective_target_arm32] } {
return [check_no_compiler_messages arm_neon object {
#ifndef __ARM_NEON__
#error not NEON
#else
int dummy;
#endif
}]
} else {
return 0
}
}
mips-modes.def: Add V8QI, V4HI and V2SI modes. 2008-06-15 Mark Shinwell <shinwell@codesourcery.com> Nathan Sidwell <nathan@codesourcery.com> Maxim Kuvyrkov <maxim@codesourcery.com> Richard Sandiford <rdsandiford@googlemail.com> * config/mips/mips-modes.def: Add V8QI, V4HI and V2SI modes. * config/mips/mips-protos.h (mips_expand_vector_init): New. * config/mips/mips-ftypes.def: Add function types for Loongson-2E/2F builtins. * config/mips/mips.c (mips_split_doubleword_move): Handle new modes. (mips_hard_regno_mode_ok_p): Allow 64-bit vector modes for Loongson. (mips_vector_mode_supported_p): Add V2SImode, V4HImode and V8QImode cases. (LOONGSON_BUILTIN, LOONGSON_BUILTIN_ALIAS): New. (CODE_FOR_loongson_packsswh, CODE_FOR_loongson_packsshb, (CODE_FOR_loongson_packushb, CODE_FOR_loongson_paddw, (CODE_FOR_loongson_paddh, CODE_FOR_loongson_paddb, (CODE_FOR_loongson_paddsh, CODE_FOR_loongson_paddsb) (CODE_FOR_loongson_paddush, CODE_FOR_loongson_paddusb) (CODE_FOR_loongson_pmaxsh, CODE_FOR_loongson_pmaxub) (CODE_FOR_loongson_pminsh, CODE_FOR_loongson_pminub) (CODE_FOR_loongson_pmulhuh, CODE_FOR_loongson_pmulhh) (CODE_FOR_loongson_biadd, CODE_FOR_loongson_psubw) (CODE_FOR_loongson_psubh, CODE_FOR_loongson_psubb) (CODE_FOR_loongson_psubsh, CODE_FOR_loongson_psubsb) (CODE_FOR_loongson_psubush, CODE_FOR_loongson_psubusb) (CODE_FOR_loongson_punpckhbh, CODE_FOR_loongson_punpckhhw) (CODE_FOR_loongson_punpckhwd, CODE_FOR_loongson_punpcklbh) (CODE_FOR_loongson_punpcklhw, CODE_FOR_loongson_punpcklwd): New. (mips_builtins): Add Loongson builtins. (mips_loongson_2ef_bdesc): New. (mips_bdesc_arrays): Add mips_loongson_2ef_bdesc. (mips_builtin_vector_type): Handle unsigned versions of vector modes. (MIPS_ATYPE_UQI, MIPS_ATYPE_UDI, MIPS_ATYPE_V2SI, MIPS_ATYPE_UV2SI) (MIPS_ATYPE_V4HI, MIPS_ATYPE_UV4HI, MIPS_ATYPE_V8QI, MIPS_ATYPE_UV8QI): New. (mips_expand_vector_init): New. * config/mips/mips.h (HAVE_LOONGSON_VECTOR_MODES): New. (TARGET_CPU_CPP_BUILTINS): Define __mips_loongson_vector_rev if appropriate. * config/mips/mips.md: Add unspec numbers for Loongson builtins. Include loongson.md. (MOVE64): Include Loongson vector modes. (SPLITF): Include Loongson vector modes. (HALFMODE): Handle Loongson vector modes. * config/mips/loongson.md: New. * config/mips/loongson.h: New. * config.gcc: Add loongson.h header for mips*-*-* targets. * doc/extend.texi (MIPS Loongson Built-in Functions): New. 2008-06-15 Mark Shinwell <shinwell@codesourcery.com> * lib/target-supports.exp (check_effective_target_mips_loongson): New. * gcc.target/mips/loongson-simd.c: New. Co-Authored-By: Maxim Kuvyrkov <maxim@codesourcery.com> Co-Authored-By: Nathan Sidwell <nathan@codesourcery.com> Co-Authored-By: Richard Sandiford <rdsandiford@googlemail.com> From-SVN: r136800
2008-06-15 08:29:06 +02:00
# Return 1 if this a Loongson-2E or -2F target using an ABI that supports
# the Loongson vector modes.
proc check_effective_target_mips_loongson { } {
return [check_no_compiler_messages loongson assembly {
#if !defined(__mips_loongson_vector_rev)
#error FOO
#endif
}]
}
# Return 1 if this is an ARM target that adheres to the ABI for the ARM
# Architecture.
proc check_effective_target_arm_eabi { } {
return [check_no_compiler_messages arm_eabi object {
#ifndef __ARM_EABI__
#error not EABI
#else
int dummy;
#endif
}]
}
target-supports.exp (check_effective_target_powerpc_fprs, [...]): New. * lib/target-supports.exp (check_effective_target_powerpc_fprs, check_effective_target_powerpc_altivec_ok): New. * g++.dg/eh/simd-2.C, g++.dg/ext/altivec-1.C, g++.dg/ext/altivec-10.C, g++.dg/ext/altivec-11.C, g++.dg/ext/altivec-12.C, g++.dg/ext/altivec-13.C, g++.dg/ext/altivec-2.C, g++.dg/ext/altivec-3.C, g++.dg/ext/altivec-4.C, g++.dg/ext/altivec-5.C, g++.dg/ext/altivec-6.C, g++.dg/ext/altivec-7.C, g++.dg/ext/altivec-8.C, g++.dg/ext/altivec-9.C, g++.dg/ext/altivec-types-1.C, g++.dg/ext/altivec-types-2.C, g++.dg/ext/altivec-types-3.C, g++.dg/ext/altivec-types-4.C, gcc.dg/dfp/altivec-types.c, gcc.dg/simd-3.c, gcc.dg/vect/vect-82_64.c, gcc.dg/vect/vect-83_64.c, gcc.dg/vmx/vmx.exp, gcc.target/powerpc/980827-1.c, gcc.target/powerpc/altivec-1.c, gcc.target/powerpc/altivec-10.c, gcc.target/powerpc/altivec-11.c, gcc.target/powerpc/altivec-12.c, gcc.target/powerpc/altivec-13.c, gcc.target/powerpc/altivec-14.c, gcc.target/powerpc/altivec-15.c, gcc.target/powerpc/altivec-16.c, gcc.target/powerpc/altivec-17.c, gcc.target/powerpc/altivec-18.c, gcc.target/powerpc/altivec-19.c, gcc.target/powerpc/altivec-2.c, gcc.target/powerpc/altivec-21.c, gcc.target/powerpc/altivec-22.c, gcc.target/powerpc/altivec-3.c, gcc.target/powerpc/altivec-4.c, gcc.target/powerpc/altivec-5.c, gcc.target/powerpc/altivec-6.c, gcc.target/powerpc/altivec-7.c, gcc.target/powerpc/altivec-8.c, gcc.target/powerpc/altivec-9.c, gcc.target/powerpc/altivec-consts.c, gcc.target/powerpc/altivec-pr22085.c, gcc.target/powerpc/altivec-splat.c, gcc.target/powerpc/altivec-types-1.c, gcc.target/powerpc/altivec-types-2.c, gcc.target/powerpc/altivec-types-3.c, gcc.target/powerpc/altivec-types-4.c, gcc.target/powerpc/altivec-varargs-1.c, gcc.target/powerpc/altivec-vec-merge.c, gcc.target/powerpc/ppc-vector-memcpy.c, gcc.target/powerpc/ppc-vector-memset.c, gcc.target/powerpc/ppc64-abi-2.c, gcc.target/powerpc/pr16155.c, gcc.target/powerpc/pr16286.c, gcc.target/powerpc/pr27158.c: Use these effective targets. * gcc.dg/vmx/pr27006.c: Add missing close brace. * gcc.dg/20020103-1.c: XFAIL on powerpc*-*-*. From-SVN: r113709
2006-05-11 21:56:21 +02:00
# Return 1 if this is a PowerPC target with floating-point registers.
proc check_effective_target_powerpc_fprs { } {
if { [istarget powerpc*-*-*]
|| [istarget rs6000-*-*] } {
return [check_no_compiler_messages powerpc_fprs object {
#ifdef __NO_FPRS__
#error no FPRs
#else
int dummy;
#endif
}]
} else {
return 0
}
}
# Return 1 if this is a PowerPC target with hardware double-precision
# floating point.
proc check_effective_target_powerpc_hard_double { } {
if { [istarget powerpc*-*-*]
|| [istarget rs6000-*-*] } {
return [check_no_compiler_messages powerpc_hard_double object {
#ifdef _SOFT_DOUBLE
#error soft double
#else
int dummy;
#endif
}]
} else {
return 0
}
}
target-supports.exp (check_effective_target_powerpc_fprs, [...]): New. * lib/target-supports.exp (check_effective_target_powerpc_fprs, check_effective_target_powerpc_altivec_ok): New. * g++.dg/eh/simd-2.C, g++.dg/ext/altivec-1.C, g++.dg/ext/altivec-10.C, g++.dg/ext/altivec-11.C, g++.dg/ext/altivec-12.C, g++.dg/ext/altivec-13.C, g++.dg/ext/altivec-2.C, g++.dg/ext/altivec-3.C, g++.dg/ext/altivec-4.C, g++.dg/ext/altivec-5.C, g++.dg/ext/altivec-6.C, g++.dg/ext/altivec-7.C, g++.dg/ext/altivec-8.C, g++.dg/ext/altivec-9.C, g++.dg/ext/altivec-types-1.C, g++.dg/ext/altivec-types-2.C, g++.dg/ext/altivec-types-3.C, g++.dg/ext/altivec-types-4.C, gcc.dg/dfp/altivec-types.c, gcc.dg/simd-3.c, gcc.dg/vect/vect-82_64.c, gcc.dg/vect/vect-83_64.c, gcc.dg/vmx/vmx.exp, gcc.target/powerpc/980827-1.c, gcc.target/powerpc/altivec-1.c, gcc.target/powerpc/altivec-10.c, gcc.target/powerpc/altivec-11.c, gcc.target/powerpc/altivec-12.c, gcc.target/powerpc/altivec-13.c, gcc.target/powerpc/altivec-14.c, gcc.target/powerpc/altivec-15.c, gcc.target/powerpc/altivec-16.c, gcc.target/powerpc/altivec-17.c, gcc.target/powerpc/altivec-18.c, gcc.target/powerpc/altivec-19.c, gcc.target/powerpc/altivec-2.c, gcc.target/powerpc/altivec-21.c, gcc.target/powerpc/altivec-22.c, gcc.target/powerpc/altivec-3.c, gcc.target/powerpc/altivec-4.c, gcc.target/powerpc/altivec-5.c, gcc.target/powerpc/altivec-6.c, gcc.target/powerpc/altivec-7.c, gcc.target/powerpc/altivec-8.c, gcc.target/powerpc/altivec-9.c, gcc.target/powerpc/altivec-consts.c, gcc.target/powerpc/altivec-pr22085.c, gcc.target/powerpc/altivec-splat.c, gcc.target/powerpc/altivec-types-1.c, gcc.target/powerpc/altivec-types-2.c, gcc.target/powerpc/altivec-types-3.c, gcc.target/powerpc/altivec-types-4.c, gcc.target/powerpc/altivec-varargs-1.c, gcc.target/powerpc/altivec-vec-merge.c, gcc.target/powerpc/ppc-vector-memcpy.c, gcc.target/powerpc/ppc-vector-memset.c, gcc.target/powerpc/ppc64-abi-2.c, gcc.target/powerpc/pr16155.c, gcc.target/powerpc/pr16286.c, gcc.target/powerpc/pr27158.c: Use these effective targets. * gcc.dg/vmx/pr27006.c: Add missing close brace. * gcc.dg/20020103-1.c: XFAIL on powerpc*-*-*. From-SVN: r113709
2006-05-11 21:56:21 +02:00
# Return 1 if this is a PowerPC target supporting -maltivec.
proc check_effective_target_powerpc_altivec_ok { } {
if { ([istarget powerpc*-*-*]
&& ![istarget powerpc-*-linux*paired*])
target-supports.exp (check_effective_target_powerpc_fprs, [...]): New. * lib/target-supports.exp (check_effective_target_powerpc_fprs, check_effective_target_powerpc_altivec_ok): New. * g++.dg/eh/simd-2.C, g++.dg/ext/altivec-1.C, g++.dg/ext/altivec-10.C, g++.dg/ext/altivec-11.C, g++.dg/ext/altivec-12.C, g++.dg/ext/altivec-13.C, g++.dg/ext/altivec-2.C, g++.dg/ext/altivec-3.C, g++.dg/ext/altivec-4.C, g++.dg/ext/altivec-5.C, g++.dg/ext/altivec-6.C, g++.dg/ext/altivec-7.C, g++.dg/ext/altivec-8.C, g++.dg/ext/altivec-9.C, g++.dg/ext/altivec-types-1.C, g++.dg/ext/altivec-types-2.C, g++.dg/ext/altivec-types-3.C, g++.dg/ext/altivec-types-4.C, gcc.dg/dfp/altivec-types.c, gcc.dg/simd-3.c, gcc.dg/vect/vect-82_64.c, gcc.dg/vect/vect-83_64.c, gcc.dg/vmx/vmx.exp, gcc.target/powerpc/980827-1.c, gcc.target/powerpc/altivec-1.c, gcc.target/powerpc/altivec-10.c, gcc.target/powerpc/altivec-11.c, gcc.target/powerpc/altivec-12.c, gcc.target/powerpc/altivec-13.c, gcc.target/powerpc/altivec-14.c, gcc.target/powerpc/altivec-15.c, gcc.target/powerpc/altivec-16.c, gcc.target/powerpc/altivec-17.c, gcc.target/powerpc/altivec-18.c, gcc.target/powerpc/altivec-19.c, gcc.target/powerpc/altivec-2.c, gcc.target/powerpc/altivec-21.c, gcc.target/powerpc/altivec-22.c, gcc.target/powerpc/altivec-3.c, gcc.target/powerpc/altivec-4.c, gcc.target/powerpc/altivec-5.c, gcc.target/powerpc/altivec-6.c, gcc.target/powerpc/altivec-7.c, gcc.target/powerpc/altivec-8.c, gcc.target/powerpc/altivec-9.c, gcc.target/powerpc/altivec-consts.c, gcc.target/powerpc/altivec-pr22085.c, gcc.target/powerpc/altivec-splat.c, gcc.target/powerpc/altivec-types-1.c, gcc.target/powerpc/altivec-types-2.c, gcc.target/powerpc/altivec-types-3.c, gcc.target/powerpc/altivec-types-4.c, gcc.target/powerpc/altivec-varargs-1.c, gcc.target/powerpc/altivec-vec-merge.c, gcc.target/powerpc/ppc-vector-memcpy.c, gcc.target/powerpc/ppc-vector-memset.c, gcc.target/powerpc/ppc64-abi-2.c, gcc.target/powerpc/pr16155.c, gcc.target/powerpc/pr16286.c, gcc.target/powerpc/pr27158.c: Use these effective targets. * gcc.dg/vmx/pr27006.c: Add missing close brace. * gcc.dg/20020103-1.c: XFAIL on powerpc*-*-*. From-SVN: r113709
2006-05-11 21:56:21 +02:00
|| [istarget rs6000-*-*] } {
# AltiVec is not supported on AIX before 5.3.
if { [istarget powerpc*-*-aix4*]
|| [istarget powerpc*-*-aix5.1*]
|| [istarget powerpc*-*-aix5.2*] } {
target-supports.exp (check_effective_target_powerpc_fprs, [...]): New. * lib/target-supports.exp (check_effective_target_powerpc_fprs, check_effective_target_powerpc_altivec_ok): New. * g++.dg/eh/simd-2.C, g++.dg/ext/altivec-1.C, g++.dg/ext/altivec-10.C, g++.dg/ext/altivec-11.C, g++.dg/ext/altivec-12.C, g++.dg/ext/altivec-13.C, g++.dg/ext/altivec-2.C, g++.dg/ext/altivec-3.C, g++.dg/ext/altivec-4.C, g++.dg/ext/altivec-5.C, g++.dg/ext/altivec-6.C, g++.dg/ext/altivec-7.C, g++.dg/ext/altivec-8.C, g++.dg/ext/altivec-9.C, g++.dg/ext/altivec-types-1.C, g++.dg/ext/altivec-types-2.C, g++.dg/ext/altivec-types-3.C, g++.dg/ext/altivec-types-4.C, gcc.dg/dfp/altivec-types.c, gcc.dg/simd-3.c, gcc.dg/vect/vect-82_64.c, gcc.dg/vect/vect-83_64.c, gcc.dg/vmx/vmx.exp, gcc.target/powerpc/980827-1.c, gcc.target/powerpc/altivec-1.c, gcc.target/powerpc/altivec-10.c, gcc.target/powerpc/altivec-11.c, gcc.target/powerpc/altivec-12.c, gcc.target/powerpc/altivec-13.c, gcc.target/powerpc/altivec-14.c, gcc.target/powerpc/altivec-15.c, gcc.target/powerpc/altivec-16.c, gcc.target/powerpc/altivec-17.c, gcc.target/powerpc/altivec-18.c, gcc.target/powerpc/altivec-19.c, gcc.target/powerpc/altivec-2.c, gcc.target/powerpc/altivec-21.c, gcc.target/powerpc/altivec-22.c, gcc.target/powerpc/altivec-3.c, gcc.target/powerpc/altivec-4.c, gcc.target/powerpc/altivec-5.c, gcc.target/powerpc/altivec-6.c, gcc.target/powerpc/altivec-7.c, gcc.target/powerpc/altivec-8.c, gcc.target/powerpc/altivec-9.c, gcc.target/powerpc/altivec-consts.c, gcc.target/powerpc/altivec-pr22085.c, gcc.target/powerpc/altivec-splat.c, gcc.target/powerpc/altivec-types-1.c, gcc.target/powerpc/altivec-types-2.c, gcc.target/powerpc/altivec-types-3.c, gcc.target/powerpc/altivec-types-4.c, gcc.target/powerpc/altivec-varargs-1.c, gcc.target/powerpc/altivec-vec-merge.c, gcc.target/powerpc/ppc-vector-memcpy.c, gcc.target/powerpc/ppc-vector-memset.c, gcc.target/powerpc/ppc64-abi-2.c, gcc.target/powerpc/pr16155.c, gcc.target/powerpc/pr16286.c, gcc.target/powerpc/pr27158.c: Use these effective targets. * gcc.dg/vmx/pr27006.c: Add missing close brace. * gcc.dg/20020103-1.c: XFAIL on powerpc*-*-*. From-SVN: r113709
2006-05-11 21:56:21 +02:00
return 0
}
return [check_no_compiler_messages powerpc_altivec_ok object {
int dummy;
} "-maltivec"]
} else {
return 0
}
}
# Return 1 if this is a PowerPC target supporting -mcpu=cell.
proc check_effective_target_powerpc_ppu_ok { } {
if [check_effective_target_powerpc_altivec_ok] {
return [check_no_compiler_messages cell_asm_available object {
int main (void) {
#ifdef __MACH__
asm volatile ("lvlx v0,v0,v0");
#else
asm volatile ("lvlx 0,0,0");
#endif
return 0;
}
}]
} else {
return 0
}
}
# Return 1 if this is a PowerPC target that supports SPU.
proc check_effective_target_powerpc_spu { } {
if [istarget powerpc*-*-linux*] {
return [check_effective_target_powerpc_altivec_ok]
} else {
return 0
}
}
# Return 1 if this is a PowerPC SPE target. The check includes options
# specified by dg-options for this test, so don't cache the result.
proc check_effective_target_powerpc_spe_nocache { } {
if { [istarget powerpc*-*-*] } {
return [check_no_compiler_messages_nocache powerpc_spe object {
#ifndef __SPE__
#error not SPE
#else
int dummy;
#endif
} [current_compiler_flags]]
} else {
return 0
}
}
# Return 1 if this is a PowerPC target with SPE enabled.
proc check_effective_target_powerpc_spe { } {
if { [istarget powerpc*-*-*] } {
return [check_no_compiler_messages powerpc_spe object {
#ifndef __SPE__
#error not SPE
#else
int dummy;
#endif
}]
} else {
return 0
}
}
# Return 1 if this is a PowerPC target with Altivec enabled.
proc check_effective_target_powerpc_altivec { } {
if { [istarget powerpc*-*-*] } {
return [check_no_compiler_messages powerpc_altivec object {
#ifndef __ALTIVEC__
#error not Altivec
#else
int dummy;
#endif
}]
} else {
return 0
}
}
target-supports.exp: Add method to determine if the effective target is really a ppc405 after... 2009-01-09 Joel Sherrill <joel.sherrill@oarcorp.com> * lib/target-supports.exp: Add method to determine if the effective target is really a ppc405 after applying all compile options. * gcc.target/powerpc/405-mulhhwu-2.c: Add dg-skip-if not ppc405. * gcc.target/powerpc/405-nmachhw-1.c: Likewise. * gcc.target/powerpc/405-nmaclhw-1.c: Likewise. * gcc.target/powerpc/405-machhwu-1.c: Likewise. * gcc.target/powerpc/405-mullhwu-1.c: Likewise. * gcc.target/powerpc/405-nmacchw-1.c: Likewise. * gcc.target/powerpc/405-mulchwu-1.c: Likewise. * gcc.target/powerpc/405-nmachhw-2.c: Likewise. * gcc.target/powerpc/405-nmaclhw-2.c: Likewise. * gcc.target/powerpc/405-machhwu-2.c: Likewise. * gcc.target/powerpc/405-mulhhw-1.c: Likewise. * gcc.target/powerpc/405-machhw-1.c: Likewise. * gcc.target/powerpc/405-mullhw-1.c: Likewise. * gcc.target/powerpc/405-maclhw-1.c: Likewise. * gcc.target/powerpc/405-dlmzb-strlen-1.c: Likewise. * gcc.target/powerpc/405-mullhwu-2.c: Likewise. * gcc.target/powerpc/405-nmacchw-2.c: Likewise. * gcc.target/powerpc/405-mulchwu-2.c: Likewise. * gcc.target/powerpc/405-mulchw-1.c: Likewise. * gcc.target/powerpc/405-maclhwu-1.c: Likewise. * gcc.target/powerpc/405-macchw-1.c: Likewise. * gcc.target/powerpc/405-mulhhw-2.c: Likewise. * gcc.target/powerpc/405-machhw-2.c: Likewise. * gcc.target/powerpc/405-mullhw-2.c: Likewise. * gcc.target/powerpc/405-maclhw-2.c: Likewise. * gcc.target/powerpc/405-macchwu-1.c: Likewise. * gcc.target/powerpc/405-mulhhwu-1.c: Likewise. * gcc.target/powerpc/405-mulchw-2.c: Likewise. * gcc.target/powerpc/405-maclhwu-2.c: Likewise. * gcc.target/powerpc/405-macchw-2.c: Likewise. * gcc.target/powerpc/405-macchwu-2.c: Likewise. From-SVN: r143279
2009-01-11 20:51:53 +01:00
# Return 1 if this is a PowerPC 405 target. The check includes options
# specified by dg-options for this test, so don't cache the result.
proc check_effective_target_powerpc_405_nocache { } {
if { [istarget powerpc*-*-*] || [istarget rs6000-*-*] } {
return [check_no_compiler_messages_nocache powerpc_405 object {
#ifdef __PPC405__
int dummy;
#else
#error not a PPC405
#endif
} [current_compiler_flags]]
} else {
return 0
}
}
# Return 1 if this is a SPU target with a toolchain that
# supports automatic overlay generation.
proc check_effective_target_spu_auto_overlay { } {
if { [istarget spu*-*-elf*] } {
return [check_no_compiler_messages spu_auto_overlay executable {
int main (void) { }
} "-Wl,--auto-overlay" ]
} else {
return 0
}
}
# The VxWorks SPARC simulator accepts only EM_SPARC executables and
# chokes on EM_SPARC32PLUS or EM_SPARCV9 executables. Return 1 if the
# test environment appears to run executables on such a simulator.
proc check_effective_target_ultrasparc_hw { } {
target-supports.exp (get_compiler_messages): Replace with... gcc/testsuite/ * lib/target-supports.exp (get_compiler_messages): Replace with... (check_compile): ...this new procedure. Handle TYPE == executable. Use comments in the source to determine the correct extension. Return a pair containing the compiler output and the output filename. Don't delete the file here. (check_no_compiler_messages_nocache): New procedure. (check_no_compiler_messages): Use it. (check_no_messages_and_pattern_nocache): New procedure. (check_no_messages_and_pattern): Use it. (check_runtime_nocache, check_runtime): New procedures. (check_effective_target_tls): Use check_no_compiler_messages. (check_effective_target_tls_native): Use check_no_messages_and_pattern. (check_effective_target_tls_runtime): Use check_runtime. (check_effective_target_fstack_protector): Likewise. (check_iconv_available): Use check_runtime_nocache. (check_effective_target_fortran_large_real): Use check_no_compiler_messages. (check_effective_target_fortran_large_int): Likewise. (check_effective_target_static_libgfortran): Likewise. (check_750cl_hw_available): Use check_cached_effective_target and check_runtime_nocache. (check_vmx_hw_available): Likewise. (check_effective_target_broken_cplxf_arg): Likewise. (check_alpha_max_hw_available): Use check_runtime. (check_function_available): Use check_no_compiler_messages. (check_cxa_atexit_available): Use check_cached_effective_target and check_runtime_nocache. (check_effective_target_dfp_nocache): Use check_no_compiler_messages_nocache. (check_effective_target_dfprt_nocache): Use check_runtime_nocache. (check_effective_target_dfp): Use check_cached_effective_target. (check_effective_target_dfprt): Likewise. (check_effective_target_arm_neon_hw): Use check_runtime. (check_effective_target_ultrasparc_hw): Likewise. (check_effective_target_c99_runtime): Use check_no_compiler_messages_nocache. From-SVN: r130599
2007-12-04 11:16:17 +01:00
return [check_runtime ultrasparc_hw {
int main() { return 0; }
} "-mcpu=ultrasparc"]
}
# Return 1 if the target supports hardware vector shift operation.
proc check_effective_target_vect_shift { } {
global et_vect_shift_saved
if [info exists et_vect_shift_saved] {
verbose "check_effective_target_vect_shift: using cached result" 2
} else {
set et_vect_shift_saved 0
if { ([istarget powerpc*-*-*]
&& ![istarget powerpc-*-linux*paired*])
|| [istarget ia64-*-*]
|| [istarget i?86-*-*]
|| [istarget x86_64-*-*]
|| [check_effective_target_arm32] } {
set et_vect_shift_saved 1
}
}
verbose "check_effective_target_vect_shift: returning $et_vect_shift_saved" 2
return $et_vect_shift_saved
}
# Return 1 if the target supports hardware vectors of long, 0 otherwise.
#
# This can change for different subtargets so do not cache the result.
proc check_effective_target_vect_long { } {
if { [istarget i?86-*-*]
|| (([istarget powerpc*-*-*]
&& ![istarget powerpc-*-linux*paired*])
&& [check_effective_target_ilp32])
|| [istarget x86_64-*-*]
|| [check_effective_target_arm32]
|| ([istarget sparc*-*-*] && [check_effective_target_ilp32]) } {
set answer 1
} else {
set answer 0
}
verbose "check_effective_target_vect_long: returning $answer" 2
return $answer
}
target-supports.exp (check_effective_target_vect_int): New * lib/target-supports.exp (check_effective_target_vect_int): New (check_effective_target_vect_float): New (check_effective_target_vect_double): New. (is-effective-target): Support new effective targets keywords. * gcc.dg/vect/vect.exp: Set target-dependent vector flags and default action for dg-do. * gcc.dg/vect/pr16105.c: Use new support. * gcc.dg/vect/pr18400.c: Ditto. * gcc.dg/vect/pr18425.c: Ditto. * gcc.dg/vect/vect-1.c: Ditto. * gcc.dg/vect/vect-10.c: Ditto. * gcc.dg/vect/vect-11.c: Ditto. * gcc.dg/vect/vect-12.c: Ditto. * gcc.dg/vect/vect-13.c: Ditto. * gcc.dg/vect/vect-14.c: Ditto. * gcc.dg/vect/vect-15.c: Ditto. * gcc.dg/vect/vect-16.c: Ditto. * gcc.dg/vect/vect-17.c: Ditto. * gcc.dg/vect/vect-18.c: Ditto. * gcc.dg/vect/vect-19.c: Ditto. * gcc.dg/vect/vect-2.c: Ditto. * gcc.dg/vect/vect-20.c: Ditto. * gcc.dg/vect/vect-21.c: Ditto. * gcc.dg/vect/vect-22.c: Ditto. * gcc.dg/vect/vect-23.c: Ditto. * gcc.dg/vect/vect-24.c: Ditto. * gcc.dg/vect/vect-25.c: Ditto. * gcc.dg/vect/vect-26.c: Ditto. * gcc.dg/vect/vect-27.c: Ditto. * gcc.dg/vect/vect-27a.c: Ditto. * gcc.dg/vect/vect-28.c: Ditto. * gcc.dg/vect/vect-29.c: Ditto. * gcc.dg/vect/vect-29a.c: Ditto. * gcc.dg/vect/vect-3.c: Ditto. * gcc.dg/vect/vect-30.c: Ditto. * gcc.dg/vect/vect-31.c: Ditto. * gcc.dg/vect/vect-32.c: Ditto. * gcc.dg/vect/vect-33.c: Ditto. * gcc.dg/vect/vect-34.c: Ditto. * gcc.dg/vect/vect-35.c: Ditto. * gcc.dg/vect/vect-36.c: Ditto. * gcc.dg/vect/vect-37.c: Ditto. * gcc.dg/vect/vect-38.c: Ditto. * gcc.dg/vect/vect-4.c: Ditto. * gcc.dg/vect/vect-40.c: Ditto. * gcc.dg/vect/vect-41.c: Ditto. * gcc.dg/vect/vect-42.c: Ditto. * gcc.dg/vect/vect-43.c: Ditto. * gcc.dg/vect/vect-44.c: Ditto. * gcc.dg/vect/vect-45.c: Ditto. * gcc.dg/vect/vect-46.c: Ditto. * gcc.dg/vect/vect-47.c: Ditto. * gcc.dg/vect/vect-48.c: Ditto. * gcc.dg/vect/vect-48a.c: Ditto. * gcc.dg/vect/vect-49.c: Ditto. * gcc.dg/vect/vect-5.c: Ditto. * gcc.dg/vect/vect-50.c: Ditto. * gcc.dg/vect/vect-51.c: Ditto. * gcc.dg/vect/vect-52.c: Ditto. * gcc.dg/vect/vect-53.c: Ditto. * gcc.dg/vect/vect-54.c: Ditto. * gcc.dg/vect/vect-55.c: Ditto. * gcc.dg/vect/vect-56.c: Ditto. * gcc.dg/vect/vect-56a.c: Ditto. * gcc.dg/vect/vect-57.c: Ditto. * gcc.dg/vect/vect-58.c: Ditto. * gcc.dg/vect/vect-59.c: Ditto. * gcc.dg/vect/vect-6.c: Ditto. * gcc.dg/vect/vect-60.c: Ditto. * gcc.dg/vect/vect-61.c: Ditto. * gcc.dg/vect/vect-62.c: Ditto. * gcc.dg/vect/vect-63.c: Ditto. * gcc.dg/vect/vect-64.c: Ditto. * gcc.dg/vect/vect-65.c: Ditto. * gcc.dg/vect/vect-66.c: Ditto. * gcc.dg/vect/vect-67.c: Ditto. * gcc.dg/vect/vect-68.c: Ditto. * gcc.dg/vect/vect-69.c: Ditto. * gcc.dg/vect/vect-7.c: Ditto. * gcc.dg/vect/vect-72.c: Ditto. * gcc.dg/vect/vect-72a.c: Ditto. * gcc.dg/vect/vect-73.c: Ditto. * gcc.dg/vect/vect-74.c: Ditto. * gcc.dg/vect/vect-75.c: Ditto. * gcc.dg/vect/vect-76.c: Ditto. * gcc.dg/vect/vect-77.c: Ditto. * gcc.dg/vect/vect-77a.c: Ditto. * gcc.dg/vect/vect-78.c: Ditto. * gcc.dg/vect/vect-79.c: Ditto. * gcc.dg/vect/vect-8.c: Ditto. * gcc.dg/vect/vect-80.c: Ditto. * gcc.dg/vect/vect-82.c: Ditto. * gcc.dg/vect/vect-82_64.c: Ditto. * gcc.dg/vect/vect-83.c: Ditto. * gcc.dg/vect/vect-83_64.c: Ditto. * gcc.dg/vect/vect-9.c: Ditto. * gcc.dg/vect/vect-all.c: Ditto. * gcc.dg/vect/vect-none.c: Ditto. Co-Authored-By: Aldy Hernandez <aldyh@redhat.com> From-SVN: r90831
2004-11-18 00:47:21 +01:00
# Return 1 if the target supports hardware vectors of float, 0 otherwise.
#
# This won't change for different subtargets so cache the result.
proc check_effective_target_vect_float { } {
global et_vect_float_saved
if [info exists et_vect_float_saved] {
verbose "check_effective_target_vect_float: using cached result" 2
} else {
set et_vect_float_saved 0
if { [istarget i?86-*-*]
|| [istarget powerpc*-*-*]
|| [istarget spu-*-*]
target-supports.exp (check_effective_target_vect_int): New * lib/target-supports.exp (check_effective_target_vect_int): New (check_effective_target_vect_float): New (check_effective_target_vect_double): New. (is-effective-target): Support new effective targets keywords. * gcc.dg/vect/vect.exp: Set target-dependent vector flags and default action for dg-do. * gcc.dg/vect/pr16105.c: Use new support. * gcc.dg/vect/pr18400.c: Ditto. * gcc.dg/vect/pr18425.c: Ditto. * gcc.dg/vect/vect-1.c: Ditto. * gcc.dg/vect/vect-10.c: Ditto. * gcc.dg/vect/vect-11.c: Ditto. * gcc.dg/vect/vect-12.c: Ditto. * gcc.dg/vect/vect-13.c: Ditto. * gcc.dg/vect/vect-14.c: Ditto. * gcc.dg/vect/vect-15.c: Ditto. * gcc.dg/vect/vect-16.c: Ditto. * gcc.dg/vect/vect-17.c: Ditto. * gcc.dg/vect/vect-18.c: Ditto. * gcc.dg/vect/vect-19.c: Ditto. * gcc.dg/vect/vect-2.c: Ditto. * gcc.dg/vect/vect-20.c: Ditto. * gcc.dg/vect/vect-21.c: Ditto. * gcc.dg/vect/vect-22.c: Ditto. * gcc.dg/vect/vect-23.c: Ditto. * gcc.dg/vect/vect-24.c: Ditto. * gcc.dg/vect/vect-25.c: Ditto. * gcc.dg/vect/vect-26.c: Ditto. * gcc.dg/vect/vect-27.c: Ditto. * gcc.dg/vect/vect-27a.c: Ditto. * gcc.dg/vect/vect-28.c: Ditto. * gcc.dg/vect/vect-29.c: Ditto. * gcc.dg/vect/vect-29a.c: Ditto. * gcc.dg/vect/vect-3.c: Ditto. * gcc.dg/vect/vect-30.c: Ditto. * gcc.dg/vect/vect-31.c: Ditto. * gcc.dg/vect/vect-32.c: Ditto. * gcc.dg/vect/vect-33.c: Ditto. * gcc.dg/vect/vect-34.c: Ditto. * gcc.dg/vect/vect-35.c: Ditto. * gcc.dg/vect/vect-36.c: Ditto. * gcc.dg/vect/vect-37.c: Ditto. * gcc.dg/vect/vect-38.c: Ditto. * gcc.dg/vect/vect-4.c: Ditto. * gcc.dg/vect/vect-40.c: Ditto. * gcc.dg/vect/vect-41.c: Ditto. * gcc.dg/vect/vect-42.c: Ditto. * gcc.dg/vect/vect-43.c: Ditto. * gcc.dg/vect/vect-44.c: Ditto. * gcc.dg/vect/vect-45.c: Ditto. * gcc.dg/vect/vect-46.c: Ditto. * gcc.dg/vect/vect-47.c: Ditto. * gcc.dg/vect/vect-48.c: Ditto. * gcc.dg/vect/vect-48a.c: Ditto. * gcc.dg/vect/vect-49.c: Ditto. * gcc.dg/vect/vect-5.c: Ditto. * gcc.dg/vect/vect-50.c: Ditto. * gcc.dg/vect/vect-51.c: Ditto. * gcc.dg/vect/vect-52.c: Ditto. * gcc.dg/vect/vect-53.c: Ditto. * gcc.dg/vect/vect-54.c: Ditto. * gcc.dg/vect/vect-55.c: Ditto. * gcc.dg/vect/vect-56.c: Ditto. * gcc.dg/vect/vect-56a.c: Ditto. * gcc.dg/vect/vect-57.c: Ditto. * gcc.dg/vect/vect-58.c: Ditto. * gcc.dg/vect/vect-59.c: Ditto. * gcc.dg/vect/vect-6.c: Ditto. * gcc.dg/vect/vect-60.c: Ditto. * gcc.dg/vect/vect-61.c: Ditto. * gcc.dg/vect/vect-62.c: Ditto. * gcc.dg/vect/vect-63.c: Ditto. * gcc.dg/vect/vect-64.c: Ditto. * gcc.dg/vect/vect-65.c: Ditto. * gcc.dg/vect/vect-66.c: Ditto. * gcc.dg/vect/vect-67.c: Ditto. * gcc.dg/vect/vect-68.c: Ditto. * gcc.dg/vect/vect-69.c: Ditto. * gcc.dg/vect/vect-7.c: Ditto. * gcc.dg/vect/vect-72.c: Ditto. * gcc.dg/vect/vect-72a.c: Ditto. * gcc.dg/vect/vect-73.c: Ditto. * gcc.dg/vect/vect-74.c: Ditto. * gcc.dg/vect/vect-75.c: Ditto. * gcc.dg/vect/vect-76.c: Ditto. * gcc.dg/vect/vect-77.c: Ditto. * gcc.dg/vect/vect-77a.c: Ditto. * gcc.dg/vect/vect-78.c: Ditto. * gcc.dg/vect/vect-79.c: Ditto. * gcc.dg/vect/vect-8.c: Ditto. * gcc.dg/vect/vect-80.c: Ditto. * gcc.dg/vect/vect-82.c: Ditto. * gcc.dg/vect/vect-82_64.c: Ditto. * gcc.dg/vect/vect-83.c: Ditto. * gcc.dg/vect/vect-83_64.c: Ditto. * gcc.dg/vect/vect-9.c: Ditto. * gcc.dg/vect/vect-all.c: Ditto. * gcc.dg/vect/vect-none.c: Ditto. Co-Authored-By: Aldy Hernandez <aldyh@redhat.com> From-SVN: r90831
2004-11-18 00:47:21 +01:00
|| [istarget mipsisa64*-*-*]
ia64.c (TARGET_VECTOR_MODE_SUPPORTED_P): New. * config/ia64/ia64.c (TARGET_VECTOR_MODE_SUPPORTED_P): New. (ia64_const_ok_for_letter_p): New. (ia64_const_double_ok_for_letter_p): New. (ia64_extra_constraint): New. (ia64_expand_vecint_compare): New. (ia64_expand_vcondu_v2si): New. (ia64_expand_vecint_cmov): New. (ia64_expand_vecint_minmax): New. (ia64_print_operand): Add 'v'. (ia64_preferred_reload_class): New. (ia64_vector_mode_supported_p): New. * config/ia64/ia64.h (UNITS_PER_SIMD_WORD): New. (PREFERRED_RELOAD_CLASS): Move to function. (CONST_OK_FOR_LETTER_P): Move to function. (CONST_DOUBLE_OK_FOR_LETTER_P): Move to function. (CONSTRAINT_OK_FOR_Q, CONSTRAINT_OK_FOR_R): Remove. (CONSTRAINT_OK_FOR_S, CONSTRAINT_OK_FOR_T): Remove. (EXTRA_CONSTRAINT): Move to function. * config/ia64/ia64.md: Include vect.md. (itanium_class): Add mmalua. (type): Handle it. * config/ia64/itanium1.md (1_mmalua): New. Add it to bypasses. (1b_mmalua): New. * config/ia64/itanium2.md (2_mmalua, 2b_mmalua): Similarly. * config/ia64/predicates.md (gr_reg_or_0_operand): Accept any CONST0_RTX. (const_int_2bit_operand): New. (fr_reg_or_0_operand): New. * config/ia64/ia64-modes.def: Add vector modes. * config/ia64/ia64-protos.h: Update. * config/ia64/vect.md: New file. * gcc.dg/vect/vect.exp: Enable for ia64. * lib/target-supports.exp (check_effective_target_vect_int): Likewise. (check_effective_target_vect_float): Likewise. (check_effective_target_vect_no_align): Likewise. * gcc.dg/vect/vect-30.c: XFAIL for vect_no_align. * gcc.dg/vect/vect-8.c: Likewise. From-SVN: r92862
2005-01-03 20:59:13 +01:00
|| [istarget x86_64-*-*]
|| [istarget ia64-*-*]
|| [check_effective_target_arm32] } {
target-supports.exp (check_effective_target_vect_int): New * lib/target-supports.exp (check_effective_target_vect_int): New (check_effective_target_vect_float): New (check_effective_target_vect_double): New. (is-effective-target): Support new effective targets keywords. * gcc.dg/vect/vect.exp: Set target-dependent vector flags and default action for dg-do. * gcc.dg/vect/pr16105.c: Use new support. * gcc.dg/vect/pr18400.c: Ditto. * gcc.dg/vect/pr18425.c: Ditto. * gcc.dg/vect/vect-1.c: Ditto. * gcc.dg/vect/vect-10.c: Ditto. * gcc.dg/vect/vect-11.c: Ditto. * gcc.dg/vect/vect-12.c: Ditto. * gcc.dg/vect/vect-13.c: Ditto. * gcc.dg/vect/vect-14.c: Ditto. * gcc.dg/vect/vect-15.c: Ditto. * gcc.dg/vect/vect-16.c: Ditto. * gcc.dg/vect/vect-17.c: Ditto. * gcc.dg/vect/vect-18.c: Ditto. * gcc.dg/vect/vect-19.c: Ditto. * gcc.dg/vect/vect-2.c: Ditto. * gcc.dg/vect/vect-20.c: Ditto. * gcc.dg/vect/vect-21.c: Ditto. * gcc.dg/vect/vect-22.c: Ditto. * gcc.dg/vect/vect-23.c: Ditto. * gcc.dg/vect/vect-24.c: Ditto. * gcc.dg/vect/vect-25.c: Ditto. * gcc.dg/vect/vect-26.c: Ditto. * gcc.dg/vect/vect-27.c: Ditto. * gcc.dg/vect/vect-27a.c: Ditto. * gcc.dg/vect/vect-28.c: Ditto. * gcc.dg/vect/vect-29.c: Ditto. * gcc.dg/vect/vect-29a.c: Ditto. * gcc.dg/vect/vect-3.c: Ditto. * gcc.dg/vect/vect-30.c: Ditto. * gcc.dg/vect/vect-31.c: Ditto. * gcc.dg/vect/vect-32.c: Ditto. * gcc.dg/vect/vect-33.c: Ditto. * gcc.dg/vect/vect-34.c: Ditto. * gcc.dg/vect/vect-35.c: Ditto. * gcc.dg/vect/vect-36.c: Ditto. * gcc.dg/vect/vect-37.c: Ditto. * gcc.dg/vect/vect-38.c: Ditto. * gcc.dg/vect/vect-4.c: Ditto. * gcc.dg/vect/vect-40.c: Ditto. * gcc.dg/vect/vect-41.c: Ditto. * gcc.dg/vect/vect-42.c: Ditto. * gcc.dg/vect/vect-43.c: Ditto. * gcc.dg/vect/vect-44.c: Ditto. * gcc.dg/vect/vect-45.c: Ditto. * gcc.dg/vect/vect-46.c: Ditto. * gcc.dg/vect/vect-47.c: Ditto. * gcc.dg/vect/vect-48.c: Ditto. * gcc.dg/vect/vect-48a.c: Ditto. * gcc.dg/vect/vect-49.c: Ditto. * gcc.dg/vect/vect-5.c: Ditto. * gcc.dg/vect/vect-50.c: Ditto. * gcc.dg/vect/vect-51.c: Ditto. * gcc.dg/vect/vect-52.c: Ditto. * gcc.dg/vect/vect-53.c: Ditto. * gcc.dg/vect/vect-54.c: Ditto. * gcc.dg/vect/vect-55.c: Ditto. * gcc.dg/vect/vect-56.c: Ditto. * gcc.dg/vect/vect-56a.c: Ditto. * gcc.dg/vect/vect-57.c: Ditto. * gcc.dg/vect/vect-58.c: Ditto. * gcc.dg/vect/vect-59.c: Ditto. * gcc.dg/vect/vect-6.c: Ditto. * gcc.dg/vect/vect-60.c: Ditto. * gcc.dg/vect/vect-61.c: Ditto. * gcc.dg/vect/vect-62.c: Ditto. * gcc.dg/vect/vect-63.c: Ditto. * gcc.dg/vect/vect-64.c: Ditto. * gcc.dg/vect/vect-65.c: Ditto. * gcc.dg/vect/vect-66.c: Ditto. * gcc.dg/vect/vect-67.c: Ditto. * gcc.dg/vect/vect-68.c: Ditto. * gcc.dg/vect/vect-69.c: Ditto. * gcc.dg/vect/vect-7.c: Ditto. * gcc.dg/vect/vect-72.c: Ditto. * gcc.dg/vect/vect-72a.c: Ditto. * gcc.dg/vect/vect-73.c: Ditto. * gcc.dg/vect/vect-74.c: Ditto. * gcc.dg/vect/vect-75.c: Ditto. * gcc.dg/vect/vect-76.c: Ditto. * gcc.dg/vect/vect-77.c: Ditto. * gcc.dg/vect/vect-77a.c: Ditto. * gcc.dg/vect/vect-78.c: Ditto. * gcc.dg/vect/vect-79.c: Ditto. * gcc.dg/vect/vect-8.c: Ditto. * gcc.dg/vect/vect-80.c: Ditto. * gcc.dg/vect/vect-82.c: Ditto. * gcc.dg/vect/vect-82_64.c: Ditto. * gcc.dg/vect/vect-83.c: Ditto. * gcc.dg/vect/vect-83_64.c: Ditto. * gcc.dg/vect/vect-9.c: Ditto. * gcc.dg/vect/vect-all.c: Ditto. * gcc.dg/vect/vect-none.c: Ditto. Co-Authored-By: Aldy Hernandez <aldyh@redhat.com> From-SVN: r90831
2004-11-18 00:47:21 +01:00
set et_vect_float_saved 1
}
}
verbose "check_effective_target_vect_float: returning $et_vect_float_saved" 2
return $et_vect_float_saved
}
# Return 1 if the target supports hardware vectors of double, 0 otherwise.
#
# This won't change for different subtargets so cache the result.
proc check_effective_target_vect_double { } {
global et_vect_double_saved
if [info exists et_vect_double_saved] {
verbose "check_effective_target_vect_double: using cached result" 2
} else {
set et_vect_double_saved 0
if { [istarget i?86-*-*]
|| [istarget x86_64-*-*]
|| [istarget spu-*-*] } {
target-supports.exp (check_effective_target_vect_int): New * lib/target-supports.exp (check_effective_target_vect_int): New (check_effective_target_vect_float): New (check_effective_target_vect_double): New. (is-effective-target): Support new effective targets keywords. * gcc.dg/vect/vect.exp: Set target-dependent vector flags and default action for dg-do. * gcc.dg/vect/pr16105.c: Use new support. * gcc.dg/vect/pr18400.c: Ditto. * gcc.dg/vect/pr18425.c: Ditto. * gcc.dg/vect/vect-1.c: Ditto. * gcc.dg/vect/vect-10.c: Ditto. * gcc.dg/vect/vect-11.c: Ditto. * gcc.dg/vect/vect-12.c: Ditto. * gcc.dg/vect/vect-13.c: Ditto. * gcc.dg/vect/vect-14.c: Ditto. * gcc.dg/vect/vect-15.c: Ditto. * gcc.dg/vect/vect-16.c: Ditto. * gcc.dg/vect/vect-17.c: Ditto. * gcc.dg/vect/vect-18.c: Ditto. * gcc.dg/vect/vect-19.c: Ditto. * gcc.dg/vect/vect-2.c: Ditto. * gcc.dg/vect/vect-20.c: Ditto. * gcc.dg/vect/vect-21.c: Ditto. * gcc.dg/vect/vect-22.c: Ditto. * gcc.dg/vect/vect-23.c: Ditto. * gcc.dg/vect/vect-24.c: Ditto. * gcc.dg/vect/vect-25.c: Ditto. * gcc.dg/vect/vect-26.c: Ditto. * gcc.dg/vect/vect-27.c: Ditto. * gcc.dg/vect/vect-27a.c: Ditto. * gcc.dg/vect/vect-28.c: Ditto. * gcc.dg/vect/vect-29.c: Ditto. * gcc.dg/vect/vect-29a.c: Ditto. * gcc.dg/vect/vect-3.c: Ditto. * gcc.dg/vect/vect-30.c: Ditto. * gcc.dg/vect/vect-31.c: Ditto. * gcc.dg/vect/vect-32.c: Ditto. * gcc.dg/vect/vect-33.c: Ditto. * gcc.dg/vect/vect-34.c: Ditto. * gcc.dg/vect/vect-35.c: Ditto. * gcc.dg/vect/vect-36.c: Ditto. * gcc.dg/vect/vect-37.c: Ditto. * gcc.dg/vect/vect-38.c: Ditto. * gcc.dg/vect/vect-4.c: Ditto. * gcc.dg/vect/vect-40.c: Ditto. * gcc.dg/vect/vect-41.c: Ditto. * gcc.dg/vect/vect-42.c: Ditto. * gcc.dg/vect/vect-43.c: Ditto. * gcc.dg/vect/vect-44.c: Ditto. * gcc.dg/vect/vect-45.c: Ditto. * gcc.dg/vect/vect-46.c: Ditto. * gcc.dg/vect/vect-47.c: Ditto. * gcc.dg/vect/vect-48.c: Ditto. * gcc.dg/vect/vect-48a.c: Ditto. * gcc.dg/vect/vect-49.c: Ditto. * gcc.dg/vect/vect-5.c: Ditto. * gcc.dg/vect/vect-50.c: Ditto. * gcc.dg/vect/vect-51.c: Ditto. * gcc.dg/vect/vect-52.c: Ditto. * gcc.dg/vect/vect-53.c: Ditto. * gcc.dg/vect/vect-54.c: Ditto. * gcc.dg/vect/vect-55.c: Ditto. * gcc.dg/vect/vect-56.c: Ditto. * gcc.dg/vect/vect-56a.c: Ditto. * gcc.dg/vect/vect-57.c: Ditto. * gcc.dg/vect/vect-58.c: Ditto. * gcc.dg/vect/vect-59.c: Ditto. * gcc.dg/vect/vect-6.c: Ditto. * gcc.dg/vect/vect-60.c: Ditto. * gcc.dg/vect/vect-61.c: Ditto. * gcc.dg/vect/vect-62.c: Ditto. * gcc.dg/vect/vect-63.c: Ditto. * gcc.dg/vect/vect-64.c: Ditto. * gcc.dg/vect/vect-65.c: Ditto. * gcc.dg/vect/vect-66.c: Ditto. * gcc.dg/vect/vect-67.c: Ditto. * gcc.dg/vect/vect-68.c: Ditto. * gcc.dg/vect/vect-69.c: Ditto. * gcc.dg/vect/vect-7.c: Ditto. * gcc.dg/vect/vect-72.c: Ditto. * gcc.dg/vect/vect-72a.c: Ditto. * gcc.dg/vect/vect-73.c: Ditto. * gcc.dg/vect/vect-74.c: Ditto. * gcc.dg/vect/vect-75.c: Ditto. * gcc.dg/vect/vect-76.c: Ditto. * gcc.dg/vect/vect-77.c: Ditto. * gcc.dg/vect/vect-77a.c: Ditto. * gcc.dg/vect/vect-78.c: Ditto. * gcc.dg/vect/vect-79.c: Ditto. * gcc.dg/vect/vect-8.c: Ditto. * gcc.dg/vect/vect-80.c: Ditto. * gcc.dg/vect/vect-82.c: Ditto. * gcc.dg/vect/vect-82_64.c: Ditto. * gcc.dg/vect/vect-83.c: Ditto. * gcc.dg/vect/vect-83_64.c: Ditto. * gcc.dg/vect/vect-9.c: Ditto. * gcc.dg/vect/vect-all.c: Ditto. * gcc.dg/vect/vect-none.c: Ditto. Co-Authored-By: Aldy Hernandez <aldyh@redhat.com> From-SVN: r90831
2004-11-18 00:47:21 +01:00
set et_vect_double_saved 1
}
}
verbose "check_effective_target_vect_double: returning $et_vect_double_saved" 2
return $et_vect_double_saved
}
tree-vectorizer.c (supportable_widening_operation): Support multi-step conversion... * tree-vectorizer.c (supportable_widening_operation): Support multi-step conversion, return the number of steps in such conversion and the required intermediate types. (supportable_narrowing_operation): Likewise. * tree-vectorizer.h (vect_pow2): New function. (supportable_widening_operation): Change argument types. (supportable_narrowing_operation): Likewise. (vectorizable_type_promotion): Add an argument. (vectorizable_type_demotion): Likewise. * tree-vect-analyze.c (vect_analyze_operations): Call vectorizable_type_promotion and vectorizable_type_demotion with additional argument. (vect_get_and_check_slp_defs): Detect patterns. (vect_build_slp_tree): Add an argument, don't fail in case of multiple types. (vect_analyze_slp_instance): Don't fail in case of multiple types. Call vect_build_slp_tree with correct arguments. Calculate unrolling factor according to the smallest type in the loop. (vect_detect_hybrid_slp_stmts): Include statements from patterns. * tree-vect-patterns.c (vect_recog_widen_mult_pattern): Call supportable_widening_operation with correct arguments. * tree-vect-transform.c (vect_get_slp_defs): Allocate output vector operands lists according to the number of vector statements in left or right node, if exists. (vect_gen_widened_results_half): Remove unused argument. (vectorizable_conversion): Call supportable_widening_operation, supportable_narrowing_operation, and vect_gen_widened_results_half with correct arguments. (vectorizable_assignment): Change documentation, support multiple types in SLP. (vectorizable_operation): Likewise. (vect_get_loop_based_defs): New function. (vect_create_vectorized_demotion_stmts): Likewise. (vectorizable_type_demotion): Support loop-aware SLP and general multi-step conversion. Call vect_get_loop_based_defs and vect_create_vectorized_demotion_stmts for transformation. (vect_create_vectorized_promotion_stmts): New function. (vectorizable_type_promotion): Support loop-aware SLP and general multi-step conversion. Call vect_create_vectorized_promotion_stmts for transformation. (vectorizable_store): Change documentation, support multiple types in SLP. (vectorizable_load): Likewise. (vect_transform_stmt): Pass SLP_NODE to vectorizable_type_promotion and vectorizable_type_demotion. (vect_schedule_slp_instance): Move here the calculation of number of vectorized statements for each node from... (vect_schedule_slp): ... here. (vect_transform_loop): Call vect_schedule_slp without the last argument. From-SVN: r139225
2008-08-19 10:31:41 +02:00
# Return 1 if the target supports hardware vectors of long long, 0 otherwise.
#
# This won't change for different subtargets so cache the result.
proc check_effective_target_vect_long_long { } {
global et_vect_long_long_saved
if [info exists et_vect_long_long_saved] {
verbose "check_effective_target_vect_long_long: using cached result" 2
} else {
set et_vect_long_long_saved 0
if { [istarget i?86-*-*]
|| [istarget x86_64-*-*] } {
tree-vectorizer.c (supportable_widening_operation): Support multi-step conversion... * tree-vectorizer.c (supportable_widening_operation): Support multi-step conversion, return the number of steps in such conversion and the required intermediate types. (supportable_narrowing_operation): Likewise. * tree-vectorizer.h (vect_pow2): New function. (supportable_widening_operation): Change argument types. (supportable_narrowing_operation): Likewise. (vectorizable_type_promotion): Add an argument. (vectorizable_type_demotion): Likewise. * tree-vect-analyze.c (vect_analyze_operations): Call vectorizable_type_promotion and vectorizable_type_demotion with additional argument. (vect_get_and_check_slp_defs): Detect patterns. (vect_build_slp_tree): Add an argument, don't fail in case of multiple types. (vect_analyze_slp_instance): Don't fail in case of multiple types. Call vect_build_slp_tree with correct arguments. Calculate unrolling factor according to the smallest type in the loop. (vect_detect_hybrid_slp_stmts): Include statements from patterns. * tree-vect-patterns.c (vect_recog_widen_mult_pattern): Call supportable_widening_operation with correct arguments. * tree-vect-transform.c (vect_get_slp_defs): Allocate output vector operands lists according to the number of vector statements in left or right node, if exists. (vect_gen_widened_results_half): Remove unused argument. (vectorizable_conversion): Call supportable_widening_operation, supportable_narrowing_operation, and vect_gen_widened_results_half with correct arguments. (vectorizable_assignment): Change documentation, support multiple types in SLP. (vectorizable_operation): Likewise. (vect_get_loop_based_defs): New function. (vect_create_vectorized_demotion_stmts): Likewise. (vectorizable_type_demotion): Support loop-aware SLP and general multi-step conversion. Call vect_get_loop_based_defs and vect_create_vectorized_demotion_stmts for transformation. (vect_create_vectorized_promotion_stmts): New function. (vectorizable_type_promotion): Support loop-aware SLP and general multi-step conversion. Call vect_create_vectorized_promotion_stmts for transformation. (vectorizable_store): Change documentation, support multiple types in SLP. (vectorizable_load): Likewise. (vect_transform_stmt): Pass SLP_NODE to vectorizable_type_promotion and vectorizable_type_demotion. (vect_schedule_slp_instance): Move here the calculation of number of vectorized statements for each node from... (vect_schedule_slp): ... here. (vect_transform_loop): Call vect_schedule_slp without the last argument. From-SVN: r139225
2008-08-19 10:31:41 +02:00
set et_vect_long_long_saved 1
}
}
verbose "check_effective_target_vect_long_long: returning $et_vect_long_long_saved" 2
return $et_vect_long_long_saved
}
# Return 1 if the target plus current options does not support a vector
# max instruction on "int", 0 otherwise.
#
# This won't change for different subtargets so cache the result.
proc check_effective_target_vect_no_int_max { } {
global et_vect_no_int_max_saved
if [info exists et_vect_no_int_max_saved] {
verbose "check_effective_target_vect_no_int_max: using cached result" 2
} else {
set et_vect_no_int_max_saved 0
if { [istarget sparc*-*-*]
|| [istarget spu-*-*]
|| [istarget alpha*-*-*] } {
set et_vect_no_int_max_saved 1
}
}
verbose "check_effective_target_vect_no_int_max: returning $et_vect_no_int_max_saved" 2
return $et_vect_no_int_max_saved
}
# Return 1 if the target plus current options does not support a vector
# add instruction on "int", 0 otherwise.
#
# This won't change for different subtargets so cache the result.
proc check_effective_target_vect_no_int_add { } {
global et_vect_no_int_add_saved
if [info exists et_vect_no_int_add_saved] {
verbose "check_effective_target_vect_no_int_add: using cached result" 2
} else {
set et_vect_no_int_add_saved 0
# Alpha only supports vector add on V8QI and V4HI.
if { [istarget alpha*-*-*] } {
set et_vect_no_int_add_saved 1
}
}
verbose "check_effective_target_vect_no_int_add: returning $et_vect_no_int_add_saved" 2
return $et_vect_no_int_add_saved
}
# Return 1 if the target plus current options does not support vector
# bitwise instructions, 0 otherwise.
#
# This won't change for different subtargets so cache the result.
proc check_effective_target_vect_no_bitwise { } {
global et_vect_no_bitwise_saved
if [info exists et_vect_no_bitwise_saved] {
verbose "check_effective_target_vect_no_bitwise: using cached result" 2
} else {
set et_vect_no_bitwise_saved 0
}
verbose "check_effective_target_vect_no_bitwise: returning $et_vect_no_bitwise_saved" 2
return $et_vect_no_bitwise_saved
}
target.h (struct vectorize): Add new target builtin. * target.h (struct vectorize): Add new target builtin. * tree-vectorizer.c (destroy_loop_vec_info): Call vect_free_slp_instance instead of vect_free_slp_node. * tree-vectorizer.h (enum slp_load_perm_type): New. (struct _slp_instance): Add new fields. (SLP_INSTANCE_LOAD_PERMUTATION): New. (SLP_INSTANCE_LOADS): New. (vect_free_slp_tree): Remove. (vect_free_slp_instance): Declare. (SLP_TREE_LOADS_PERM_TYPE, TARG_VEC_PERMUTE_COST): New. (vectorizable_load): Add argument. (vect_transform_slp_perm_load): New. * tree-vect-analyze.c (vect_analyze_operations): Add an argument to vectorizable_load. (vect_get_place_in_interleaving_chain): New function. (vect_free_slp_tree): Make static. (vect_free_slp_instance): New function. (vect_build_slp_tree): Add new arguments. Allow load permutations and collect the load location in the interleaving chain. (vect_supported_slp_permutation_p): New function. (vect_supported_load_permutation_p): Likewise. (vect_analyze_slp_instance): In case of loads permutation, call vect_supported_load_permutation_p to check that the permutation is supported. * target-def.h (TARGET_VECTORIZE_BUILTIN_VEC_PERM): New. * tree-vect-transform.c (vect_transform_stmt): Add new argument. (vect_create_mask_and_perm): New function. (vect_get_mask_element, vect_transform_slp_perm_load): Likewise. (vectorizable_load): Add an argument. Don't keep the created vectors statements in the node if permutation is required. Call vect_transform_slp_perm_load to generate the permutation. (vect_transform_stmt): Add new argument. Call vectorizable_load with additional argument. (vect_schedule_slp_instance): In case of loads permutation, allocate vectorized statements structure for all the related SLP nodes. Call vect_transform_stmt with addditional argument. (vect_transform_loop): Call vect_transform_stmt with correct arguments. * config/spu/spu.c (spu_builtin_vec_perm): New. (TARGET_VECTORIZE_BUILTIN_VEC_PERM): Redefine. * config/spu/spu.h (TARG_VEC_PERMUTE_COS): Define. * config/rs6000/rs6000.c (rs6000_builtin_vec_perm): New. (TARGET_VECTORIZE_BUILTIN_VEC_PERM): Redefine. From-SVN: r139706
2008-08-28 13:11:14 +02:00
# Return 1 if the target plus current options supports vector permutation,
# 0 otherwise.
#
# This won't change for different subtargets so cache the result.
proc check_effective_target_vect_perm { } {
global et_vect_perm
if [info exists et_vect_perm_saved] {
verbose "check_effective_target_vect_perm: using cached result" 2
} else {
set et_vect_perm_saved 0
if { [istarget powerpc*-*-*]
|| [istarget spu-*-*] } {
set et_vect_perm_saved 1
}
}
verbose "check_effective_target_vect_perm: returning $et_vect_perm_saved" 2
return $et_vect_perm_saved
}
# Return 1 if the target plus current options supports a vector
# widening summation of *short* args into *int* result, 0 otherwise.
[multiple changes] 2006-11-08 Dorit Nuzman <dorit@il.ibm.com> * tree-vect-analyze.c (vect_mark_relevant, vect_stmt_relevant_p): Take enum argument instead of bool. (vect_analyze_operations): Call vectorizable_type_promotion. * tree-vectorizer.h (type_promotion_vec_info_type): New enum stmt_vec_info_type value. (supportable_widening_operation, vectorizable_type_promotion): New function declarations. * tree-vect-transform.c (vect_gen_widened_results_half): New function. (vectorizable_type_promotion): New function. (vect_transform_stmt): Call vectorizable_type_promotion. * tree-vect-analyze.c (supportable_widening_operation): New function. * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Add implementation. * tree-vect-generic.c (expand_vector_operations_1): Consider correct mode. * tree.def (VEC_WIDEN_MULT_HI_EXPR, VEC_WIDEN_MULT_LO_EXPR): (VEC_UNPACK_HI_EXPR, VEC_UNPACK_LO_EXPR): New tree-codes. * tree-inline.c (estimate_num_insns_1): Add cases for above new tree-codes. * tree-pretty-print.c (dump_generic_node, op_prio): Likewise. * expr.c (expand_expr_real_1): Likewise. * optabs.c (optab_for_tree_code): Likewise. (init_optabs): Initialize new optabs. * genopinit.c (vec_widen_umult_hi_optab, vec_widen_smult_hi_optab, vec_widen_smult_hi_optab, vec_widen_smult_lo_optab, vec_unpacks_hi_optab, vec_unpacks_lo_optab, vec_unpacku_hi_optab, vec_unpacku_lo_optab): Initialize new optabs. * optabs.h (OTI_vec_widen_umult_hi, OTI_vec_widen_umult_lo): (OTI_vec_widen_smult_h, OTI_vec_widen_smult_lo, OTI_vec_unpacks_hi, OTI_vec_unpacks_lo, OTI_vec_unpacku_hi, OTI_vec_unpacku_lo): New optab indices. (vec_widen_umult_hi_optab, vec_widen_umult_lo_optab): (vec_widen_smult_hi_optab, vec_widen_smult_lo_optab): (vec_unpacks_hi_optab, vec_unpacku_hi_optab, vec_unpacks_lo_optab): (vec_unpacku_lo_optab): New optabs. * doc/md.texi (vec_unpacks_hi, vec_unpacks_lo, vec_unpacku_hi): (vec_unpacku_lo, vec_widen_umult_hi, vec_widen_umult_lo): (vec_widen_smult_hi, vec_widen_smult_lo): New. * doc/c-tree.texi (VEC_LSHIFT_EXPR, VEC_RSHIFT_EXPR): (VEC_WIDEN_MULT_HI_EXPR, VEC_WIDEN_MULT_LO_EXPR, VEC_UNPACK_HI_EXPR): (VEC_UNPACK_LO_EXPR, VEC_PACK_MOD_EXPR, VEC_PACK_SAT_EXPR): New. * config/rs6000/altivec.md (UNSPEC_VMULWHUB, UNSPEC_VMULWLUB): (UNSPEC_VMULWHSB, UNSPEC_VMULWLSB, UNSPEC_VMULWHUH, UNSPEC_VMULWLUH): (UNSPEC_VMULWHSH, UNSPEC_VMULWLSH): New. (UNSPEC_VPERMSI, UNSPEC_VPERMHI): New. (vec_vperm_v8hiv4si, vec_vperm_v16qiv8hi): New patterns used to implement the unsigned unpacking patterns. (vec_unpacks_hi_v16qi, vec_unpacks_hi_v8hi, vec_unpacks_lo_v16qi): (vec_unpacks_lo_v8hi): New signed unpacking patterns. (vec_unpacku_hi_v16qi, vec_unpacku_hi_v8hi, vec_unpacku_lo_v16qi): (vec_unpacku_lo_v8hi): New unsigned unpacking patterns. (vec_widen_umult_hi_v16qi, vec_widen_umult_lo_v16qi): (vec_widen_smult_hi_v16qi, vec_widen_smult_lo_v16qi): (vec_widen_umult_hi_v8hi, vec_widen_umult_lo_v8hi): (vec_widen_smult_hi_v8hi, vec_widen_smult_lo_v8hi): New widening multiplication patterns. * target.h (builtin_mul_widen_even, builtin_mul_widen_odd): New. * target-def.h (TARGET_VECTORIZE_BUILTIN_MUL_WIDEN_EVEN): (TARGET_VECTORIZE_BUILTIN_MUL_WIDEN_ODD): New. * config/rs6000/rs6000.c (rs6000_builtin_mul_widen_even): New. (rs6000_builtin_mul_widen_odd): New. (TARGET_VECTORIZE_BUILTIN_MUL_WIDEN_EVEN): Defined. (TARGET_VECTORIZE_BUILTIN_MUL_WIDEN_ODD): Defined. * tree-vectorizer.h (enum vect_relevant): New enum type. (_stmt_vec_info): Field relevant chaned from bool to enum vect_relevant. (STMT_VINFO_RELEVANT_P): Updated. (STMT_VINFO_RELEVANT): New. * tree-vectorizer.c (new_stmt_vec_info): Use STMT_VINFO_RELEVANT instead of STMT_VINFO_RELEVANT_P. * tree-vect-analyze.c (vect_mark_relevant, vect_stmt_relevant_p): Replace calls to STMT_VINFO_RELEVANT_P with STMT_VINFO_RELEVANT, and boolean variable with enum vect_relevant. (vect_mark_stmts_to_be_vectorized): Likewise + update documentation. * doc/tm.texi (TARGET_VECTORIZE_BUILTIN_MUL_WIDEN_EVEN): New. (TARGET_VECTORIZE_BUILTIN_MUL_WIDEN_ODD): New. 2006-11-08 Richard Henderson <rth@redhat.com> * config/i386/sse.md (vec_widen_umult_hi_v8hi, vec_widen_umult_lo_v8hi): New. (vec_widen_smult_hi_v4si, vec_widen_smult_lo_v4si, vec_widen_umult_hi_v4si, vec_widen_umult_lo_v4si): New. * config/i386/i386.c (ix86_expand_sse_unpack): New. * config/i386/i386-protos.h (ix86_expand_sse_unpack): New. * config/i386/sse.md (vec_unpacku_hi_v16qi, vec_unpacks_hi_v16qi, vec_unpacku_lo_v16qi, vec_unpacks_lo_v16qi, vec_unpacku_hi_v8hi, vec_unpacks_hi_v8hi, vec_unpacku_lo_v8hi, vec_unpacks_lo_v8hi, vec_unpacku_hi_v4si, vec_unpacks_hi_v4si, vec_unpacku_lo_v4si, vec_unpacks_lo_v4si): New. 2006-11-08 Dorit Nuzman <dorit@il.ibm.com> * tree-vect-transform.c (vectorizable_type_demotion): New function. (vect_transform_stmt): Add case for type_demotion_vec_info_type. (vect_analyze_operations): Call vectorizable_type_demotion. * tree-vectorizer.h (type_demotion_vec_info_type): New enum stmt_vec_info_type value. (vectorizable_type_demotion): New function declaration. * tree-vect-generic.c (expand_vector_operations_1): Consider correct mode. * tree.def (VEC_PACK_MOD_EXPR, VEC_PACK_SAT_EXPR): New tree-codes. * expr.c (expand_expr_real_1): Add case for VEC_PACK_MOD_EXPR and VEC_PACK_SAT_EXPR. * tree-iniline.c (estimate_num_insns_1): Likewise. * tree-pretty-print.c (dump_generic_node, op_prio): Likewise. * optabs.c (optab_for_tree_code): Likewise. * optabs.c (expand_binop): In case of vec_pack_*_optabs the mode compared against the predicate of the result is not 'mode' (the input to the function) but a mode with half the size of 'mode'. (init_optab): Initialize new optabs. * optabs.h (OTI_vec_pack_mod, OTI_vec_pack_ssat, OTI_vec_pack_usat): New optab indices. (vec_pack_mod_optab, vec_pack_ssat_optab, vec_pack_usat_optab): New optabs. * genopinit.c (vec_pack_mod_optab, vec_pack_ssat_optab): (vec_pack_usat_optab): Initialize new optabs. * doc/md.texi (vec_pack_mod, vec_pack_ssat, vec_pack_usat): New. * config/rs6000/altivec.md (vec_pack_mod_v8hi, vec_pack_mod_v4si): New. 2006-11-08 Richard Henderson <rth@redehat.com> * config/i386/sse.md (vec_pack_mod_v8hi, vec_pack_mod_v4si): (vec_pack_mod_v2di, vec_interleave_highv16qi, vec_interleave_lowv16qi): (vec_interleave_highv8hi, vec_interleave_lowv8hi): (vec_interleave_highv4si, vec_interleave_lowv4si): (vec_interleave_highv2di, vec_interleave_lowv2di): New. 2006-11-08 Dorit Nuzman <dorit@il.ibm.com> * tree-vect-transform.c (vectorizable_reduction): Support multiple datatypes. (vect_transform_stmt): Removed redundant code. 2006-11-08 Dorit Nuzman <dorit@il.ibm.com> * tree-vect-transform.c (vectorizable_operation): Support multiple datatypes. 2006-11-08 Dorit Nuzman <dorit@il.ibm.com> * tree-vect-transform.c (vect_align_data_ref): Removed. (vect_create_data_ref_ptr): Added additional argument - ptr_incr. Updated function documentation. Return the increment stmt in ptr_incr. (bump_vector_ptr): New function. (vect_get_vec_def_for_stmt_copy): New function. (vect_finish_stmt_generation): Create a stmt_info to newly created vector stmts. (vect_setup_realignment): Call vect_create_data_ref_ptr with additional argument. (vectorizable_reduction, vectorizable_assignment): Not supported yet if VF is greater than the number of elements that can fit in one vector word. (vectorizable_operation, vectorizable_condition): Likewise. (vectorizable_store, vectorizable_load): Support the case that the VF is greater than the number of elements that can fit in one vector word. (vect_transform_loop): Don't fail in case of multiple data-types. * tree-vect-analyze.c (vect_determine_vectorization_factor): Don't fail in case of multiple data-types; the smallest type determines the VF. (vect_analyze_data_ref_dependence): Don't record datarefs as same_align if they are of different sizes. (vect_update_misalignment_for_peel): Compare misalignments in terms of number of elements rather than number of bytes. (vect_enhance_data_refs_alignment): Fix/Add dump printouts. (vect_can_advance_ivs_p): Fix a dump printout From-SVN: r118577
2006-11-08 08:32:44 +01:00
# A target can also support this widening summation if it can support
# promotion (unpacking) from shorts to ints.
#
# This won't change for different subtargets so cache the result.
proc check_effective_target_vect_widen_sum_hi_to_si { } {
global et_vect_widen_sum_hi_to_si
[multiple changes] 2006-11-08 Dorit Nuzman <dorit@il.ibm.com> * tree-vect-analyze.c (vect_mark_relevant, vect_stmt_relevant_p): Take enum argument instead of bool. (vect_analyze_operations): Call vectorizable_type_promotion. * tree-vectorizer.h (type_promotion_vec_info_type): New enum stmt_vec_info_type value. (supportable_widening_operation, vectorizable_type_promotion): New function declarations. * tree-vect-transform.c (vect_gen_widened_results_half): New function. (vectorizable_type_promotion): New function. (vect_transform_stmt): Call vectorizable_type_promotion. * tree-vect-analyze.c (supportable_widening_operation): New function. * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Add implementation. * tree-vect-generic.c (expand_vector_operations_1): Consider correct mode. * tree.def (VEC_WIDEN_MULT_HI_EXPR, VEC_WIDEN_MULT_LO_EXPR): (VEC_UNPACK_HI_EXPR, VEC_UNPACK_LO_EXPR): New tree-codes. * tree-inline.c (estimate_num_insns_1): Add cases for above new tree-codes. * tree-pretty-print.c (dump_generic_node, op_prio): Likewise. * expr.c (expand_expr_real_1): Likewise. * optabs.c (optab_for_tree_code): Likewise. (init_optabs): Initialize new optabs. * genopinit.c (vec_widen_umult_hi_optab, vec_widen_smult_hi_optab, vec_widen_smult_hi_optab, vec_widen_smult_lo_optab, vec_unpacks_hi_optab, vec_unpacks_lo_optab, vec_unpacku_hi_optab, vec_unpacku_lo_optab): Initialize new optabs. * optabs.h (OTI_vec_widen_umult_hi, OTI_vec_widen_umult_lo): (OTI_vec_widen_smult_h, OTI_vec_widen_smult_lo, OTI_vec_unpacks_hi, OTI_vec_unpacks_lo, OTI_vec_unpacku_hi, OTI_vec_unpacku_lo): New optab indices. (vec_widen_umult_hi_optab, vec_widen_umult_lo_optab): (vec_widen_smult_hi_optab, vec_widen_smult_lo_optab): (vec_unpacks_hi_optab, vec_unpacku_hi_optab, vec_unpacks_lo_optab): (vec_unpacku_lo_optab): New optabs. * doc/md.texi (vec_unpacks_hi, vec_unpacks_lo, vec_unpacku_hi): (vec_unpacku_lo, vec_widen_umult_hi, vec_widen_umult_lo): (vec_widen_smult_hi, vec_widen_smult_lo): New. * doc/c-tree.texi (VEC_LSHIFT_EXPR, VEC_RSHIFT_EXPR): (VEC_WIDEN_MULT_HI_EXPR, VEC_WIDEN_MULT_LO_EXPR, VEC_UNPACK_HI_EXPR): (VEC_UNPACK_LO_EXPR, VEC_PACK_MOD_EXPR, VEC_PACK_SAT_EXPR): New. * config/rs6000/altivec.md (UNSPEC_VMULWHUB, UNSPEC_VMULWLUB): (UNSPEC_VMULWHSB, UNSPEC_VMULWLSB, UNSPEC_VMULWHUH, UNSPEC_VMULWLUH): (UNSPEC_VMULWHSH, UNSPEC_VMULWLSH): New. (UNSPEC_VPERMSI, UNSPEC_VPERMHI): New. (vec_vperm_v8hiv4si, vec_vperm_v16qiv8hi): New patterns used to implement the unsigned unpacking patterns. (vec_unpacks_hi_v16qi, vec_unpacks_hi_v8hi, vec_unpacks_lo_v16qi): (vec_unpacks_lo_v8hi): New signed unpacking patterns. (vec_unpacku_hi_v16qi, vec_unpacku_hi_v8hi, vec_unpacku_lo_v16qi): (vec_unpacku_lo_v8hi): New unsigned unpacking patterns. (vec_widen_umult_hi_v16qi, vec_widen_umult_lo_v16qi): (vec_widen_smult_hi_v16qi, vec_widen_smult_lo_v16qi): (vec_widen_umult_hi_v8hi, vec_widen_umult_lo_v8hi): (vec_widen_smult_hi_v8hi, vec_widen_smult_lo_v8hi): New widening multiplication patterns. * target.h (builtin_mul_widen_even, builtin_mul_widen_odd): New. * target-def.h (TARGET_VECTORIZE_BUILTIN_MUL_WIDEN_EVEN): (TARGET_VECTORIZE_BUILTIN_MUL_WIDEN_ODD): New. * config/rs6000/rs6000.c (rs6000_builtin_mul_widen_even): New. (rs6000_builtin_mul_widen_odd): New. (TARGET_VECTORIZE_BUILTIN_MUL_WIDEN_EVEN): Defined. (TARGET_VECTORIZE_BUILTIN_MUL_WIDEN_ODD): Defined. * tree-vectorizer.h (enum vect_relevant): New enum type. (_stmt_vec_info): Field relevant chaned from bool to enum vect_relevant. (STMT_VINFO_RELEVANT_P): Updated. (STMT_VINFO_RELEVANT): New. * tree-vectorizer.c (new_stmt_vec_info): Use STMT_VINFO_RELEVANT instead of STMT_VINFO_RELEVANT_P. * tree-vect-analyze.c (vect_mark_relevant, vect_stmt_relevant_p): Replace calls to STMT_VINFO_RELEVANT_P with STMT_VINFO_RELEVANT, and boolean variable with enum vect_relevant. (vect_mark_stmts_to_be_vectorized): Likewise + update documentation. * doc/tm.texi (TARGET_VECTORIZE_BUILTIN_MUL_WIDEN_EVEN): New. (TARGET_VECTORIZE_BUILTIN_MUL_WIDEN_ODD): New. 2006-11-08 Richard Henderson <rth@redhat.com> * config/i386/sse.md (vec_widen_umult_hi_v8hi, vec_widen_umult_lo_v8hi): New. (vec_widen_smult_hi_v4si, vec_widen_smult_lo_v4si, vec_widen_umult_hi_v4si, vec_widen_umult_lo_v4si): New. * config/i386/i386.c (ix86_expand_sse_unpack): New. * config/i386/i386-protos.h (ix86_expand_sse_unpack): New. * config/i386/sse.md (vec_unpacku_hi_v16qi, vec_unpacks_hi_v16qi, vec_unpacku_lo_v16qi, vec_unpacks_lo_v16qi, vec_unpacku_hi_v8hi, vec_unpacks_hi_v8hi, vec_unpacku_lo_v8hi, vec_unpacks_lo_v8hi, vec_unpacku_hi_v4si, vec_unpacks_hi_v4si, vec_unpacku_lo_v4si, vec_unpacks_lo_v4si): New. 2006-11-08 Dorit Nuzman <dorit@il.ibm.com> * tree-vect-transform.c (vectorizable_type_demotion): New function. (vect_transform_stmt): Add case for type_demotion_vec_info_type. (vect_analyze_operations): Call vectorizable_type_demotion. * tree-vectorizer.h (type_demotion_vec_info_type): New enum stmt_vec_info_type value. (vectorizable_type_demotion): New function declaration. * tree-vect-generic.c (expand_vector_operations_1): Consider correct mode. * tree.def (VEC_PACK_MOD_EXPR, VEC_PACK_SAT_EXPR): New tree-codes. * expr.c (expand_expr_real_1): Add case for VEC_PACK_MOD_EXPR and VEC_PACK_SAT_EXPR. * tree-iniline.c (estimate_num_insns_1): Likewise. * tree-pretty-print.c (dump_generic_node, op_prio): Likewise. * optabs.c (optab_for_tree_code): Likewise. * optabs.c (expand_binop): In case of vec_pack_*_optabs the mode compared against the predicate of the result is not 'mode' (the input to the function) but a mode with half the size of 'mode'. (init_optab): Initialize new optabs. * optabs.h (OTI_vec_pack_mod, OTI_vec_pack_ssat, OTI_vec_pack_usat): New optab indices. (vec_pack_mod_optab, vec_pack_ssat_optab, vec_pack_usat_optab): New optabs. * genopinit.c (vec_pack_mod_optab, vec_pack_ssat_optab): (vec_pack_usat_optab): Initialize new optabs. * doc/md.texi (vec_pack_mod, vec_pack_ssat, vec_pack_usat): New. * config/rs6000/altivec.md (vec_pack_mod_v8hi, vec_pack_mod_v4si): New. 2006-11-08 Richard Henderson <rth@redehat.com> * config/i386/sse.md (vec_pack_mod_v8hi, vec_pack_mod_v4si): (vec_pack_mod_v2di, vec_interleave_highv16qi, vec_interleave_lowv16qi): (vec_interleave_highv8hi, vec_interleave_lowv8hi): (vec_interleave_highv4si, vec_interleave_lowv4si): (vec_interleave_highv2di, vec_interleave_lowv2di): New. 2006-11-08 Dorit Nuzman <dorit@il.ibm.com> * tree-vect-transform.c (vectorizable_reduction): Support multiple datatypes. (vect_transform_stmt): Removed redundant code. 2006-11-08 Dorit Nuzman <dorit@il.ibm.com> * tree-vect-transform.c (vectorizable_operation): Support multiple datatypes. 2006-11-08 Dorit Nuzman <dorit@il.ibm.com> * tree-vect-transform.c (vect_align_data_ref): Removed. (vect_create_data_ref_ptr): Added additional argument - ptr_incr. Updated function documentation. Return the increment stmt in ptr_incr. (bump_vector_ptr): New function. (vect_get_vec_def_for_stmt_copy): New function. (vect_finish_stmt_generation): Create a stmt_info to newly created vector stmts. (vect_setup_realignment): Call vect_create_data_ref_ptr with additional argument. (vectorizable_reduction, vectorizable_assignment): Not supported yet if VF is greater than the number of elements that can fit in one vector word. (vectorizable_operation, vectorizable_condition): Likewise. (vectorizable_store, vectorizable_load): Support the case that the VF is greater than the number of elements that can fit in one vector word. (vect_transform_loop): Don't fail in case of multiple data-types. * tree-vect-analyze.c (vect_determine_vectorization_factor): Don't fail in case of multiple data-types; the smallest type determines the VF. (vect_analyze_data_ref_dependence): Don't record datarefs as same_align if they are of different sizes. (vect_update_misalignment_for_peel): Compare misalignments in terms of number of elements rather than number of bytes. (vect_enhance_data_refs_alignment): Fix/Add dump printouts. (vect_can_advance_ivs_p): Fix a dump printout From-SVN: r118577
2006-11-08 08:32:44 +01:00
if [info exists et_vect_widen_sum_hi_to_si_saved] {
verbose "check_effective_target_vect_widen_sum_hi_to_si: using cached result" 2
} else {
[multiple changes] 2006-11-08 Dorit Nuzman <dorit@il.ibm.com> * tree-vect-analyze.c (vect_mark_relevant, vect_stmt_relevant_p): Take enum argument instead of bool. (vect_analyze_operations): Call vectorizable_type_promotion. * tree-vectorizer.h (type_promotion_vec_info_type): New enum stmt_vec_info_type value. (supportable_widening_operation, vectorizable_type_promotion): New function declarations. * tree-vect-transform.c (vect_gen_widened_results_half): New function. (vectorizable_type_promotion): New function. (vect_transform_stmt): Call vectorizable_type_promotion. * tree-vect-analyze.c (supportable_widening_operation): New function. * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Add implementation. * tree-vect-generic.c (expand_vector_operations_1): Consider correct mode. * tree.def (VEC_WIDEN_MULT_HI_EXPR, VEC_WIDEN_MULT_LO_EXPR): (VEC_UNPACK_HI_EXPR, VEC_UNPACK_LO_EXPR): New tree-codes. * tree-inline.c (estimate_num_insns_1): Add cases for above new tree-codes. * tree-pretty-print.c (dump_generic_node, op_prio): Likewise. * expr.c (expand_expr_real_1): Likewise. * optabs.c (optab_for_tree_code): Likewise. (init_optabs): Initialize new optabs. * genopinit.c (vec_widen_umult_hi_optab, vec_widen_smult_hi_optab, vec_widen_smult_hi_optab, vec_widen_smult_lo_optab, vec_unpacks_hi_optab, vec_unpacks_lo_optab, vec_unpacku_hi_optab, vec_unpacku_lo_optab): Initialize new optabs. * optabs.h (OTI_vec_widen_umult_hi, OTI_vec_widen_umult_lo): (OTI_vec_widen_smult_h, OTI_vec_widen_smult_lo, OTI_vec_unpacks_hi, OTI_vec_unpacks_lo, OTI_vec_unpacku_hi, OTI_vec_unpacku_lo): New optab indices. (vec_widen_umult_hi_optab, vec_widen_umult_lo_optab): (vec_widen_smult_hi_optab, vec_widen_smult_lo_optab): (vec_unpacks_hi_optab, vec_unpacku_hi_optab, vec_unpacks_lo_optab): (vec_unpacku_lo_optab): New optabs. * doc/md.texi (vec_unpacks_hi, vec_unpacks_lo, vec_unpacku_hi): (vec_unpacku_lo, vec_widen_umult_hi, vec_widen_umult_lo): (vec_widen_smult_hi, vec_widen_smult_lo): New. * doc/c-tree.texi (VEC_LSHIFT_EXPR, VEC_RSHIFT_EXPR): (VEC_WIDEN_MULT_HI_EXPR, VEC_WIDEN_MULT_LO_EXPR, VEC_UNPACK_HI_EXPR): (VEC_UNPACK_LO_EXPR, VEC_PACK_MOD_EXPR, VEC_PACK_SAT_EXPR): New. * config/rs6000/altivec.md (UNSPEC_VMULWHUB, UNSPEC_VMULWLUB): (UNSPEC_VMULWHSB, UNSPEC_VMULWLSB, UNSPEC_VMULWHUH, UNSPEC_VMULWLUH): (UNSPEC_VMULWHSH, UNSPEC_VMULWLSH): New. (UNSPEC_VPERMSI, UNSPEC_VPERMHI): New. (vec_vperm_v8hiv4si, vec_vperm_v16qiv8hi): New patterns used to implement the unsigned unpacking patterns. (vec_unpacks_hi_v16qi, vec_unpacks_hi_v8hi, vec_unpacks_lo_v16qi): (vec_unpacks_lo_v8hi): New signed unpacking patterns. (vec_unpacku_hi_v16qi, vec_unpacku_hi_v8hi, vec_unpacku_lo_v16qi): (vec_unpacku_lo_v8hi): New unsigned unpacking patterns. (vec_widen_umult_hi_v16qi, vec_widen_umult_lo_v16qi): (vec_widen_smult_hi_v16qi, vec_widen_smult_lo_v16qi): (vec_widen_umult_hi_v8hi, vec_widen_umult_lo_v8hi): (vec_widen_smult_hi_v8hi, vec_widen_smult_lo_v8hi): New widening multiplication patterns. * target.h (builtin_mul_widen_even, builtin_mul_widen_odd): New. * target-def.h (TARGET_VECTORIZE_BUILTIN_MUL_WIDEN_EVEN): (TARGET_VECTORIZE_BUILTIN_MUL_WIDEN_ODD): New. * config/rs6000/rs6000.c (rs6000_builtin_mul_widen_even): New. (rs6000_builtin_mul_widen_odd): New. (TARGET_VECTORIZE_BUILTIN_MUL_WIDEN_EVEN): Defined. (TARGET_VECTORIZE_BUILTIN_MUL_WIDEN_ODD): Defined. * tree-vectorizer.h (enum vect_relevant): New enum type. (_stmt_vec_info): Field relevant chaned from bool to enum vect_relevant. (STMT_VINFO_RELEVANT_P): Updated. (STMT_VINFO_RELEVANT): New. * tree-vectorizer.c (new_stmt_vec_info): Use STMT_VINFO_RELEVANT instead of STMT_VINFO_RELEVANT_P. * tree-vect-analyze.c (vect_mark_relevant, vect_stmt_relevant_p): Replace calls to STMT_VINFO_RELEVANT_P with STMT_VINFO_RELEVANT, and boolean variable with enum vect_relevant. (vect_mark_stmts_to_be_vectorized): Likewise + update documentation. * doc/tm.texi (TARGET_VECTORIZE_BUILTIN_MUL_WIDEN_EVEN): New. (TARGET_VECTORIZE_BUILTIN_MUL_WIDEN_ODD): New. 2006-11-08 Richard Henderson <rth@redhat.com> * config/i386/sse.md (vec_widen_umult_hi_v8hi, vec_widen_umult_lo_v8hi): New. (vec_widen_smult_hi_v4si, vec_widen_smult_lo_v4si, vec_widen_umult_hi_v4si, vec_widen_umult_lo_v4si): New. * config/i386/i386.c (ix86_expand_sse_unpack): New. * config/i386/i386-protos.h (ix86_expand_sse_unpack): New. * config/i386/sse.md (vec_unpacku_hi_v16qi, vec_unpacks_hi_v16qi, vec_unpacku_lo_v16qi, vec_unpacks_lo_v16qi, vec_unpacku_hi_v8hi, vec_unpacks_hi_v8hi, vec_unpacku_lo_v8hi, vec_unpacks_lo_v8hi, vec_unpacku_hi_v4si, vec_unpacks_hi_v4si, vec_unpacku_lo_v4si, vec_unpacks_lo_v4si): New. 2006-11-08 Dorit Nuzman <dorit@il.ibm.com> * tree-vect-transform.c (vectorizable_type_demotion): New function. (vect_transform_stmt): Add case for type_demotion_vec_info_type. (vect_analyze_operations): Call vectorizable_type_demotion. * tree-vectorizer.h (type_demotion_vec_info_type): New enum stmt_vec_info_type value. (vectorizable_type_demotion): New function declaration. * tree-vect-generic.c (expand_vector_operations_1): Consider correct mode. * tree.def (VEC_PACK_MOD_EXPR, VEC_PACK_SAT_EXPR): New tree-codes. * expr.c (expand_expr_real_1): Add case for VEC_PACK_MOD_EXPR and VEC_PACK_SAT_EXPR. * tree-iniline.c (estimate_num_insns_1): Likewise. * tree-pretty-print.c (dump_generic_node, op_prio): Likewise. * optabs.c (optab_for_tree_code): Likewise. * optabs.c (expand_binop): In case of vec_pack_*_optabs the mode compared against the predicate of the result is not 'mode' (the input to the function) but a mode with half the size of 'mode'. (init_optab): Initialize new optabs. * optabs.h (OTI_vec_pack_mod, OTI_vec_pack_ssat, OTI_vec_pack_usat): New optab indices. (vec_pack_mod_optab, vec_pack_ssat_optab, vec_pack_usat_optab): New optabs. * genopinit.c (vec_pack_mod_optab, vec_pack_ssat_optab): (vec_pack_usat_optab): Initialize new optabs. * doc/md.texi (vec_pack_mod, vec_pack_ssat, vec_pack_usat): New. * config/rs6000/altivec.md (vec_pack_mod_v8hi, vec_pack_mod_v4si): New. 2006-11-08 Richard Henderson <rth@redehat.com> * config/i386/sse.md (vec_pack_mod_v8hi, vec_pack_mod_v4si): (vec_pack_mod_v2di, vec_interleave_highv16qi, vec_interleave_lowv16qi): (vec_interleave_highv8hi, vec_interleave_lowv8hi): (vec_interleave_highv4si, vec_interleave_lowv4si): (vec_interleave_highv2di, vec_interleave_lowv2di): New. 2006-11-08 Dorit Nuzman <dorit@il.ibm.com> * tree-vect-transform.c (vectorizable_reduction): Support multiple datatypes. (vect_transform_stmt): Removed redundant code. 2006-11-08 Dorit Nuzman <dorit@il.ibm.com> * tree-vect-transform.c (vectorizable_operation): Support multiple datatypes. 2006-11-08 Dorit Nuzman <dorit@il.ibm.com> * tree-vect-transform.c (vect_align_data_ref): Removed. (vect_create_data_ref_ptr): Added additional argument - ptr_incr. Updated function documentation. Return the increment stmt in ptr_incr. (bump_vector_ptr): New function. (vect_get_vec_def_for_stmt_copy): New function. (vect_finish_stmt_generation): Create a stmt_info to newly created vector stmts. (vect_setup_realignment): Call vect_create_data_ref_ptr with additional argument. (vectorizable_reduction, vectorizable_assignment): Not supported yet if VF is greater than the number of elements that can fit in one vector word. (vectorizable_operation, vectorizable_condition): Likewise. (vectorizable_store, vectorizable_load): Support the case that the VF is greater than the number of elements that can fit in one vector word. (vect_transform_loop): Don't fail in case of multiple data-types. * tree-vect-analyze.c (vect_determine_vectorization_factor): Don't fail in case of multiple data-types; the smallest type determines the VF. (vect_analyze_data_ref_dependence): Don't record datarefs as same_align if they are of different sizes. (vect_update_misalignment_for_peel): Compare misalignments in terms of number of elements rather than number of bytes. (vect_enhance_data_refs_alignment): Fix/Add dump printouts. (vect_can_advance_ivs_p): Fix a dump printout From-SVN: r118577
2006-11-08 08:32:44 +01:00
set et_vect_widen_sum_hi_to_si_saved [check_effective_target_vect_unpack]
if { [istarget powerpc*-*-*]
|| [istarget ia64-*-*] } {
set et_vect_widen_sum_hi_to_si_saved 1
}
}
verbose "check_effective_target_vect_widen_sum_hi_to_si: returning $et_vect_widen_sum_hi_to_si_saved" 2
return $et_vect_widen_sum_hi_to_si_saved
}
# Return 1 if the target plus current options supports a vector
# widening summation of *char* args into *short* result, 0 otherwise.
[multiple changes] 2006-11-08 Dorit Nuzman <dorit@il.ibm.com> * tree-vect-analyze.c (vect_mark_relevant, vect_stmt_relevant_p): Take enum argument instead of bool. (vect_analyze_operations): Call vectorizable_type_promotion. * tree-vectorizer.h (type_promotion_vec_info_type): New enum stmt_vec_info_type value. (supportable_widening_operation, vectorizable_type_promotion): New function declarations. * tree-vect-transform.c (vect_gen_widened_results_half): New function. (vectorizable_type_promotion): New function. (vect_transform_stmt): Call vectorizable_type_promotion. * tree-vect-analyze.c (supportable_widening_operation): New function. * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Add implementation. * tree-vect-generic.c (expand_vector_operations_1): Consider correct mode. * tree.def (VEC_WIDEN_MULT_HI_EXPR, VEC_WIDEN_MULT_LO_EXPR): (VEC_UNPACK_HI_EXPR, VEC_UNPACK_LO_EXPR): New tree-codes. * tree-inline.c (estimate_num_insns_1): Add cases for above new tree-codes. * tree-pretty-print.c (dump_generic_node, op_prio): Likewise. * expr.c (expand_expr_real_1): Likewise. * optabs.c (optab_for_tree_code): Likewise. (init_optabs): Initialize new optabs. * genopinit.c (vec_widen_umult_hi_optab, vec_widen_smult_hi_optab, vec_widen_smult_hi_optab, vec_widen_smult_lo_optab, vec_unpacks_hi_optab, vec_unpacks_lo_optab, vec_unpacku_hi_optab, vec_unpacku_lo_optab): Initialize new optabs. * optabs.h (OTI_vec_widen_umult_hi, OTI_vec_widen_umult_lo): (OTI_vec_widen_smult_h, OTI_vec_widen_smult_lo, OTI_vec_unpacks_hi, OTI_vec_unpacks_lo, OTI_vec_unpacku_hi, OTI_vec_unpacku_lo): New optab indices. (vec_widen_umult_hi_optab, vec_widen_umult_lo_optab): (vec_widen_smult_hi_optab, vec_widen_smult_lo_optab): (vec_unpacks_hi_optab, vec_unpacku_hi_optab, vec_unpacks_lo_optab): (vec_unpacku_lo_optab): New optabs. * doc/md.texi (vec_unpacks_hi, vec_unpacks_lo, vec_unpacku_hi): (vec_unpacku_lo, vec_widen_umult_hi, vec_widen_umult_lo): (vec_widen_smult_hi, vec_widen_smult_lo): New. * doc/c-tree.texi (VEC_LSHIFT_EXPR, VEC_RSHIFT_EXPR): (VEC_WIDEN_MULT_HI_EXPR, VEC_WIDEN_MULT_LO_EXPR, VEC_UNPACK_HI_EXPR): (VEC_UNPACK_LO_EXPR, VEC_PACK_MOD_EXPR, VEC_PACK_SAT_EXPR): New. * config/rs6000/altivec.md (UNSPEC_VMULWHUB, UNSPEC_VMULWLUB): (UNSPEC_VMULWHSB, UNSPEC_VMULWLSB, UNSPEC_VMULWHUH, UNSPEC_VMULWLUH): (UNSPEC_VMULWHSH, UNSPEC_VMULWLSH): New. (UNSPEC_VPERMSI, UNSPEC_VPERMHI): New. (vec_vperm_v8hiv4si, vec_vperm_v16qiv8hi): New patterns used to implement the unsigned unpacking patterns. (vec_unpacks_hi_v16qi, vec_unpacks_hi_v8hi, vec_unpacks_lo_v16qi): (vec_unpacks_lo_v8hi): New signed unpacking patterns. (vec_unpacku_hi_v16qi, vec_unpacku_hi_v8hi, vec_unpacku_lo_v16qi): (vec_unpacku_lo_v8hi): New unsigned unpacking patterns. (vec_widen_umult_hi_v16qi, vec_widen_umult_lo_v16qi): (vec_widen_smult_hi_v16qi, vec_widen_smult_lo_v16qi): (vec_widen_umult_hi_v8hi, vec_widen_umult_lo_v8hi): (vec_widen_smult_hi_v8hi, vec_widen_smult_lo_v8hi): New widening multiplication patterns. * target.h (builtin_mul_widen_even, builtin_mul_widen_odd): New. * target-def.h (TARGET_VECTORIZE_BUILTIN_MUL_WIDEN_EVEN): (TARGET_VECTORIZE_BUILTIN_MUL_WIDEN_ODD): New. * config/rs6000/rs6000.c (rs6000_builtin_mul_widen_even): New. (rs6000_builtin_mul_widen_odd): New. (TARGET_VECTORIZE_BUILTIN_MUL_WIDEN_EVEN): Defined. (TARGET_VECTORIZE_BUILTIN_MUL_WIDEN_ODD): Defined. * tree-vectorizer.h (enum vect_relevant): New enum type. (_stmt_vec_info): Field relevant chaned from bool to enum vect_relevant. (STMT_VINFO_RELEVANT_P): Updated. (STMT_VINFO_RELEVANT): New. * tree-vectorizer.c (new_stmt_vec_info): Use STMT_VINFO_RELEVANT instead of STMT_VINFO_RELEVANT_P. * tree-vect-analyze.c (vect_mark_relevant, vect_stmt_relevant_p): Replace calls to STMT_VINFO_RELEVANT_P with STMT_VINFO_RELEVANT, and boolean variable with enum vect_relevant. (vect_mark_stmts_to_be_vectorized): Likewise + update documentation. * doc/tm.texi (TARGET_VECTORIZE_BUILTIN_MUL_WIDEN_EVEN): New. (TARGET_VECTORIZE_BUILTIN_MUL_WIDEN_ODD): New. 2006-11-08 Richard Henderson <rth@redhat.com> * config/i386/sse.md (vec_widen_umult_hi_v8hi, vec_widen_umult_lo_v8hi): New. (vec_widen_smult_hi_v4si, vec_widen_smult_lo_v4si, vec_widen_umult_hi_v4si, vec_widen_umult_lo_v4si): New. * config/i386/i386.c (ix86_expand_sse_unpack): New. * config/i386/i386-protos.h (ix86_expand_sse_unpack): New. * config/i386/sse.md (vec_unpacku_hi_v16qi, vec_unpacks_hi_v16qi, vec_unpacku_lo_v16qi, vec_unpacks_lo_v16qi, vec_unpacku_hi_v8hi, vec_unpacks_hi_v8hi, vec_unpacku_lo_v8hi, vec_unpacks_lo_v8hi, vec_unpacku_hi_v4si, vec_unpacks_hi_v4si, vec_unpacku_lo_v4si, vec_unpacks_lo_v4si): New. 2006-11-08 Dorit Nuzman <dorit@il.ibm.com> * tree-vect-transform.c (vectorizable_type_demotion): New function. (vect_transform_stmt): Add case for type_demotion_vec_info_type. (vect_analyze_operations): Call vectorizable_type_demotion. * tree-vectorizer.h (type_demotion_vec_info_type): New enum stmt_vec_info_type value. (vectorizable_type_demotion): New function declaration. * tree-vect-generic.c (expand_vector_operations_1): Consider correct mode. * tree.def (VEC_PACK_MOD_EXPR, VEC_PACK_SAT_EXPR): New tree-codes. * expr.c (expand_expr_real_1): Add case for VEC_PACK_MOD_EXPR and VEC_PACK_SAT_EXPR. * tree-iniline.c (estimate_num_insns_1): Likewise. * tree-pretty-print.c (dump_generic_node, op_prio): Likewise. * optabs.c (optab_for_tree_code): Likewise. * optabs.c (expand_binop): In case of vec_pack_*_optabs the mode compared against the predicate of the result is not 'mode' (the input to the function) but a mode with half the size of 'mode'. (init_optab): Initialize new optabs. * optabs.h (OTI_vec_pack_mod, OTI_vec_pack_ssat, OTI_vec_pack_usat): New optab indices. (vec_pack_mod_optab, vec_pack_ssat_optab, vec_pack_usat_optab): New optabs. * genopinit.c (vec_pack_mod_optab, vec_pack_ssat_optab): (vec_pack_usat_optab): Initialize new optabs. * doc/md.texi (vec_pack_mod, vec_pack_ssat, vec_pack_usat): New. * config/rs6000/altivec.md (vec_pack_mod_v8hi, vec_pack_mod_v4si): New. 2006-11-08 Richard Henderson <rth@redehat.com> * config/i386/sse.md (vec_pack_mod_v8hi, vec_pack_mod_v4si): (vec_pack_mod_v2di, vec_interleave_highv16qi, vec_interleave_lowv16qi): (vec_interleave_highv8hi, vec_interleave_lowv8hi): (vec_interleave_highv4si, vec_interleave_lowv4si): (vec_interleave_highv2di, vec_interleave_lowv2di): New. 2006-11-08 Dorit Nuzman <dorit@il.ibm.com> * tree-vect-transform.c (vectorizable_reduction): Support multiple datatypes. (vect_transform_stmt): Removed redundant code. 2006-11-08 Dorit Nuzman <dorit@il.ibm.com> * tree-vect-transform.c (vectorizable_operation): Support multiple datatypes. 2006-11-08 Dorit Nuzman <dorit@il.ibm.com> * tree-vect-transform.c (vect_align_data_ref): Removed. (vect_create_data_ref_ptr): Added additional argument - ptr_incr. Updated function documentation. Return the increment stmt in ptr_incr. (bump_vector_ptr): New function. (vect_get_vec_def_for_stmt_copy): New function. (vect_finish_stmt_generation): Create a stmt_info to newly created vector stmts. (vect_setup_realignment): Call vect_create_data_ref_ptr with additional argument. (vectorizable_reduction, vectorizable_assignment): Not supported yet if VF is greater than the number of elements that can fit in one vector word. (vectorizable_operation, vectorizable_condition): Likewise. (vectorizable_store, vectorizable_load): Support the case that the VF is greater than the number of elements that can fit in one vector word. (vect_transform_loop): Don't fail in case of multiple data-types. * tree-vect-analyze.c (vect_determine_vectorization_factor): Don't fail in case of multiple data-types; the smallest type determines the VF. (vect_analyze_data_ref_dependence): Don't record datarefs as same_align if they are of different sizes. (vect_update_misalignment_for_peel): Compare misalignments in terms of number of elements rather than number of bytes. (vect_enhance_data_refs_alignment): Fix/Add dump printouts. (vect_can_advance_ivs_p): Fix a dump printout From-SVN: r118577
2006-11-08 08:32:44 +01:00
# A target can also support this widening summation if it can support
# promotion (unpacking) from chars to shorts.
#
# This won't change for different subtargets so cache the result.
proc check_effective_target_vect_widen_sum_qi_to_hi { } {
global et_vect_widen_sum_qi_to_hi
[multiple changes] 2006-11-08 Dorit Nuzman <dorit@il.ibm.com> * tree-vect-analyze.c (vect_mark_relevant, vect_stmt_relevant_p): Take enum argument instead of bool. (vect_analyze_operations): Call vectorizable_type_promotion. * tree-vectorizer.h (type_promotion_vec_info_type): New enum stmt_vec_info_type value. (supportable_widening_operation, vectorizable_type_promotion): New function declarations. * tree-vect-transform.c (vect_gen_widened_results_half): New function. (vectorizable_type_promotion): New function. (vect_transform_stmt): Call vectorizable_type_promotion. * tree-vect-analyze.c (supportable_widening_operation): New function. * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Add implementation. * tree-vect-generic.c (expand_vector_operations_1): Consider correct mode. * tree.def (VEC_WIDEN_MULT_HI_EXPR, VEC_WIDEN_MULT_LO_EXPR): (VEC_UNPACK_HI_EXPR, VEC_UNPACK_LO_EXPR): New tree-codes. * tree-inline.c (estimate_num_insns_1): Add cases for above new tree-codes. * tree-pretty-print.c (dump_generic_node, op_prio): Likewise. * expr.c (expand_expr_real_1): Likewise. * optabs.c (optab_for_tree_code): Likewise. (init_optabs): Initialize new optabs. * genopinit.c (vec_widen_umult_hi_optab, vec_widen_smult_hi_optab, vec_widen_smult_hi_optab, vec_widen_smult_lo_optab, vec_unpacks_hi_optab, vec_unpacks_lo_optab, vec_unpacku_hi_optab, vec_unpacku_lo_optab): Initialize new optabs. * optabs.h (OTI_vec_widen_umult_hi, OTI_vec_widen_umult_lo): (OTI_vec_widen_smult_h, OTI_vec_widen_smult_lo, OTI_vec_unpacks_hi, OTI_vec_unpacks_lo, OTI_vec_unpacku_hi, OTI_vec_unpacku_lo): New optab indices. (vec_widen_umult_hi_optab, vec_widen_umult_lo_optab): (vec_widen_smult_hi_optab, vec_widen_smult_lo_optab): (vec_unpacks_hi_optab, vec_unpacku_hi_optab, vec_unpacks_lo_optab): (vec_unpacku_lo_optab): New optabs. * doc/md.texi (vec_unpacks_hi, vec_unpacks_lo, vec_unpacku_hi): (vec_unpacku_lo, vec_widen_umult_hi, vec_widen_umult_lo): (vec_widen_smult_hi, vec_widen_smult_lo): New. * doc/c-tree.texi (VEC_LSHIFT_EXPR, VEC_RSHIFT_EXPR): (VEC_WIDEN_MULT_HI_EXPR, VEC_WIDEN_MULT_LO_EXPR, VEC_UNPACK_HI_EXPR): (VEC_UNPACK_LO_EXPR, VEC_PACK_MOD_EXPR, VEC_PACK_SAT_EXPR): New. * config/rs6000/altivec.md (UNSPEC_VMULWHUB, UNSPEC_VMULWLUB): (UNSPEC_VMULWHSB, UNSPEC_VMULWLSB, UNSPEC_VMULWHUH, UNSPEC_VMULWLUH): (UNSPEC_VMULWHSH, UNSPEC_VMULWLSH): New. (UNSPEC_VPERMSI, UNSPEC_VPERMHI): New. (vec_vperm_v8hiv4si, vec_vperm_v16qiv8hi): New patterns used to implement the unsigned unpacking patterns. (vec_unpacks_hi_v16qi, vec_unpacks_hi_v8hi, vec_unpacks_lo_v16qi): (vec_unpacks_lo_v8hi): New signed unpacking patterns. (vec_unpacku_hi_v16qi, vec_unpacku_hi_v8hi, vec_unpacku_lo_v16qi): (vec_unpacku_lo_v8hi): New unsigned unpacking patterns. (vec_widen_umult_hi_v16qi, vec_widen_umult_lo_v16qi): (vec_widen_smult_hi_v16qi, vec_widen_smult_lo_v16qi): (vec_widen_umult_hi_v8hi, vec_widen_umult_lo_v8hi): (vec_widen_smult_hi_v8hi, vec_widen_smult_lo_v8hi): New widening multiplication patterns. * target.h (builtin_mul_widen_even, builtin_mul_widen_odd): New. * target-def.h (TARGET_VECTORIZE_BUILTIN_MUL_WIDEN_EVEN): (TARGET_VECTORIZE_BUILTIN_MUL_WIDEN_ODD): New. * config/rs6000/rs6000.c (rs6000_builtin_mul_widen_even): New. (rs6000_builtin_mul_widen_odd): New. (TARGET_VECTORIZE_BUILTIN_MUL_WIDEN_EVEN): Defined. (TARGET_VECTORIZE_BUILTIN_MUL_WIDEN_ODD): Defined. * tree-vectorizer.h (enum vect_relevant): New enum type. (_stmt_vec_info): Field relevant chaned from bool to enum vect_relevant. (STMT_VINFO_RELEVANT_P): Updated. (STMT_VINFO_RELEVANT): New. * tree-vectorizer.c (new_stmt_vec_info): Use STMT_VINFO_RELEVANT instead of STMT_VINFO_RELEVANT_P. * tree-vect-analyze.c (vect_mark_relevant, vect_stmt_relevant_p): Replace calls to STMT_VINFO_RELEVANT_P with STMT_VINFO_RELEVANT, and boolean variable with enum vect_relevant. (vect_mark_stmts_to_be_vectorized): Likewise + update documentation. * doc/tm.texi (TARGET_VECTORIZE_BUILTIN_MUL_WIDEN_EVEN): New. (TARGET_VECTORIZE_BUILTIN_MUL_WIDEN_ODD): New. 2006-11-08 Richard Henderson <rth@redhat.com> * config/i386/sse.md (vec_widen_umult_hi_v8hi, vec_widen_umult_lo_v8hi): New. (vec_widen_smult_hi_v4si, vec_widen_smult_lo_v4si, vec_widen_umult_hi_v4si, vec_widen_umult_lo_v4si): New. * config/i386/i386.c (ix86_expand_sse_unpack): New. * config/i386/i386-protos.h (ix86_expand_sse_unpack): New. * config/i386/sse.md (vec_unpacku_hi_v16qi, vec_unpacks_hi_v16qi, vec_unpacku_lo_v16qi, vec_unpacks_lo_v16qi, vec_unpacku_hi_v8hi, vec_unpacks_hi_v8hi, vec_unpacku_lo_v8hi, vec_unpacks_lo_v8hi, vec_unpacku_hi_v4si, vec_unpacks_hi_v4si, vec_unpacku_lo_v4si, vec_unpacks_lo_v4si): New. 2006-11-08 Dorit Nuzman <dorit@il.ibm.com> * tree-vect-transform.c (vectorizable_type_demotion): New function. (vect_transform_stmt): Add case for type_demotion_vec_info_type. (vect_analyze_operations): Call vectorizable_type_demotion. * tree-vectorizer.h (type_demotion_vec_info_type): New enum stmt_vec_info_type value. (vectorizable_type_demotion): New function declaration. * tree-vect-generic.c (expand_vector_operations_1): Consider correct mode. * tree.def (VEC_PACK_MOD_EXPR, VEC_PACK_SAT_EXPR): New tree-codes. * expr.c (expand_expr_real_1): Add case for VEC_PACK_MOD_EXPR and VEC_PACK_SAT_EXPR. * tree-iniline.c (estimate_num_insns_1): Likewise. * tree-pretty-print.c (dump_generic_node, op_prio): Likewise. * optabs.c (optab_for_tree_code): Likewise. * optabs.c (expand_binop): In case of vec_pack_*_optabs the mode compared against the predicate of the result is not 'mode' (the input to the function) but a mode with half the size of 'mode'. (init_optab): Initialize new optabs. * optabs.h (OTI_vec_pack_mod, OTI_vec_pack_ssat, OTI_vec_pack_usat): New optab indices. (vec_pack_mod_optab, vec_pack_ssat_optab, vec_pack_usat_optab): New optabs. * genopinit.c (vec_pack_mod_optab, vec_pack_ssat_optab): (vec_pack_usat_optab): Initialize new optabs. * doc/md.texi (vec_pack_mod, vec_pack_ssat, vec_pack_usat): New. * config/rs6000/altivec.md (vec_pack_mod_v8hi, vec_pack_mod_v4si): New. 2006-11-08 Richard Henderson <rth@redehat.com> * config/i386/sse.md (vec_pack_mod_v8hi, vec_pack_mod_v4si): (vec_pack_mod_v2di, vec_interleave_highv16qi, vec_interleave_lowv16qi): (vec_interleave_highv8hi, vec_interleave_lowv8hi): (vec_interleave_highv4si, vec_interleave_lowv4si): (vec_interleave_highv2di, vec_interleave_lowv2di): New. 2006-11-08 Dorit Nuzman <dorit@il.ibm.com> * tree-vect-transform.c (vectorizable_reduction): Support multiple datatypes. (vect_transform_stmt): Removed redundant code. 2006-11-08 Dorit Nuzman <dorit@il.ibm.com> * tree-vect-transform.c (vectorizable_operation): Support multiple datatypes. 2006-11-08 Dorit Nuzman <dorit@il.ibm.com> * tree-vect-transform.c (vect_align_data_ref): Removed. (vect_create_data_ref_ptr): Added additional argument - ptr_incr. Updated function documentation. Return the increment stmt in ptr_incr. (bump_vector_ptr): New function. (vect_get_vec_def_for_stmt_copy): New function. (vect_finish_stmt_generation): Create a stmt_info to newly created vector stmts. (vect_setup_realignment): Call vect_create_data_ref_ptr with additional argument. (vectorizable_reduction, vectorizable_assignment): Not supported yet if VF is greater than the number of elements that can fit in one vector word. (vectorizable_operation, vectorizable_condition): Likewise. (vectorizable_store, vectorizable_load): Support the case that the VF is greater than the number of elements that can fit in one vector word. (vect_transform_loop): Don't fail in case of multiple data-types. * tree-vect-analyze.c (vect_determine_vectorization_factor): Don't fail in case of multiple data-types; the smallest type determines the VF. (vect_analyze_data_ref_dependence): Don't record datarefs as same_align if they are of different sizes. (vect_update_misalignment_for_peel): Compare misalignments in terms of number of elements rather than number of bytes. (vect_enhance_data_refs_alignment): Fix/Add dump printouts. (vect_can_advance_ivs_p): Fix a dump printout From-SVN: r118577
2006-11-08 08:32:44 +01:00
if [info exists et_vect_widen_sum_qi_to_hi_saved] {
verbose "check_effective_target_vect_widen_sum_qi_to_hi: using cached result" 2
} else {
set et_vect_widen_sum_qi_to_hi_saved 0
if { [check_effective_target_vect_unpack]
|| [istarget ia64-*-*] } {
set et_vect_widen_sum_qi_to_hi_saved 1
[multiple changes] 2006-11-08 Dorit Nuzman <dorit@il.ibm.com> * tree-vect-analyze.c (vect_mark_relevant, vect_stmt_relevant_p): Take enum argument instead of bool. (vect_analyze_operations): Call vectorizable_type_promotion. * tree-vectorizer.h (type_promotion_vec_info_type): New enum stmt_vec_info_type value. (supportable_widening_operation, vectorizable_type_promotion): New function declarations. * tree-vect-transform.c (vect_gen_widened_results_half): New function. (vectorizable_type_promotion): New function. (vect_transform_stmt): Call vectorizable_type_promotion. * tree-vect-analyze.c (supportable_widening_operation): New function. * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Add implementation. * tree-vect-generic.c (expand_vector_operations_1): Consider correct mode. * tree.def (VEC_WIDEN_MULT_HI_EXPR, VEC_WIDEN_MULT_LO_EXPR): (VEC_UNPACK_HI_EXPR, VEC_UNPACK_LO_EXPR): New tree-codes. * tree-inline.c (estimate_num_insns_1): Add cases for above new tree-codes. * tree-pretty-print.c (dump_generic_node, op_prio): Likewise. * expr.c (expand_expr_real_1): Likewise. * optabs.c (optab_for_tree_code): Likewise. (init_optabs): Initialize new optabs. * genopinit.c (vec_widen_umult_hi_optab, vec_widen_smult_hi_optab, vec_widen_smult_hi_optab, vec_widen_smult_lo_optab, vec_unpacks_hi_optab, vec_unpacks_lo_optab, vec_unpacku_hi_optab, vec_unpacku_lo_optab): Initialize new optabs. * optabs.h (OTI_vec_widen_umult_hi, OTI_vec_widen_umult_lo): (OTI_vec_widen_smult_h, OTI_vec_widen_smult_lo, OTI_vec_unpacks_hi, OTI_vec_unpacks_lo, OTI_vec_unpacku_hi, OTI_vec_unpacku_lo): New optab indices. (vec_widen_umult_hi_optab, vec_widen_umult_lo_optab): (vec_widen_smult_hi_optab, vec_widen_smult_lo_optab): (vec_unpacks_hi_optab, vec_unpacku_hi_optab, vec_unpacks_lo_optab): (vec_unpacku_lo_optab): New optabs. * doc/md.texi (vec_unpacks_hi, vec_unpacks_lo, vec_unpacku_hi): (vec_unpacku_lo, vec_widen_umult_hi, vec_widen_umult_lo): (vec_widen_smult_hi, vec_widen_smult_lo): New. * doc/c-tree.texi (VEC_LSHIFT_EXPR, VEC_RSHIFT_EXPR): (VEC_WIDEN_MULT_HI_EXPR, VEC_WIDEN_MULT_LO_EXPR, VEC_UNPACK_HI_EXPR): (VEC_UNPACK_LO_EXPR, VEC_PACK_MOD_EXPR, VEC_PACK_SAT_EXPR): New. * config/rs6000/altivec.md (UNSPEC_VMULWHUB, UNSPEC_VMULWLUB): (UNSPEC_VMULWHSB, UNSPEC_VMULWLSB, UNSPEC_VMULWHUH, UNSPEC_VMULWLUH): (UNSPEC_VMULWHSH, UNSPEC_VMULWLSH): New. (UNSPEC_VPERMSI, UNSPEC_VPERMHI): New. (vec_vperm_v8hiv4si, vec_vperm_v16qiv8hi): New patterns used to implement the unsigned unpacking patterns. (vec_unpacks_hi_v16qi, vec_unpacks_hi_v8hi, vec_unpacks_lo_v16qi): (vec_unpacks_lo_v8hi): New signed unpacking patterns. (vec_unpacku_hi_v16qi, vec_unpacku_hi_v8hi, vec_unpacku_lo_v16qi): (vec_unpacku_lo_v8hi): New unsigned unpacking patterns. (vec_widen_umult_hi_v16qi, vec_widen_umult_lo_v16qi): (vec_widen_smult_hi_v16qi, vec_widen_smult_lo_v16qi): (vec_widen_umult_hi_v8hi, vec_widen_umult_lo_v8hi): (vec_widen_smult_hi_v8hi, vec_widen_smult_lo_v8hi): New widening multiplication patterns. * target.h (builtin_mul_widen_even, builtin_mul_widen_odd): New. * target-def.h (TARGET_VECTORIZE_BUILTIN_MUL_WIDEN_EVEN): (TARGET_VECTORIZE_BUILTIN_MUL_WIDEN_ODD): New. * config/rs6000/rs6000.c (rs6000_builtin_mul_widen_even): New. (rs6000_builtin_mul_widen_odd): New. (TARGET_VECTORIZE_BUILTIN_MUL_WIDEN_EVEN): Defined. (TARGET_VECTORIZE_BUILTIN_MUL_WIDEN_ODD): Defined. * tree-vectorizer.h (enum vect_relevant): New enum type. (_stmt_vec_info): Field relevant chaned from bool to enum vect_relevant. (STMT_VINFO_RELEVANT_P): Updated. (STMT_VINFO_RELEVANT): New. * tree-vectorizer.c (new_stmt_vec_info): Use STMT_VINFO_RELEVANT instead of STMT_VINFO_RELEVANT_P. * tree-vect-analyze.c (vect_mark_relevant, vect_stmt_relevant_p): Replace calls to STMT_VINFO_RELEVANT_P with STMT_VINFO_RELEVANT, and boolean variable with enum vect_relevant. (vect_mark_stmts_to_be_vectorized): Likewise + update documentation. * doc/tm.texi (TARGET_VECTORIZE_BUILTIN_MUL_WIDEN_EVEN): New. (TARGET_VECTORIZE_BUILTIN_MUL_WIDEN_ODD): New. 2006-11-08 Richard Henderson <rth@redhat.com> * config/i386/sse.md (vec_widen_umult_hi_v8hi, vec_widen_umult_lo_v8hi): New. (vec_widen_smult_hi_v4si, vec_widen_smult_lo_v4si, vec_widen_umult_hi_v4si, vec_widen_umult_lo_v4si): New. * config/i386/i386.c (ix86_expand_sse_unpack): New. * config/i386/i386-protos.h (ix86_expand_sse_unpack): New. * config/i386/sse.md (vec_unpacku_hi_v16qi, vec_unpacks_hi_v16qi, vec_unpacku_lo_v16qi, vec_unpacks_lo_v16qi, vec_unpacku_hi_v8hi, vec_unpacks_hi_v8hi, vec_unpacku_lo_v8hi, vec_unpacks_lo_v8hi, vec_unpacku_hi_v4si, vec_unpacks_hi_v4si, vec_unpacku_lo_v4si, vec_unpacks_lo_v4si): New. 2006-11-08 Dorit Nuzman <dorit@il.ibm.com> * tree-vect-transform.c (vectorizable_type_demotion): New function. (vect_transform_stmt): Add case for type_demotion_vec_info_type. (vect_analyze_operations): Call vectorizable_type_demotion. * tree-vectorizer.h (type_demotion_vec_info_type): New enum stmt_vec_info_type value. (vectorizable_type_demotion): New function declaration. * tree-vect-generic.c (expand_vector_operations_1): Consider correct mode. * tree.def (VEC_PACK_MOD_EXPR, VEC_PACK_SAT_EXPR): New tree-codes. * expr.c (expand_expr_real_1): Add case for VEC_PACK_MOD_EXPR and VEC_PACK_SAT_EXPR. * tree-iniline.c (estimate_num_insns_1): Likewise. * tree-pretty-print.c (dump_generic_node, op_prio): Likewise. * optabs.c (optab_for_tree_code): Likewise. * optabs.c (expand_binop): In case of vec_pack_*_optabs the mode compared against the predicate of the result is not 'mode' (the input to the function) but a mode with half the size of 'mode'. (init_optab): Initialize new optabs. * optabs.h (OTI_vec_pack_mod, OTI_vec_pack_ssat, OTI_vec_pack_usat): New optab indices. (vec_pack_mod_optab, vec_pack_ssat_optab, vec_pack_usat_optab): New optabs. * genopinit.c (vec_pack_mod_optab, vec_pack_ssat_optab): (vec_pack_usat_optab): Initialize new optabs. * doc/md.texi (vec_pack_mod, vec_pack_ssat, vec_pack_usat): New. * config/rs6000/altivec.md (vec_pack_mod_v8hi, vec_pack_mod_v4si): New. 2006-11-08 Richard Henderson <rth@redehat.com> * config/i386/sse.md (vec_pack_mod_v8hi, vec_pack_mod_v4si): (vec_pack_mod_v2di, vec_interleave_highv16qi, vec_interleave_lowv16qi): (vec_interleave_highv8hi, vec_interleave_lowv8hi): (vec_interleave_highv4si, vec_interleave_lowv4si): (vec_interleave_highv2di, vec_interleave_lowv2di): New. 2006-11-08 Dorit Nuzman <dorit@il.ibm.com> * tree-vect-transform.c (vectorizable_reduction): Support multiple datatypes. (vect_transform_stmt): Removed redundant code. 2006-11-08 Dorit Nuzman <dorit@il.ibm.com> * tree-vect-transform.c (vectorizable_operation): Support multiple datatypes. 2006-11-08 Dorit Nuzman <dorit@il.ibm.com> * tree-vect-transform.c (vect_align_data_ref): Removed. (vect_create_data_ref_ptr): Added additional argument - ptr_incr. Updated function documentation. Return the increment stmt in ptr_incr. (bump_vector_ptr): New function. (vect_get_vec_def_for_stmt_copy): New function. (vect_finish_stmt_generation): Create a stmt_info to newly created vector stmts. (vect_setup_realignment): Call vect_create_data_ref_ptr with additional argument. (vectorizable_reduction, vectorizable_assignment): Not supported yet if VF is greater than the number of elements that can fit in one vector word. (vectorizable_operation, vectorizable_condition): Likewise. (vectorizable_store, vectorizable_load): Support the case that the VF is greater than the number of elements that can fit in one vector word. (vect_transform_loop): Don't fail in case of multiple data-types. * tree-vect-analyze.c (vect_determine_vectorization_factor): Don't fail in case of multiple data-types; the smallest type determines the VF. (vect_analyze_data_ref_dependence): Don't record datarefs as same_align if they are of different sizes. (vect_update_misalignment_for_peel): Compare misalignments in terms of number of elements rather than number of bytes. (vect_enhance_data_refs_alignment): Fix/Add dump printouts. (vect_can_advance_ivs_p): Fix a dump printout From-SVN: r118577
2006-11-08 08:32:44 +01:00
}
}
verbose "check_effective_target_vect_widen_sum_qi_to_hi: returning $et_vect_widen_sum_qi_to_hi_saved" 2
return $et_vect_widen_sum_qi_to_hi_saved
}
# Return 1 if the target plus current options supports a vector
# widening summation of *char* args into *int* result, 0 otherwise.
#
# This won't change for different subtargets so cache the result.
proc check_effective_target_vect_widen_sum_qi_to_si { } {
global et_vect_widen_sum_qi_to_si
[multiple changes] 2006-11-08 Dorit Nuzman <dorit@il.ibm.com> * tree-vect-analyze.c (vect_mark_relevant, vect_stmt_relevant_p): Take enum argument instead of bool. (vect_analyze_operations): Call vectorizable_type_promotion. * tree-vectorizer.h (type_promotion_vec_info_type): New enum stmt_vec_info_type value. (supportable_widening_operation, vectorizable_type_promotion): New function declarations. * tree-vect-transform.c (vect_gen_widened_results_half): New function. (vectorizable_type_promotion): New function. (vect_transform_stmt): Call vectorizable_type_promotion. * tree-vect-analyze.c (supportable_widening_operation): New function. * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Add implementation. * tree-vect-generic.c (expand_vector_operations_1): Consider correct mode. * tree.def (VEC_WIDEN_MULT_HI_EXPR, VEC_WIDEN_MULT_LO_EXPR): (VEC_UNPACK_HI_EXPR, VEC_UNPACK_LO_EXPR): New tree-codes. * tree-inline.c (estimate_num_insns_1): Add cases for above new tree-codes. * tree-pretty-print.c (dump_generic_node, op_prio): Likewise. * expr.c (expand_expr_real_1): Likewise. * optabs.c (optab_for_tree_code): Likewise. (init_optabs): Initialize new optabs. * genopinit.c (vec_widen_umult_hi_optab, vec_widen_smult_hi_optab, vec_widen_smult_hi_optab, vec_widen_smult_lo_optab, vec_unpacks_hi_optab, vec_unpacks_lo_optab, vec_unpacku_hi_optab, vec_unpacku_lo_optab): Initialize new optabs. * optabs.h (OTI_vec_widen_umult_hi, OTI_vec_widen_umult_lo): (OTI_vec_widen_smult_h, OTI_vec_widen_smult_lo, OTI_vec_unpacks_hi, OTI_vec_unpacks_lo, OTI_vec_unpacku_hi, OTI_vec_unpacku_lo): New optab indices. (vec_widen_umult_hi_optab, vec_widen_umult_lo_optab): (vec_widen_smult_hi_optab, vec_widen_smult_lo_optab): (vec_unpacks_hi_optab, vec_unpacku_hi_optab, vec_unpacks_lo_optab): (vec_unpacku_lo_optab): New optabs. * doc/md.texi (vec_unpacks_hi, vec_unpacks_lo, vec_unpacku_hi): (vec_unpacku_lo, vec_widen_umult_hi, vec_widen_umult_lo): (vec_widen_smult_hi, vec_widen_smult_lo): New. * doc/c-tree.texi (VEC_LSHIFT_EXPR, VEC_RSHIFT_EXPR): (VEC_WIDEN_MULT_HI_EXPR, VEC_WIDEN_MULT_LO_EXPR, VEC_UNPACK_HI_EXPR): (VEC_UNPACK_LO_EXPR, VEC_PACK_MOD_EXPR, VEC_PACK_SAT_EXPR): New. * config/rs6000/altivec.md (UNSPEC_VMULWHUB, UNSPEC_VMULWLUB): (UNSPEC_VMULWHSB, UNSPEC_VMULWLSB, UNSPEC_VMULWHUH, UNSPEC_VMULWLUH): (UNSPEC_VMULWHSH, UNSPEC_VMULWLSH): New. (UNSPEC_VPERMSI, UNSPEC_VPERMHI): New. (vec_vperm_v8hiv4si, vec_vperm_v16qiv8hi): New patterns used to implement the unsigned unpacking patterns. (vec_unpacks_hi_v16qi, vec_unpacks_hi_v8hi, vec_unpacks_lo_v16qi): (vec_unpacks_lo_v8hi): New signed unpacking patterns. (vec_unpacku_hi_v16qi, vec_unpacku_hi_v8hi, vec_unpacku_lo_v16qi): (vec_unpacku_lo_v8hi): New unsigned unpacking patterns. (vec_widen_umult_hi_v16qi, vec_widen_umult_lo_v16qi): (vec_widen_smult_hi_v16qi, vec_widen_smult_lo_v16qi): (vec_widen_umult_hi_v8hi, vec_widen_umult_lo_v8hi): (vec_widen_smult_hi_v8hi, vec_widen_smult_lo_v8hi): New widening multiplication patterns. * target.h (builtin_mul_widen_even, builtin_mul_widen_odd): New. * target-def.h (TARGET_VECTORIZE_BUILTIN_MUL_WIDEN_EVEN): (TARGET_VECTORIZE_BUILTIN_MUL_WIDEN_ODD): New. * config/rs6000/rs6000.c (rs6000_builtin_mul_widen_even): New. (rs6000_builtin_mul_widen_odd): New. (TARGET_VECTORIZE_BUILTIN_MUL_WIDEN_EVEN): Defined. (TARGET_VECTORIZE_BUILTIN_MUL_WIDEN_ODD): Defined. * tree-vectorizer.h (enum vect_relevant): New enum type. (_stmt_vec_info): Field relevant chaned from bool to enum vect_relevant. (STMT_VINFO_RELEVANT_P): Updated. (STMT_VINFO_RELEVANT): New. * tree-vectorizer.c (new_stmt_vec_info): Use STMT_VINFO_RELEVANT instead of STMT_VINFO_RELEVANT_P. * tree-vect-analyze.c (vect_mark_relevant, vect_stmt_relevant_p): Replace calls to STMT_VINFO_RELEVANT_P with STMT_VINFO_RELEVANT, and boolean variable with enum vect_relevant. (vect_mark_stmts_to_be_vectorized): Likewise + update documentation. * doc/tm.texi (TARGET_VECTORIZE_BUILTIN_MUL_WIDEN_EVEN): New. (TARGET_VECTORIZE_BUILTIN_MUL_WIDEN_ODD): New. 2006-11-08 Richard Henderson <rth@redhat.com> * config/i386/sse.md (vec_widen_umult_hi_v8hi, vec_widen_umult_lo_v8hi): New. (vec_widen_smult_hi_v4si, vec_widen_smult_lo_v4si, vec_widen_umult_hi_v4si, vec_widen_umult_lo_v4si): New. * config/i386/i386.c (ix86_expand_sse_unpack): New. * config/i386/i386-protos.h (ix86_expand_sse_unpack): New. * config/i386/sse.md (vec_unpacku_hi_v16qi, vec_unpacks_hi_v16qi, vec_unpacku_lo_v16qi, vec_unpacks_lo_v16qi, vec_unpacku_hi_v8hi, vec_unpacks_hi_v8hi, vec_unpacku_lo_v8hi, vec_unpacks_lo_v8hi, vec_unpacku_hi_v4si, vec_unpacks_hi_v4si, vec_unpacku_lo_v4si, vec_unpacks_lo_v4si): New. 2006-11-08 Dorit Nuzman <dorit@il.ibm.com> * tree-vect-transform.c (vectorizable_type_demotion): New function. (vect_transform_stmt): Add case for type_demotion_vec_info_type. (vect_analyze_operations): Call vectorizable_type_demotion. * tree-vectorizer.h (type_demotion_vec_info_type): New enum stmt_vec_info_type value. (vectorizable_type_demotion): New function declaration. * tree-vect-generic.c (expand_vector_operations_1): Consider correct mode. * tree.def (VEC_PACK_MOD_EXPR, VEC_PACK_SAT_EXPR): New tree-codes. * expr.c (expand_expr_real_1): Add case for VEC_PACK_MOD_EXPR and VEC_PACK_SAT_EXPR. * tree-iniline.c (estimate_num_insns_1): Likewise. * tree-pretty-print.c (dump_generic_node, op_prio): Likewise. * optabs.c (optab_for_tree_code): Likewise. * optabs.c (expand_binop): In case of vec_pack_*_optabs the mode compared against the predicate of the result is not 'mode' (the input to the function) but a mode with half the size of 'mode'. (init_optab): Initialize new optabs. * optabs.h (OTI_vec_pack_mod, OTI_vec_pack_ssat, OTI_vec_pack_usat): New optab indices. (vec_pack_mod_optab, vec_pack_ssat_optab, vec_pack_usat_optab): New optabs. * genopinit.c (vec_pack_mod_optab, vec_pack_ssat_optab): (vec_pack_usat_optab): Initialize new optabs. * doc/md.texi (vec_pack_mod, vec_pack_ssat, vec_pack_usat): New. * config/rs6000/altivec.md (vec_pack_mod_v8hi, vec_pack_mod_v4si): New. 2006-11-08 Richard Henderson <rth@redehat.com> * config/i386/sse.md (vec_pack_mod_v8hi, vec_pack_mod_v4si): (vec_pack_mod_v2di, vec_interleave_highv16qi, vec_interleave_lowv16qi): (vec_interleave_highv8hi, vec_interleave_lowv8hi): (vec_interleave_highv4si, vec_interleave_lowv4si): (vec_interleave_highv2di, vec_interleave_lowv2di): New. 2006-11-08 Dorit Nuzman <dorit@il.ibm.com> * tree-vect-transform.c (vectorizable_reduction): Support multiple datatypes. (vect_transform_stmt): Removed redundant code. 2006-11-08 Dorit Nuzman <dorit@il.ibm.com> * tree-vect-transform.c (vectorizable_operation): Support multiple datatypes. 2006-11-08 Dorit Nuzman <dorit@il.ibm.com> * tree-vect-transform.c (vect_align_data_ref): Removed. (vect_create_data_ref_ptr): Added additional argument - ptr_incr. Updated function documentation. Return the increment stmt in ptr_incr. (bump_vector_ptr): New function. (vect_get_vec_def_for_stmt_copy): New function. (vect_finish_stmt_generation): Create a stmt_info to newly created vector stmts. (vect_setup_realignment): Call vect_create_data_ref_ptr with additional argument. (vectorizable_reduction, vectorizable_assignment): Not supported yet if VF is greater than the number of elements that can fit in one vector word. (vectorizable_operation, vectorizable_condition): Likewise. (vectorizable_store, vectorizable_load): Support the case that the VF is greater than the number of elements that can fit in one vector word. (vect_transform_loop): Don't fail in case of multiple data-types. * tree-vect-analyze.c (vect_determine_vectorization_factor): Don't fail in case of multiple data-types; the smallest type determines the VF. (vect_analyze_data_ref_dependence): Don't record datarefs as same_align if they are of different sizes. (vect_update_misalignment_for_peel): Compare misalignments in terms of number of elements rather than number of bytes. (vect_enhance_data_refs_alignment): Fix/Add dump printouts. (vect_can_advance_ivs_p): Fix a dump printout From-SVN: r118577
2006-11-08 08:32:44 +01:00
if [info exists et_vect_widen_sum_qi_to_si_saved] {
verbose "check_effective_target_vect_widen_sum_qi_to_si: using cached result" 2
} else {
set et_vect_widen_sum_qi_to_si_saved 0
if { [istarget powerpc*-*-*] } {
set et_vect_widen_sum_qi_to_si_saved 1
}
}
verbose "check_effective_target_vect_widen_sum_qi_to_si: returning $et_vect_widen_sum_qi_to_si_saved" 2
return $et_vect_widen_sum_qi_to_si_saved
}
Makefile.in (tree-vect-patterns.o): Add rule for new file. * Makefile.in (tree-vect-patterns.o): Add rule for new file. * tree-vect-analyze.c (vect_determine_vectorization_factor): Use existing STMT_VINFO_VECTYPE if available. (vect_mark_relevant): Add special handling for stmts that are marked as STMT_VINFO_IN_PATTERN_P. (vect_analyze_loop): Call vect_pattern_recog. * tree-vectorizer.c (new_stmt_vec_info): Initialize new fields. * tree-vectorizer.h (in_pattern_p, related_stmt): New fields in stmt_info. (STMT_VINFO_IN_PATTERN_P, STMT_VINFO_RELATED_STMT): New macros. (vect_recog_func_ptr): New function-pointer type. * tree-vect-patterns.c: New file. (vect_recog_widen_sum_pattern, vect_recog_widen_mult_pattern): (vect_recog_dot_prod_pattern, vect_pattern_recog): (vect_pattern_recog_1): New functions. (vect_pattern_recog_funcs): New array of function pointers. * tree-vectorizer.h (ternary_op): New enum value. * tree-vect-transform.c (vect_create_epilog_for_reduction): Added declaration. Revised documentation. Removed redundant dump prints. Removed redundant argument. Added support for reduction patterns. (vectorizable_reduction): Added support for reduction patterns. (vect_transform_stmt): Added support for patterns. * expr.c (expand_expr_real_1): Added case for DOT_PROD_EXPR. * genopinit.c (udot_prod_optab, sdot_prod_optab): Initialize. * optabs.c (optab_for_tree_code): Added case for DOT_PROD_EXPR. (expand_widen_pattern_expr): New function. (init_optabs): Initialize new optabs udot_prod_optab, sdot_prod_optab. * optabs.h (OTI_sdot_prod, OTI_udot_prod): New. (sdot_prod_optab, udot_prod_optab): Define new optabs. (expand_widen_pattern_expr): New function declaration. * tree.def (DOT_PROD_EXPR, WIDEN_SUM_EXPR, WIDEN_MULT_EXPR): New tree-codes. * tree-inline.c (estimate_num_insns_1): Added cases for new tree-codes DOT_PROD_EXPR, WIDEN_SUM_EXPR, WIDEN_MULT_EXPR. * tree-pretty-print.c (dump_generic_node): Likewise. (op_prio): Likewise. (op_symbol): Added cases for WIDEN_SUM_EXPR, WIDEN_MULT_EXPR. * tree-ssa-operands.c (get_expr_operands): Added case for DOT_PROD_EXPR. * tree-vect-patterns.c (widened_name_p): New function. (vect_recog_dot_prod_pattern): Added function implementation. * tree-vect-transform.c (get_initial_def_for_reduction): Added cases for DOT_PROD_EXPR, WIDEN_SUM_EXPR. * config/rs6000/altivec.md (udot_prod<mode>, sdot_prodv8hi): New. * config/i386/sse.md (sdot_prodv8hi, udot_prodv4si): New. * expr.c (expand_expr_real_1): Added case for WIDEN_SUM_EXPR. * genopinit.c (widen_ssum_optab, widen_usum_optab): Initialize. * optabs.c (optab_for_tree_code): Added case for WIDEN_SUM_EXPR. (init_optabs): Initialize new optabs widen_ssum_optab, widen_usum_optab. * optabs.h (OTI_widen_ssum, OTI_widen_usum): New. (widen_ssum_optab, widen_usum_optab): Define new optabs. * tree-vect-generic.c: (expand_vector_operations_1): Check type of use instead of type of def. * tree-vect-patterns.c (vect_recog_widen_sum_pattern): Added function implementation. * config/rs6000/altivec.md (widen_usum<mode>, widen_ssumv16qi, widen_ssumv8hi): New. * doc/tm.texi (ssum_widen, usum_widen, sdot_prod, udot_prod): New patterns. From-SVN: r109954
2006-01-19 11:24:00 +01:00
# Return 1 if the target plus current options supports a vector
[multiple changes] 2006-11-08 Dorit Nuzman <dorit@il.ibm.com> * tree-vect-analyze.c (vect_mark_relevant, vect_stmt_relevant_p): Take enum argument instead of bool. (vect_analyze_operations): Call vectorizable_type_promotion. * tree-vectorizer.h (type_promotion_vec_info_type): New enum stmt_vec_info_type value. (supportable_widening_operation, vectorizable_type_promotion): New function declarations. * tree-vect-transform.c (vect_gen_widened_results_half): New function. (vectorizable_type_promotion): New function. (vect_transform_stmt): Call vectorizable_type_promotion. * tree-vect-analyze.c (supportable_widening_operation): New function. * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Add implementation. * tree-vect-generic.c (expand_vector_operations_1): Consider correct mode. * tree.def (VEC_WIDEN_MULT_HI_EXPR, VEC_WIDEN_MULT_LO_EXPR): (VEC_UNPACK_HI_EXPR, VEC_UNPACK_LO_EXPR): New tree-codes. * tree-inline.c (estimate_num_insns_1): Add cases for above new tree-codes. * tree-pretty-print.c (dump_generic_node, op_prio): Likewise. * expr.c (expand_expr_real_1): Likewise. * optabs.c (optab_for_tree_code): Likewise. (init_optabs): Initialize new optabs. * genopinit.c (vec_widen_umult_hi_optab, vec_widen_smult_hi_optab, vec_widen_smult_hi_optab, vec_widen_smult_lo_optab, vec_unpacks_hi_optab, vec_unpacks_lo_optab, vec_unpacku_hi_optab, vec_unpacku_lo_optab): Initialize new optabs. * optabs.h (OTI_vec_widen_umult_hi, OTI_vec_widen_umult_lo): (OTI_vec_widen_smult_h, OTI_vec_widen_smult_lo, OTI_vec_unpacks_hi, OTI_vec_unpacks_lo, OTI_vec_unpacku_hi, OTI_vec_unpacku_lo): New optab indices. (vec_widen_umult_hi_optab, vec_widen_umult_lo_optab): (vec_widen_smult_hi_optab, vec_widen_smult_lo_optab): (vec_unpacks_hi_optab, vec_unpacku_hi_optab, vec_unpacks_lo_optab): (vec_unpacku_lo_optab): New optabs. * doc/md.texi (vec_unpacks_hi, vec_unpacks_lo, vec_unpacku_hi): (vec_unpacku_lo, vec_widen_umult_hi, vec_widen_umult_lo): (vec_widen_smult_hi, vec_widen_smult_lo): New. * doc/c-tree.texi (VEC_LSHIFT_EXPR, VEC_RSHIFT_EXPR): (VEC_WIDEN_MULT_HI_EXPR, VEC_WIDEN_MULT_LO_EXPR, VEC_UNPACK_HI_EXPR): (VEC_UNPACK_LO_EXPR, VEC_PACK_MOD_EXPR, VEC_PACK_SAT_EXPR): New. * config/rs6000/altivec.md (UNSPEC_VMULWHUB, UNSPEC_VMULWLUB): (UNSPEC_VMULWHSB, UNSPEC_VMULWLSB, UNSPEC_VMULWHUH, UNSPEC_VMULWLUH): (UNSPEC_VMULWHSH, UNSPEC_VMULWLSH): New. (UNSPEC_VPERMSI, UNSPEC_VPERMHI): New. (vec_vperm_v8hiv4si, vec_vperm_v16qiv8hi): New patterns used to implement the unsigned unpacking patterns. (vec_unpacks_hi_v16qi, vec_unpacks_hi_v8hi, vec_unpacks_lo_v16qi): (vec_unpacks_lo_v8hi): New signed unpacking patterns. (vec_unpacku_hi_v16qi, vec_unpacku_hi_v8hi, vec_unpacku_lo_v16qi): (vec_unpacku_lo_v8hi): New unsigned unpacking patterns. (vec_widen_umult_hi_v16qi, vec_widen_umult_lo_v16qi): (vec_widen_smult_hi_v16qi, vec_widen_smult_lo_v16qi): (vec_widen_umult_hi_v8hi, vec_widen_umult_lo_v8hi): (vec_widen_smult_hi_v8hi, vec_widen_smult_lo_v8hi): New widening multiplication patterns. * target.h (builtin_mul_widen_even, builtin_mul_widen_odd): New. * target-def.h (TARGET_VECTORIZE_BUILTIN_MUL_WIDEN_EVEN): (TARGET_VECTORIZE_BUILTIN_MUL_WIDEN_ODD): New. * config/rs6000/rs6000.c (rs6000_builtin_mul_widen_even): New. (rs6000_builtin_mul_widen_odd): New. (TARGET_VECTORIZE_BUILTIN_MUL_WIDEN_EVEN): Defined. (TARGET_VECTORIZE_BUILTIN_MUL_WIDEN_ODD): Defined. * tree-vectorizer.h (enum vect_relevant): New enum type. (_stmt_vec_info): Field relevant chaned from bool to enum vect_relevant. (STMT_VINFO_RELEVANT_P): Updated. (STMT_VINFO_RELEVANT): New. * tree-vectorizer.c (new_stmt_vec_info): Use STMT_VINFO_RELEVANT instead of STMT_VINFO_RELEVANT_P. * tree-vect-analyze.c (vect_mark_relevant, vect_stmt_relevant_p): Replace calls to STMT_VINFO_RELEVANT_P with STMT_VINFO_RELEVANT, and boolean variable with enum vect_relevant. (vect_mark_stmts_to_be_vectorized): Likewise + update documentation. * doc/tm.texi (TARGET_VECTORIZE_BUILTIN_MUL_WIDEN_EVEN): New. (TARGET_VECTORIZE_BUILTIN_MUL_WIDEN_ODD): New. 2006-11-08 Richard Henderson <rth@redhat.com> * config/i386/sse.md (vec_widen_umult_hi_v8hi, vec_widen_umult_lo_v8hi): New. (vec_widen_smult_hi_v4si, vec_widen_smult_lo_v4si, vec_widen_umult_hi_v4si, vec_widen_umult_lo_v4si): New. * config/i386/i386.c (ix86_expand_sse_unpack): New. * config/i386/i386-protos.h (ix86_expand_sse_unpack): New. * config/i386/sse.md (vec_unpacku_hi_v16qi, vec_unpacks_hi_v16qi, vec_unpacku_lo_v16qi, vec_unpacks_lo_v16qi, vec_unpacku_hi_v8hi, vec_unpacks_hi_v8hi, vec_unpacku_lo_v8hi, vec_unpacks_lo_v8hi, vec_unpacku_hi_v4si, vec_unpacks_hi_v4si, vec_unpacku_lo_v4si, vec_unpacks_lo_v4si): New. 2006-11-08 Dorit Nuzman <dorit@il.ibm.com> * tree-vect-transform.c (vectorizable_type_demotion): New function. (vect_transform_stmt): Add case for type_demotion_vec_info_type. (vect_analyze_operations): Call vectorizable_type_demotion. * tree-vectorizer.h (type_demotion_vec_info_type): New enum stmt_vec_info_type value. (vectorizable_type_demotion): New function declaration. * tree-vect-generic.c (expand_vector_operations_1): Consider correct mode. * tree.def (VEC_PACK_MOD_EXPR, VEC_PACK_SAT_EXPR): New tree-codes. * expr.c (expand_expr_real_1): Add case for VEC_PACK_MOD_EXPR and VEC_PACK_SAT_EXPR. * tree-iniline.c (estimate_num_insns_1): Likewise. * tree-pretty-print.c (dump_generic_node, op_prio): Likewise. * optabs.c (optab_for_tree_code): Likewise. * optabs.c (expand_binop): In case of vec_pack_*_optabs the mode compared against the predicate of the result is not 'mode' (the input to the function) but a mode with half the size of 'mode'. (init_optab): Initialize new optabs. * optabs.h (OTI_vec_pack_mod, OTI_vec_pack_ssat, OTI_vec_pack_usat): New optab indices. (vec_pack_mod_optab, vec_pack_ssat_optab, vec_pack_usat_optab): New optabs. * genopinit.c (vec_pack_mod_optab, vec_pack_ssat_optab): (vec_pack_usat_optab): Initialize new optabs. * doc/md.texi (vec_pack_mod, vec_pack_ssat, vec_pack_usat): New. * config/rs6000/altivec.md (vec_pack_mod_v8hi, vec_pack_mod_v4si): New. 2006-11-08 Richard Henderson <rth@redehat.com> * config/i386/sse.md (vec_pack_mod_v8hi, vec_pack_mod_v4si): (vec_pack_mod_v2di, vec_interleave_highv16qi, vec_interleave_lowv16qi): (vec_interleave_highv8hi, vec_interleave_lowv8hi): (vec_interleave_highv4si, vec_interleave_lowv4si): (vec_interleave_highv2di, vec_interleave_lowv2di): New. 2006-11-08 Dorit Nuzman <dorit@il.ibm.com> * tree-vect-transform.c (vectorizable_reduction): Support multiple datatypes. (vect_transform_stmt): Removed redundant code. 2006-11-08 Dorit Nuzman <dorit@il.ibm.com> * tree-vect-transform.c (vectorizable_operation): Support multiple datatypes. 2006-11-08 Dorit Nuzman <dorit@il.ibm.com> * tree-vect-transform.c (vect_align_data_ref): Removed. (vect_create_data_ref_ptr): Added additional argument - ptr_incr. Updated function documentation. Return the increment stmt in ptr_incr. (bump_vector_ptr): New function. (vect_get_vec_def_for_stmt_copy): New function. (vect_finish_stmt_generation): Create a stmt_info to newly created vector stmts. (vect_setup_realignment): Call vect_create_data_ref_ptr with additional argument. (vectorizable_reduction, vectorizable_assignment): Not supported yet if VF is greater than the number of elements that can fit in one vector word. (vectorizable_operation, vectorizable_condition): Likewise. (vectorizable_store, vectorizable_load): Support the case that the VF is greater than the number of elements that can fit in one vector word. (vect_transform_loop): Don't fail in case of multiple data-types. * tree-vect-analyze.c (vect_determine_vectorization_factor): Don't fail in case of multiple data-types; the smallest type determines the VF. (vect_analyze_data_ref_dependence): Don't record datarefs as same_align if they are of different sizes. (vect_update_misalignment_for_peel): Compare misalignments in terms of number of elements rather than number of bytes. (vect_enhance_data_refs_alignment): Fix/Add dump printouts. (vect_can_advance_ivs_p): Fix a dump printout From-SVN: r118577
2006-11-08 08:32:44 +01:00
# widening multiplication of *char* args into *short* result, 0 otherwise.
# A target can also support this widening multplication if it can support
# promotion (unpacking) from chars to shorts, and vect_short_mult (non-widening
# multiplication of shorts).
Makefile.in (tree-vect-patterns.o): Add rule for new file. * Makefile.in (tree-vect-patterns.o): Add rule for new file. * tree-vect-analyze.c (vect_determine_vectorization_factor): Use existing STMT_VINFO_VECTYPE if available. (vect_mark_relevant): Add special handling for stmts that are marked as STMT_VINFO_IN_PATTERN_P. (vect_analyze_loop): Call vect_pattern_recog. * tree-vectorizer.c (new_stmt_vec_info): Initialize new fields. * tree-vectorizer.h (in_pattern_p, related_stmt): New fields in stmt_info. (STMT_VINFO_IN_PATTERN_P, STMT_VINFO_RELATED_STMT): New macros. (vect_recog_func_ptr): New function-pointer type. * tree-vect-patterns.c: New file. (vect_recog_widen_sum_pattern, vect_recog_widen_mult_pattern): (vect_recog_dot_prod_pattern, vect_pattern_recog): (vect_pattern_recog_1): New functions. (vect_pattern_recog_funcs): New array of function pointers. * tree-vectorizer.h (ternary_op): New enum value. * tree-vect-transform.c (vect_create_epilog_for_reduction): Added declaration. Revised documentation. Removed redundant dump prints. Removed redundant argument. Added support for reduction patterns. (vectorizable_reduction): Added support for reduction patterns. (vect_transform_stmt): Added support for patterns. * expr.c (expand_expr_real_1): Added case for DOT_PROD_EXPR. * genopinit.c (udot_prod_optab, sdot_prod_optab): Initialize. * optabs.c (optab_for_tree_code): Added case for DOT_PROD_EXPR. (expand_widen_pattern_expr): New function. (init_optabs): Initialize new optabs udot_prod_optab, sdot_prod_optab. * optabs.h (OTI_sdot_prod, OTI_udot_prod): New. (sdot_prod_optab, udot_prod_optab): Define new optabs. (expand_widen_pattern_expr): New function declaration. * tree.def (DOT_PROD_EXPR, WIDEN_SUM_EXPR, WIDEN_MULT_EXPR): New tree-codes. * tree-inline.c (estimate_num_insns_1): Added cases for new tree-codes DOT_PROD_EXPR, WIDEN_SUM_EXPR, WIDEN_MULT_EXPR. * tree-pretty-print.c (dump_generic_node): Likewise. (op_prio): Likewise. (op_symbol): Added cases for WIDEN_SUM_EXPR, WIDEN_MULT_EXPR. * tree-ssa-operands.c (get_expr_operands): Added case for DOT_PROD_EXPR. * tree-vect-patterns.c (widened_name_p): New function. (vect_recog_dot_prod_pattern): Added function implementation. * tree-vect-transform.c (get_initial_def_for_reduction): Added cases for DOT_PROD_EXPR, WIDEN_SUM_EXPR. * config/rs6000/altivec.md (udot_prod<mode>, sdot_prodv8hi): New. * config/i386/sse.md (sdot_prodv8hi, udot_prodv4si): New. * expr.c (expand_expr_real_1): Added case for WIDEN_SUM_EXPR. * genopinit.c (widen_ssum_optab, widen_usum_optab): Initialize. * optabs.c (optab_for_tree_code): Added case for WIDEN_SUM_EXPR. (init_optabs): Initialize new optabs widen_ssum_optab, widen_usum_optab. * optabs.h (OTI_widen_ssum, OTI_widen_usum): New. (widen_ssum_optab, widen_usum_optab): Define new optabs. * tree-vect-generic.c: (expand_vector_operations_1): Check type of use instead of type of def. * tree-vect-patterns.c (vect_recog_widen_sum_pattern): Added function implementation. * config/rs6000/altivec.md (widen_usum<mode>, widen_ssumv16qi, widen_ssumv8hi): New. * doc/tm.texi (ssum_widen, usum_widen, sdot_prod, udot_prod): New patterns. From-SVN: r109954
2006-01-19 11:24:00 +01:00
#
# This won't change for different subtargets so cache the result.
[multiple changes] 2006-11-08 Dorit Nuzman <dorit@il.ibm.com> * tree-vect-analyze.c (vect_mark_relevant, vect_stmt_relevant_p): Take enum argument instead of bool. (vect_analyze_operations): Call vectorizable_type_promotion. * tree-vectorizer.h (type_promotion_vec_info_type): New enum stmt_vec_info_type value. (supportable_widening_operation, vectorizable_type_promotion): New function declarations. * tree-vect-transform.c (vect_gen_widened_results_half): New function. (vectorizable_type_promotion): New function. (vect_transform_stmt): Call vectorizable_type_promotion. * tree-vect-analyze.c (supportable_widening_operation): New function. * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Add implementation. * tree-vect-generic.c (expand_vector_operations_1): Consider correct mode. * tree.def (VEC_WIDEN_MULT_HI_EXPR, VEC_WIDEN_MULT_LO_EXPR): (VEC_UNPACK_HI_EXPR, VEC_UNPACK_LO_EXPR): New tree-codes. * tree-inline.c (estimate_num_insns_1): Add cases for above new tree-codes. * tree-pretty-print.c (dump_generic_node, op_prio): Likewise. * expr.c (expand_expr_real_1): Likewise. * optabs.c (optab_for_tree_code): Likewise. (init_optabs): Initialize new optabs. * genopinit.c (vec_widen_umult_hi_optab, vec_widen_smult_hi_optab, vec_widen_smult_hi_optab, vec_widen_smult_lo_optab, vec_unpacks_hi_optab, vec_unpacks_lo_optab, vec_unpacku_hi_optab, vec_unpacku_lo_optab): Initialize new optabs. * optabs.h (OTI_vec_widen_umult_hi, OTI_vec_widen_umult_lo): (OTI_vec_widen_smult_h, OTI_vec_widen_smult_lo, OTI_vec_unpacks_hi, OTI_vec_unpacks_lo, OTI_vec_unpacku_hi, OTI_vec_unpacku_lo): New optab indices. (vec_widen_umult_hi_optab, vec_widen_umult_lo_optab): (vec_widen_smult_hi_optab, vec_widen_smult_lo_optab): (vec_unpacks_hi_optab, vec_unpacku_hi_optab, vec_unpacks_lo_optab): (vec_unpacku_lo_optab): New optabs. * doc/md.texi (vec_unpacks_hi, vec_unpacks_lo, vec_unpacku_hi): (vec_unpacku_lo, vec_widen_umult_hi, vec_widen_umult_lo): (vec_widen_smult_hi, vec_widen_smult_lo): New. * doc/c-tree.texi (VEC_LSHIFT_EXPR, VEC_RSHIFT_EXPR): (VEC_WIDEN_MULT_HI_EXPR, VEC_WIDEN_MULT_LO_EXPR, VEC_UNPACK_HI_EXPR): (VEC_UNPACK_LO_EXPR, VEC_PACK_MOD_EXPR, VEC_PACK_SAT_EXPR): New. * config/rs6000/altivec.md (UNSPEC_VMULWHUB, UNSPEC_VMULWLUB): (UNSPEC_VMULWHSB, UNSPEC_VMULWLSB, UNSPEC_VMULWHUH, UNSPEC_VMULWLUH): (UNSPEC_VMULWHSH, UNSPEC_VMULWLSH): New. (UNSPEC_VPERMSI, UNSPEC_VPERMHI): New. (vec_vperm_v8hiv4si, vec_vperm_v16qiv8hi): New patterns used to implement the unsigned unpacking patterns. (vec_unpacks_hi_v16qi, vec_unpacks_hi_v8hi, vec_unpacks_lo_v16qi): (vec_unpacks_lo_v8hi): New signed unpacking patterns. (vec_unpacku_hi_v16qi, vec_unpacku_hi_v8hi, vec_unpacku_lo_v16qi): (vec_unpacku_lo_v8hi): New unsigned unpacking patterns. (vec_widen_umult_hi_v16qi, vec_widen_umult_lo_v16qi): (vec_widen_smult_hi_v16qi, vec_widen_smult_lo_v16qi): (vec_widen_umult_hi_v8hi, vec_widen_umult_lo_v8hi): (vec_widen_smult_hi_v8hi, vec_widen_smult_lo_v8hi): New widening multiplication patterns. * target.h (builtin_mul_widen_even, builtin_mul_widen_odd): New. * target-def.h (TARGET_VECTORIZE_BUILTIN_MUL_WIDEN_EVEN): (TARGET_VECTORIZE_BUILTIN_MUL_WIDEN_ODD): New. * config/rs6000/rs6000.c (rs6000_builtin_mul_widen_even): New. (rs6000_builtin_mul_widen_odd): New. (TARGET_VECTORIZE_BUILTIN_MUL_WIDEN_EVEN): Defined. (TARGET_VECTORIZE_BUILTIN_MUL_WIDEN_ODD): Defined. * tree-vectorizer.h (enum vect_relevant): New enum type. (_stmt_vec_info): Field relevant chaned from bool to enum vect_relevant. (STMT_VINFO_RELEVANT_P): Updated. (STMT_VINFO_RELEVANT): New. * tree-vectorizer.c (new_stmt_vec_info): Use STMT_VINFO_RELEVANT instead of STMT_VINFO_RELEVANT_P. * tree-vect-analyze.c (vect_mark_relevant, vect_stmt_relevant_p): Replace calls to STMT_VINFO_RELEVANT_P with STMT_VINFO_RELEVANT, and boolean variable with enum vect_relevant. (vect_mark_stmts_to_be_vectorized): Likewise + update documentation. * doc/tm.texi (TARGET_VECTORIZE_BUILTIN_MUL_WIDEN_EVEN): New. (TARGET_VECTORIZE_BUILTIN_MUL_WIDEN_ODD): New. 2006-11-08 Richard Henderson <rth@redhat.com> * config/i386/sse.md (vec_widen_umult_hi_v8hi, vec_widen_umult_lo_v8hi): New. (vec_widen_smult_hi_v4si, vec_widen_smult_lo_v4si, vec_widen_umult_hi_v4si, vec_widen_umult_lo_v4si): New. * config/i386/i386.c (ix86_expand_sse_unpack): New. * config/i386/i386-protos.h (ix86_expand_sse_unpack): New. * config/i386/sse.md (vec_unpacku_hi_v16qi, vec_unpacks_hi_v16qi, vec_unpacku_lo_v16qi, vec_unpacks_lo_v16qi, vec_unpacku_hi_v8hi, vec_unpacks_hi_v8hi, vec_unpacku_lo_v8hi, vec_unpacks_lo_v8hi, vec_unpacku_hi_v4si, vec_unpacks_hi_v4si, vec_unpacku_lo_v4si, vec_unpacks_lo_v4si): New. 2006-11-08 Dorit Nuzman <dorit@il.ibm.com> * tree-vect-transform.c (vectorizable_type_demotion): New function. (vect_transform_stmt): Add case for type_demotion_vec_info_type. (vect_analyze_operations): Call vectorizable_type_demotion. * tree-vectorizer.h (type_demotion_vec_info_type): New enum stmt_vec_info_type value. (vectorizable_type_demotion): New function declaration. * tree-vect-generic.c (expand_vector_operations_1): Consider correct mode. * tree.def (VEC_PACK_MOD_EXPR, VEC_PACK_SAT_EXPR): New tree-codes. * expr.c (expand_expr_real_1): Add case for VEC_PACK_MOD_EXPR and VEC_PACK_SAT_EXPR. * tree-iniline.c (estimate_num_insns_1): Likewise. * tree-pretty-print.c (dump_generic_node, op_prio): Likewise. * optabs.c (optab_for_tree_code): Likewise. * optabs.c (expand_binop): In case of vec_pack_*_optabs the mode compared against the predicate of the result is not 'mode' (the input to the function) but a mode with half the size of 'mode'. (init_optab): Initialize new optabs. * optabs.h (OTI_vec_pack_mod, OTI_vec_pack_ssat, OTI_vec_pack_usat): New optab indices. (vec_pack_mod_optab, vec_pack_ssat_optab, vec_pack_usat_optab): New optabs. * genopinit.c (vec_pack_mod_optab, vec_pack_ssat_optab): (vec_pack_usat_optab): Initialize new optabs. * doc/md.texi (vec_pack_mod, vec_pack_ssat, vec_pack_usat): New. * config/rs6000/altivec.md (vec_pack_mod_v8hi, vec_pack_mod_v4si): New. 2006-11-08 Richard Henderson <rth@redehat.com> * config/i386/sse.md (vec_pack_mod_v8hi, vec_pack_mod_v4si): (vec_pack_mod_v2di, vec_interleave_highv16qi, vec_interleave_lowv16qi): (vec_interleave_highv8hi, vec_interleave_lowv8hi): (vec_interleave_highv4si, vec_interleave_lowv4si): (vec_interleave_highv2di, vec_interleave_lowv2di): New. 2006-11-08 Dorit Nuzman <dorit@il.ibm.com> * tree-vect-transform.c (vectorizable_reduction): Support multiple datatypes. (vect_transform_stmt): Removed redundant code. 2006-11-08 Dorit Nuzman <dorit@il.ibm.com> * tree-vect-transform.c (vectorizable_operation): Support multiple datatypes. 2006-11-08 Dorit Nuzman <dorit@il.ibm.com> * tree-vect-transform.c (vect_align_data_ref): Removed. (vect_create_data_ref_ptr): Added additional argument - ptr_incr. Updated function documentation. Return the increment stmt in ptr_incr. (bump_vector_ptr): New function. (vect_get_vec_def_for_stmt_copy): New function. (vect_finish_stmt_generation): Create a stmt_info to newly created vector stmts. (vect_setup_realignment): Call vect_create_data_ref_ptr with additional argument. (vectorizable_reduction, vectorizable_assignment): Not supported yet if VF is greater than the number of elements that can fit in one vector word. (vectorizable_operation, vectorizable_condition): Likewise. (vectorizable_store, vectorizable_load): Support the case that the VF is greater than the number of elements that can fit in one vector word. (vect_transform_loop): Don't fail in case of multiple data-types. * tree-vect-analyze.c (vect_determine_vectorization_factor): Don't fail in case of multiple data-types; the smallest type determines the VF. (vect_analyze_data_ref_dependence): Don't record datarefs as same_align if they are of different sizes. (vect_update_misalignment_for_peel): Compare misalignments in terms of number of elements rather than number of bytes. (vect_enhance_data_refs_alignment): Fix/Add dump printouts. (vect_can_advance_ivs_p): Fix a dump printout From-SVN: r118577
2006-11-08 08:32:44 +01:00
proc check_effective_target_vect_widen_mult_qi_to_hi { } {
global et_vect_widen_mult_qi_to_hi
if [info exists et_vect_widen_mult_qi_to_hi_saved] {
verbose "check_effective_target_vect_widen_mult_qi_to_hi: using cached result" 2
Makefile.in (tree-vect-patterns.o): Add rule for new file. * Makefile.in (tree-vect-patterns.o): Add rule for new file. * tree-vect-analyze.c (vect_determine_vectorization_factor): Use existing STMT_VINFO_VECTYPE if available. (vect_mark_relevant): Add special handling for stmts that are marked as STMT_VINFO_IN_PATTERN_P. (vect_analyze_loop): Call vect_pattern_recog. * tree-vectorizer.c (new_stmt_vec_info): Initialize new fields. * tree-vectorizer.h (in_pattern_p, related_stmt): New fields in stmt_info. (STMT_VINFO_IN_PATTERN_P, STMT_VINFO_RELATED_STMT): New macros. (vect_recog_func_ptr): New function-pointer type. * tree-vect-patterns.c: New file. (vect_recog_widen_sum_pattern, vect_recog_widen_mult_pattern): (vect_recog_dot_prod_pattern, vect_pattern_recog): (vect_pattern_recog_1): New functions. (vect_pattern_recog_funcs): New array of function pointers. * tree-vectorizer.h (ternary_op): New enum value. * tree-vect-transform.c (vect_create_epilog_for_reduction): Added declaration. Revised documentation. Removed redundant dump prints. Removed redundant argument. Added support for reduction patterns. (vectorizable_reduction): Added support for reduction patterns. (vect_transform_stmt): Added support for patterns. * expr.c (expand_expr_real_1): Added case for DOT_PROD_EXPR. * genopinit.c (udot_prod_optab, sdot_prod_optab): Initialize. * optabs.c (optab_for_tree_code): Added case for DOT_PROD_EXPR. (expand_widen_pattern_expr): New function. (init_optabs): Initialize new optabs udot_prod_optab, sdot_prod_optab. * optabs.h (OTI_sdot_prod, OTI_udot_prod): New. (sdot_prod_optab, udot_prod_optab): Define new optabs. (expand_widen_pattern_expr): New function declaration. * tree.def (DOT_PROD_EXPR, WIDEN_SUM_EXPR, WIDEN_MULT_EXPR): New tree-codes. * tree-inline.c (estimate_num_insns_1): Added cases for new tree-codes DOT_PROD_EXPR, WIDEN_SUM_EXPR, WIDEN_MULT_EXPR. * tree-pretty-print.c (dump_generic_node): Likewise. (op_prio): Likewise. (op_symbol): Added cases for WIDEN_SUM_EXPR, WIDEN_MULT_EXPR. * tree-ssa-operands.c (get_expr_operands): Added case for DOT_PROD_EXPR. * tree-vect-patterns.c (widened_name_p): New function. (vect_recog_dot_prod_pattern): Added function implementation. * tree-vect-transform.c (get_initial_def_for_reduction): Added cases for DOT_PROD_EXPR, WIDEN_SUM_EXPR. * config/rs6000/altivec.md (udot_prod<mode>, sdot_prodv8hi): New. * config/i386/sse.md (sdot_prodv8hi, udot_prodv4si): New. * expr.c (expand_expr_real_1): Added case for WIDEN_SUM_EXPR. * genopinit.c (widen_ssum_optab, widen_usum_optab): Initialize. * optabs.c (optab_for_tree_code): Added case for WIDEN_SUM_EXPR. (init_optabs): Initialize new optabs widen_ssum_optab, widen_usum_optab. * optabs.h (OTI_widen_ssum, OTI_widen_usum): New. (widen_ssum_optab, widen_usum_optab): Define new optabs. * tree-vect-generic.c: (expand_vector_operations_1): Check type of use instead of type of def. * tree-vect-patterns.c (vect_recog_widen_sum_pattern): Added function implementation. * config/rs6000/altivec.md (widen_usum<mode>, widen_ssumv16qi, widen_ssumv8hi): New. * doc/tm.texi (ssum_widen, usum_widen, sdot_prod, udot_prod): New patterns. From-SVN: r109954
2006-01-19 11:24:00 +01:00
} else {
[multiple changes] 2006-11-08 Dorit Nuzman <dorit@il.ibm.com> * tree-vect-analyze.c (vect_mark_relevant, vect_stmt_relevant_p): Take enum argument instead of bool. (vect_analyze_operations): Call vectorizable_type_promotion. * tree-vectorizer.h (type_promotion_vec_info_type): New enum stmt_vec_info_type value. (supportable_widening_operation, vectorizable_type_promotion): New function declarations. * tree-vect-transform.c (vect_gen_widened_results_half): New function. (vectorizable_type_promotion): New function. (vect_transform_stmt): Call vectorizable_type_promotion. * tree-vect-analyze.c (supportable_widening_operation): New function. * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Add implementation. * tree-vect-generic.c (expand_vector_operations_1): Consider correct mode. * tree.def (VEC_WIDEN_MULT_HI_EXPR, VEC_WIDEN_MULT_LO_EXPR): (VEC_UNPACK_HI_EXPR, VEC_UNPACK_LO_EXPR): New tree-codes. * tree-inline.c (estimate_num_insns_1): Add cases for above new tree-codes. * tree-pretty-print.c (dump_generic_node, op_prio): Likewise. * expr.c (expand_expr_real_1): Likewise. * optabs.c (optab_for_tree_code): Likewise. (init_optabs): Initialize new optabs. * genopinit.c (vec_widen_umult_hi_optab, vec_widen_smult_hi_optab, vec_widen_smult_hi_optab, vec_widen_smult_lo_optab, vec_unpacks_hi_optab, vec_unpacks_lo_optab, vec_unpacku_hi_optab, vec_unpacku_lo_optab): Initialize new optabs. * optabs.h (OTI_vec_widen_umult_hi, OTI_vec_widen_umult_lo): (OTI_vec_widen_smult_h, OTI_vec_widen_smult_lo, OTI_vec_unpacks_hi, OTI_vec_unpacks_lo, OTI_vec_unpacku_hi, OTI_vec_unpacku_lo): New optab indices. (vec_widen_umult_hi_optab, vec_widen_umult_lo_optab): (vec_widen_smult_hi_optab, vec_widen_smult_lo_optab): (vec_unpacks_hi_optab, vec_unpacku_hi_optab, vec_unpacks_lo_optab): (vec_unpacku_lo_optab): New optabs. * doc/md.texi (vec_unpacks_hi, vec_unpacks_lo, vec_unpacku_hi): (vec_unpacku_lo, vec_widen_umult_hi, vec_widen_umult_lo): (vec_widen_smult_hi, vec_widen_smult_lo): New. * doc/c-tree.texi (VEC_LSHIFT_EXPR, VEC_RSHIFT_EXPR): (VEC_WIDEN_MULT_HI_EXPR, VEC_WIDEN_MULT_LO_EXPR, VEC_UNPACK_HI_EXPR): (VEC_UNPACK_LO_EXPR, VEC_PACK_MOD_EXPR, VEC_PACK_SAT_EXPR): New. * config/rs6000/altivec.md (UNSPEC_VMULWHUB, UNSPEC_VMULWLUB): (UNSPEC_VMULWHSB, UNSPEC_VMULWLSB, UNSPEC_VMULWHUH, UNSPEC_VMULWLUH): (UNSPEC_VMULWHSH, UNSPEC_VMULWLSH): New. (UNSPEC_VPERMSI, UNSPEC_VPERMHI): New. (vec_vperm_v8hiv4si, vec_vperm_v16qiv8hi): New patterns used to implement the unsigned unpacking patterns. (vec_unpacks_hi_v16qi, vec_unpacks_hi_v8hi, vec_unpacks_lo_v16qi): (vec_unpacks_lo_v8hi): New signed unpacking patterns. (vec_unpacku_hi_v16qi, vec_unpacku_hi_v8hi, vec_unpacku_lo_v16qi): (vec_unpacku_lo_v8hi): New unsigned unpacking patterns. (vec_widen_umult_hi_v16qi, vec_widen_umult_lo_v16qi): (vec_widen_smult_hi_v16qi, vec_widen_smult_lo_v16qi): (vec_widen_umult_hi_v8hi, vec_widen_umult_lo_v8hi): (vec_widen_smult_hi_v8hi, vec_widen_smult_lo_v8hi): New widening multiplication patterns. * target.h (builtin_mul_widen_even, builtin_mul_widen_odd): New. * target-def.h (TARGET_VECTORIZE_BUILTIN_MUL_WIDEN_EVEN): (TARGET_VECTORIZE_BUILTIN_MUL_WIDEN_ODD): New. * config/rs6000/rs6000.c (rs6000_builtin_mul_widen_even): New. (rs6000_builtin_mul_widen_odd): New. (TARGET_VECTORIZE_BUILTIN_MUL_WIDEN_EVEN): Defined. (TARGET_VECTORIZE_BUILTIN_MUL_WIDEN_ODD): Defined. * tree-vectorizer.h (enum vect_relevant): New enum type. (_stmt_vec_info): Field relevant chaned from bool to enum vect_relevant. (STMT_VINFO_RELEVANT_P): Updated. (STMT_VINFO_RELEVANT): New. * tree-vectorizer.c (new_stmt_vec_info): Use STMT_VINFO_RELEVANT instead of STMT_VINFO_RELEVANT_P. * tree-vect-analyze.c (vect_mark_relevant, vect_stmt_relevant_p): Replace calls to STMT_VINFO_RELEVANT_P with STMT_VINFO_RELEVANT, and boolean variable with enum vect_relevant. (vect_mark_stmts_to_be_vectorized): Likewise + update documentation. * doc/tm.texi (TARGET_VECTORIZE_BUILTIN_MUL_WIDEN_EVEN): New. (TARGET_VECTORIZE_BUILTIN_MUL_WIDEN_ODD): New. 2006-11-08 Richard Henderson <rth@redhat.com> * config/i386/sse.md (vec_widen_umult_hi_v8hi, vec_widen_umult_lo_v8hi): New. (vec_widen_smult_hi_v4si, vec_widen_smult_lo_v4si, vec_widen_umult_hi_v4si, vec_widen_umult_lo_v4si): New. * config/i386/i386.c (ix86_expand_sse_unpack): New. * config/i386/i386-protos.h (ix86_expand_sse_unpack): New. * config/i386/sse.md (vec_unpacku_hi_v16qi, vec_unpacks_hi_v16qi, vec_unpacku_lo_v16qi, vec_unpacks_lo_v16qi, vec_unpacku_hi_v8hi, vec_unpacks_hi_v8hi, vec_unpacku_lo_v8hi, vec_unpacks_lo_v8hi, vec_unpacku_hi_v4si, vec_unpacks_hi_v4si, vec_unpacku_lo_v4si, vec_unpacks_lo_v4si): New. 2006-11-08 Dorit Nuzman <dorit@il.ibm.com> * tree-vect-transform.c (vectorizable_type_demotion): New function. (vect_transform_stmt): Add case for type_demotion_vec_info_type. (vect_analyze_operations): Call vectorizable_type_demotion. * tree-vectorizer.h (type_demotion_vec_info_type): New enum stmt_vec_info_type value. (vectorizable_type_demotion): New function declaration. * tree-vect-generic.c (expand_vector_operations_1): Consider correct mode. * tree.def (VEC_PACK_MOD_EXPR, VEC_PACK_SAT_EXPR): New tree-codes. * expr.c (expand_expr_real_1): Add case for VEC_PACK_MOD_EXPR and VEC_PACK_SAT_EXPR. * tree-iniline.c (estimate_num_insns_1): Likewise. * tree-pretty-print.c (dump_generic_node, op_prio): Likewise. * optabs.c (optab_for_tree_code): Likewise. * optabs.c (expand_binop): In case of vec_pack_*_optabs the mode compared against the predicate of the result is not 'mode' (the input to the function) but a mode with half the size of 'mode'. (init_optab): Initialize new optabs. * optabs.h (OTI_vec_pack_mod, OTI_vec_pack_ssat, OTI_vec_pack_usat): New optab indices. (vec_pack_mod_optab, vec_pack_ssat_optab, vec_pack_usat_optab): New optabs. * genopinit.c (vec_pack_mod_optab, vec_pack_ssat_optab): (vec_pack_usat_optab): Initialize new optabs. * doc/md.texi (vec_pack_mod, vec_pack_ssat, vec_pack_usat): New. * config/rs6000/altivec.md (vec_pack_mod_v8hi, vec_pack_mod_v4si): New. 2006-11-08 Richard Henderson <rth@redehat.com> * config/i386/sse.md (vec_pack_mod_v8hi, vec_pack_mod_v4si): (vec_pack_mod_v2di, vec_interleave_highv16qi, vec_interleave_lowv16qi): (vec_interleave_highv8hi, vec_interleave_lowv8hi): (vec_interleave_highv4si, vec_interleave_lowv4si): (vec_interleave_highv2di, vec_interleave_lowv2di): New. 2006-11-08 Dorit Nuzman <dorit@il.ibm.com> * tree-vect-transform.c (vectorizable_reduction): Support multiple datatypes. (vect_transform_stmt): Removed redundant code. 2006-11-08 Dorit Nuzman <dorit@il.ibm.com> * tree-vect-transform.c (vectorizable_operation): Support multiple datatypes. 2006-11-08 Dorit Nuzman <dorit@il.ibm.com> * tree-vect-transform.c (vect_align_data_ref): Removed. (vect_create_data_ref_ptr): Added additional argument - ptr_incr. Updated function documentation. Return the increment stmt in ptr_incr. (bump_vector_ptr): New function. (vect_get_vec_def_for_stmt_copy): New function. (vect_finish_stmt_generation): Create a stmt_info to newly created vector stmts. (vect_setup_realignment): Call vect_create_data_ref_ptr with additional argument. (vectorizable_reduction, vectorizable_assignment): Not supported yet if VF is greater than the number of elements that can fit in one vector word. (vectorizable_operation, vectorizable_condition): Likewise. (vectorizable_store, vectorizable_load): Support the case that the VF is greater than the number of elements that can fit in one vector word. (vect_transform_loop): Don't fail in case of multiple data-types. * tree-vect-analyze.c (vect_determine_vectorization_factor): Don't fail in case of multiple data-types; the smallest type determines the VF. (vect_analyze_data_ref_dependence): Don't record datarefs as same_align if they are of different sizes. (vect_update_misalignment_for_peel): Compare misalignments in terms of number of elements rather than number of bytes. (vect_enhance_data_refs_alignment): Fix/Add dump printouts. (vect_can_advance_ivs_p): Fix a dump printout From-SVN: r118577
2006-11-08 08:32:44 +01:00
if { [check_effective_target_vect_unpack]
&& [check_effective_target_vect_short_mult] } {
set et_vect_widen_mult_qi_to_hi_saved 1
} else {
set et_vect_widen_mult_qi_to_hi_saved 0
}
if { [istarget powerpc*-*-*] } {
set et_vect_widen_mult_qi_to_hi_saved 1
Makefile.in (tree-vect-patterns.o): Add rule for new file. * Makefile.in (tree-vect-patterns.o): Add rule for new file. * tree-vect-analyze.c (vect_determine_vectorization_factor): Use existing STMT_VINFO_VECTYPE if available. (vect_mark_relevant): Add special handling for stmts that are marked as STMT_VINFO_IN_PATTERN_P. (vect_analyze_loop): Call vect_pattern_recog. * tree-vectorizer.c (new_stmt_vec_info): Initialize new fields. * tree-vectorizer.h (in_pattern_p, related_stmt): New fields in stmt_info. (STMT_VINFO_IN_PATTERN_P, STMT_VINFO_RELATED_STMT): New macros. (vect_recog_func_ptr): New function-pointer type. * tree-vect-patterns.c: New file. (vect_recog_widen_sum_pattern, vect_recog_widen_mult_pattern): (vect_recog_dot_prod_pattern, vect_pattern_recog): (vect_pattern_recog_1): New functions. (vect_pattern_recog_funcs): New array of function pointers. * tree-vectorizer.h (ternary_op): New enum value. * tree-vect-transform.c (vect_create_epilog_for_reduction): Added declaration. Revised documentation. Removed redundant dump prints. Removed redundant argument. Added support for reduction patterns. (vectorizable_reduction): Added support for reduction patterns. (vect_transform_stmt): Added support for patterns. * expr.c (expand_expr_real_1): Added case for DOT_PROD_EXPR. * genopinit.c (udot_prod_optab, sdot_prod_optab): Initialize. * optabs.c (optab_for_tree_code): Added case for DOT_PROD_EXPR. (expand_widen_pattern_expr): New function. (init_optabs): Initialize new optabs udot_prod_optab, sdot_prod_optab. * optabs.h (OTI_sdot_prod, OTI_udot_prod): New. (sdot_prod_optab, udot_prod_optab): Define new optabs. (expand_widen_pattern_expr): New function declaration. * tree.def (DOT_PROD_EXPR, WIDEN_SUM_EXPR, WIDEN_MULT_EXPR): New tree-codes. * tree-inline.c (estimate_num_insns_1): Added cases for new tree-codes DOT_PROD_EXPR, WIDEN_SUM_EXPR, WIDEN_MULT_EXPR. * tree-pretty-print.c (dump_generic_node): Likewise. (op_prio): Likewise. (op_symbol): Added cases for WIDEN_SUM_EXPR, WIDEN_MULT_EXPR. * tree-ssa-operands.c (get_expr_operands): Added case for DOT_PROD_EXPR. * tree-vect-patterns.c (widened_name_p): New function. (vect_recog_dot_prod_pattern): Added function implementation. * tree-vect-transform.c (get_initial_def_for_reduction): Added cases for DOT_PROD_EXPR, WIDEN_SUM_EXPR. * config/rs6000/altivec.md (udot_prod<mode>, sdot_prodv8hi): New. * config/i386/sse.md (sdot_prodv8hi, udot_prodv4si): New. * expr.c (expand_expr_real_1): Added case for WIDEN_SUM_EXPR. * genopinit.c (widen_ssum_optab, widen_usum_optab): Initialize. * optabs.c (optab_for_tree_code): Added case for WIDEN_SUM_EXPR. (init_optabs): Initialize new optabs widen_ssum_optab, widen_usum_optab. * optabs.h (OTI_widen_ssum, OTI_widen_usum): New. (widen_ssum_optab, widen_usum_optab): Define new optabs. * tree-vect-generic.c: (expand_vector_operations_1): Check type of use instead of type of def. * tree-vect-patterns.c (vect_recog_widen_sum_pattern): Added function implementation. * config/rs6000/altivec.md (widen_usum<mode>, widen_ssumv16qi, widen_ssumv8hi): New. * doc/tm.texi (ssum_widen, usum_widen, sdot_prod, udot_prod): New patterns. From-SVN: r109954
2006-01-19 11:24:00 +01:00
}
}
[multiple changes] 2006-11-08 Dorit Nuzman <dorit@il.ibm.com> * tree-vect-analyze.c (vect_mark_relevant, vect_stmt_relevant_p): Take enum argument instead of bool. (vect_analyze_operations): Call vectorizable_type_promotion. * tree-vectorizer.h (type_promotion_vec_info_type): New enum stmt_vec_info_type value. (supportable_widening_operation, vectorizable_type_promotion): New function declarations. * tree-vect-transform.c (vect_gen_widened_results_half): New function. (vectorizable_type_promotion): New function. (vect_transform_stmt): Call vectorizable_type_promotion. * tree-vect-analyze.c (supportable_widening_operation): New function. * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Add implementation. * tree-vect-generic.c (expand_vector_operations_1): Consider correct mode. * tree.def (VEC_WIDEN_MULT_HI_EXPR, VEC_WIDEN_MULT_LO_EXPR): (VEC_UNPACK_HI_EXPR, VEC_UNPACK_LO_EXPR): New tree-codes. * tree-inline.c (estimate_num_insns_1): Add cases for above new tree-codes. * tree-pretty-print.c (dump_generic_node, op_prio): Likewise. * expr.c (expand_expr_real_1): Likewise. * optabs.c (optab_for_tree_code): Likewise. (init_optabs): Initialize new optabs. * genopinit.c (vec_widen_umult_hi_optab, vec_widen_smult_hi_optab, vec_widen_smult_hi_optab, vec_widen_smult_lo_optab, vec_unpacks_hi_optab, vec_unpacks_lo_optab, vec_unpacku_hi_optab, vec_unpacku_lo_optab): Initialize new optabs. * optabs.h (OTI_vec_widen_umult_hi, OTI_vec_widen_umult_lo): (OTI_vec_widen_smult_h, OTI_vec_widen_smult_lo, OTI_vec_unpacks_hi, OTI_vec_unpacks_lo, OTI_vec_unpacku_hi, OTI_vec_unpacku_lo): New optab indices. (vec_widen_umult_hi_optab, vec_widen_umult_lo_optab): (vec_widen_smult_hi_optab, vec_widen_smult_lo_optab): (vec_unpacks_hi_optab, vec_unpacku_hi_optab, vec_unpacks_lo_optab): (vec_unpacku_lo_optab): New optabs. * doc/md.texi (vec_unpacks_hi, vec_unpacks_lo, vec_unpacku_hi): (vec_unpacku_lo, vec_widen_umult_hi, vec_widen_umult_lo): (vec_widen_smult_hi, vec_widen_smult_lo): New. * doc/c-tree.texi (VEC_LSHIFT_EXPR, VEC_RSHIFT_EXPR): (VEC_WIDEN_MULT_HI_EXPR, VEC_WIDEN_MULT_LO_EXPR, VEC_UNPACK_HI_EXPR): (VEC_UNPACK_LO_EXPR, VEC_PACK_MOD_EXPR, VEC_PACK_SAT_EXPR): New. * config/rs6000/altivec.md (UNSPEC_VMULWHUB, UNSPEC_VMULWLUB): (UNSPEC_VMULWHSB, UNSPEC_VMULWLSB, UNSPEC_VMULWHUH, UNSPEC_VMULWLUH): (UNSPEC_VMULWHSH, UNSPEC_VMULWLSH): New. (UNSPEC_VPERMSI, UNSPEC_VPERMHI): New. (vec_vperm_v8hiv4si, vec_vperm_v16qiv8hi): New patterns used to implement the unsigned unpacking patterns. (vec_unpacks_hi_v16qi, vec_unpacks_hi_v8hi, vec_unpacks_lo_v16qi): (vec_unpacks_lo_v8hi): New signed unpacking patterns. (vec_unpacku_hi_v16qi, vec_unpacku_hi_v8hi, vec_unpacku_lo_v16qi): (vec_unpacku_lo_v8hi): New unsigned unpacking patterns. (vec_widen_umult_hi_v16qi, vec_widen_umult_lo_v16qi): (vec_widen_smult_hi_v16qi, vec_widen_smult_lo_v16qi): (vec_widen_umult_hi_v8hi, vec_widen_umult_lo_v8hi): (vec_widen_smult_hi_v8hi, vec_widen_smult_lo_v8hi): New widening multiplication patterns. * target.h (builtin_mul_widen_even, builtin_mul_widen_odd): New. * target-def.h (TARGET_VECTORIZE_BUILTIN_MUL_WIDEN_EVEN): (TARGET_VECTORIZE_BUILTIN_MUL_WIDEN_ODD): New. * config/rs6000/rs6000.c (rs6000_builtin_mul_widen_even): New. (rs6000_builtin_mul_widen_odd): New. (TARGET_VECTORIZE_BUILTIN_MUL_WIDEN_EVEN): Defined. (TARGET_VECTORIZE_BUILTIN_MUL_WIDEN_ODD): Defined. * tree-vectorizer.h (enum vect_relevant): New enum type. (_stmt_vec_info): Field relevant chaned from bool to enum vect_relevant. (STMT_VINFO_RELEVANT_P): Updated. (STMT_VINFO_RELEVANT): New. * tree-vectorizer.c (new_stmt_vec_info): Use STMT_VINFO_RELEVANT instead of STMT_VINFO_RELEVANT_P. * tree-vect-analyze.c (vect_mark_relevant, vect_stmt_relevant_p): Replace calls to STMT_VINFO_RELEVANT_P with STMT_VINFO_RELEVANT, and boolean variable with enum vect_relevant. (vect_mark_stmts_to_be_vectorized): Likewise + update documentation. * doc/tm.texi (TARGET_VECTORIZE_BUILTIN_MUL_WIDEN_EVEN): New. (TARGET_VECTORIZE_BUILTIN_MUL_WIDEN_ODD): New. 2006-11-08 Richard Henderson <rth@redhat.com> * config/i386/sse.md (vec_widen_umult_hi_v8hi, vec_widen_umult_lo_v8hi): New. (vec_widen_smult_hi_v4si, vec_widen_smult_lo_v4si, vec_widen_umult_hi_v4si, vec_widen_umult_lo_v4si): New. * config/i386/i386.c (ix86_expand_sse_unpack): New. * config/i386/i386-protos.h (ix86_expand_sse_unpack): New. * config/i386/sse.md (vec_unpacku_hi_v16qi, vec_unpacks_hi_v16qi, vec_unpacku_lo_v16qi, vec_unpacks_lo_v16qi, vec_unpacku_hi_v8hi, vec_unpacks_hi_v8hi, vec_unpacku_lo_v8hi, vec_unpacks_lo_v8hi, vec_unpacku_hi_v4si, vec_unpacks_hi_v4si, vec_unpacku_lo_v4si, vec_unpacks_lo_v4si): New. 2006-11-08 Dorit Nuzman <dorit@il.ibm.com> * tree-vect-transform.c (vectorizable_type_demotion): New function. (vect_transform_stmt): Add case for type_demotion_vec_info_type. (vect_analyze_operations): Call vectorizable_type_demotion. * tree-vectorizer.h (type_demotion_vec_info_type): New enum stmt_vec_info_type value. (vectorizable_type_demotion): New function declaration. * tree-vect-generic.c (expand_vector_operations_1): Consider correct mode. * tree.def (VEC_PACK_MOD_EXPR, VEC_PACK_SAT_EXPR): New tree-codes. * expr.c (expand_expr_real_1): Add case for VEC_PACK_MOD_EXPR and VEC_PACK_SAT_EXPR. * tree-iniline.c (estimate_num_insns_1): Likewise. * tree-pretty-print.c (dump_generic_node, op_prio): Likewise. * optabs.c (optab_for_tree_code): Likewise. * optabs.c (expand_binop): In case of vec_pack_*_optabs the mode compared against the predicate of the result is not 'mode' (the input to the function) but a mode with half the size of 'mode'. (init_optab): Initialize new optabs. * optabs.h (OTI_vec_pack_mod, OTI_vec_pack_ssat, OTI_vec_pack_usat): New optab indices. (vec_pack_mod_optab, vec_pack_ssat_optab, vec_pack_usat_optab): New optabs. * genopinit.c (vec_pack_mod_optab, vec_pack_ssat_optab): (vec_pack_usat_optab): Initialize new optabs. * doc/md.texi (vec_pack_mod, vec_pack_ssat, vec_pack_usat): New. * config/rs6000/altivec.md (vec_pack_mod_v8hi, vec_pack_mod_v4si): New. 2006-11-08 Richard Henderson <rth@redehat.com> * config/i386/sse.md (vec_pack_mod_v8hi, vec_pack_mod_v4si): (vec_pack_mod_v2di, vec_interleave_highv16qi, vec_interleave_lowv16qi): (vec_interleave_highv8hi, vec_interleave_lowv8hi): (vec_interleave_highv4si, vec_interleave_lowv4si): (vec_interleave_highv2di, vec_interleave_lowv2di): New. 2006-11-08 Dorit Nuzman <dorit@il.ibm.com> * tree-vect-transform.c (vectorizable_reduction): Support multiple datatypes. (vect_transform_stmt): Removed redundant code. 2006-11-08 Dorit Nuzman <dorit@il.ibm.com> * tree-vect-transform.c (vectorizable_operation): Support multiple datatypes. 2006-11-08 Dorit Nuzman <dorit@il.ibm.com> * tree-vect-transform.c (vect_align_data_ref): Removed. (vect_create_data_ref_ptr): Added additional argument - ptr_incr. Updated function documentation. Return the increment stmt in ptr_incr. (bump_vector_ptr): New function. (vect_get_vec_def_for_stmt_copy): New function. (vect_finish_stmt_generation): Create a stmt_info to newly created vector stmts. (vect_setup_realignment): Call vect_create_data_ref_ptr with additional argument. (vectorizable_reduction, vectorizable_assignment): Not supported yet if VF is greater than the number of elements that can fit in one vector word. (vectorizable_operation, vectorizable_condition): Likewise. (vectorizable_store, vectorizable_load): Support the case that the VF is greater than the number of elements that can fit in one vector word. (vect_transform_loop): Don't fail in case of multiple data-types. * tree-vect-analyze.c (vect_determine_vectorization_factor): Don't fail in case of multiple data-types; the smallest type determines the VF. (vect_analyze_data_ref_dependence): Don't record datarefs as same_align if they are of different sizes. (vect_update_misalignment_for_peel): Compare misalignments in terms of number of elements rather than number of bytes. (vect_enhance_data_refs_alignment): Fix/Add dump printouts. (vect_can_advance_ivs_p): Fix a dump printout From-SVN: r118577
2006-11-08 08:32:44 +01:00
verbose "check_effective_target_vect_widen_mult_qi_to_hi: returning $et_vect_widen_mult_qi_to_hi_saved" 2
return $et_vect_widen_mult_qi_to_hi_saved
}
# Return 1 if the target plus current options supports a vector
# widening multiplication of *short* args into *int* result, 0 otherwise.
# A target can also support this widening multplication if it can support
# promotion (unpacking) from shorts to ints, and vect_int_mult (non-widening
# multiplication of ints).
#
# This won't change for different subtargets so cache the result.
proc check_effective_target_vect_widen_mult_hi_to_si { } {
global et_vect_widen_mult_hi_to_si
if [info exists et_vect_widen_mult_hi_to_si_saved] {
verbose "check_effective_target_vect_widen_mult_hi_to_si: using cached result" 2
} else {
if { [check_effective_target_vect_unpack]
&& [check_effective_target_vect_int_mult] } {
set et_vect_widen_mult_hi_to_si_saved 1
} else {
set et_vect_widen_mult_hi_to_si_saved 0
}
if { [istarget powerpc*-*-*]
|| [istarget spu-*-*]
|| [istarget i?86-*-*]
|| [istarget x86_64-*-*] } {
[multiple changes] 2006-11-08 Dorit Nuzman <dorit@il.ibm.com> * tree-vect-analyze.c (vect_mark_relevant, vect_stmt_relevant_p): Take enum argument instead of bool. (vect_analyze_operations): Call vectorizable_type_promotion. * tree-vectorizer.h (type_promotion_vec_info_type): New enum stmt_vec_info_type value. (supportable_widening_operation, vectorizable_type_promotion): New function declarations. * tree-vect-transform.c (vect_gen_widened_results_half): New function. (vectorizable_type_promotion): New function. (vect_transform_stmt): Call vectorizable_type_promotion. * tree-vect-analyze.c (supportable_widening_operation): New function. * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Add implementation. * tree-vect-generic.c (expand_vector_operations_1): Consider correct mode. * tree.def (VEC_WIDEN_MULT_HI_EXPR, VEC_WIDEN_MULT_LO_EXPR): (VEC_UNPACK_HI_EXPR, VEC_UNPACK_LO_EXPR): New tree-codes. * tree-inline.c (estimate_num_insns_1): Add cases for above new tree-codes. * tree-pretty-print.c (dump_generic_node, op_prio): Likewise. * expr.c (expand_expr_real_1): Likewise. * optabs.c (optab_for_tree_code): Likewise. (init_optabs): Initialize new optabs. * genopinit.c (vec_widen_umult_hi_optab, vec_widen_smult_hi_optab, vec_widen_smult_hi_optab, vec_widen_smult_lo_optab, vec_unpacks_hi_optab, vec_unpacks_lo_optab, vec_unpacku_hi_optab, vec_unpacku_lo_optab): Initialize new optabs. * optabs.h (OTI_vec_widen_umult_hi, OTI_vec_widen_umult_lo): (OTI_vec_widen_smult_h, OTI_vec_widen_smult_lo, OTI_vec_unpacks_hi, OTI_vec_unpacks_lo, OTI_vec_unpacku_hi, OTI_vec_unpacku_lo): New optab indices. (vec_widen_umult_hi_optab, vec_widen_umult_lo_optab): (vec_widen_smult_hi_optab, vec_widen_smult_lo_optab): (vec_unpacks_hi_optab, vec_unpacku_hi_optab, vec_unpacks_lo_optab): (vec_unpacku_lo_optab): New optabs. * doc/md.texi (vec_unpacks_hi, vec_unpacks_lo, vec_unpacku_hi): (vec_unpacku_lo, vec_widen_umult_hi, vec_widen_umult_lo): (vec_widen_smult_hi, vec_widen_smult_lo): New. * doc/c-tree.texi (VEC_LSHIFT_EXPR, VEC_RSHIFT_EXPR): (VEC_WIDEN_MULT_HI_EXPR, VEC_WIDEN_MULT_LO_EXPR, VEC_UNPACK_HI_EXPR): (VEC_UNPACK_LO_EXPR, VEC_PACK_MOD_EXPR, VEC_PACK_SAT_EXPR): New. * config/rs6000/altivec.md (UNSPEC_VMULWHUB, UNSPEC_VMULWLUB): (UNSPEC_VMULWHSB, UNSPEC_VMULWLSB, UNSPEC_VMULWHUH, UNSPEC_VMULWLUH): (UNSPEC_VMULWHSH, UNSPEC_VMULWLSH): New. (UNSPEC_VPERMSI, UNSPEC_VPERMHI): New. (vec_vperm_v8hiv4si, vec_vperm_v16qiv8hi): New patterns used to implement the unsigned unpacking patterns. (vec_unpacks_hi_v16qi, vec_unpacks_hi_v8hi, vec_unpacks_lo_v16qi): (vec_unpacks_lo_v8hi): New signed unpacking patterns. (vec_unpacku_hi_v16qi, vec_unpacku_hi_v8hi, vec_unpacku_lo_v16qi): (vec_unpacku_lo_v8hi): New unsigned unpacking patterns. (vec_widen_umult_hi_v16qi, vec_widen_umult_lo_v16qi): (vec_widen_smult_hi_v16qi, vec_widen_smult_lo_v16qi): (vec_widen_umult_hi_v8hi, vec_widen_umult_lo_v8hi): (vec_widen_smult_hi_v8hi, vec_widen_smult_lo_v8hi): New widening multiplication patterns. * target.h (builtin_mul_widen_even, builtin_mul_widen_odd): New. * target-def.h (TARGET_VECTORIZE_BUILTIN_MUL_WIDEN_EVEN): (TARGET_VECTORIZE_BUILTIN_MUL_WIDEN_ODD): New. * config/rs6000/rs6000.c (rs6000_builtin_mul_widen_even): New. (rs6000_builtin_mul_widen_odd): New. (TARGET_VECTORIZE_BUILTIN_MUL_WIDEN_EVEN): Defined. (TARGET_VECTORIZE_BUILTIN_MUL_WIDEN_ODD): Defined. * tree-vectorizer.h (enum vect_relevant): New enum type. (_stmt_vec_info): Field relevant chaned from bool to enum vect_relevant. (STMT_VINFO_RELEVANT_P): Updated. (STMT_VINFO_RELEVANT): New. * tree-vectorizer.c (new_stmt_vec_info): Use STMT_VINFO_RELEVANT instead of STMT_VINFO_RELEVANT_P. * tree-vect-analyze.c (vect_mark_relevant, vect_stmt_relevant_p): Replace calls to STMT_VINFO_RELEVANT_P with STMT_VINFO_RELEVANT, and boolean variable with enum vect_relevant. (vect_mark_stmts_to_be_vectorized): Likewise + update documentation. * doc/tm.texi (TARGET_VECTORIZE_BUILTIN_MUL_WIDEN_EVEN): New. (TARGET_VECTORIZE_BUILTIN_MUL_WIDEN_ODD): New. 2006-11-08 Richard Henderson <rth@redhat.com> * config/i386/sse.md (vec_widen_umult_hi_v8hi, vec_widen_umult_lo_v8hi): New. (vec_widen_smult_hi_v4si, vec_widen_smult_lo_v4si, vec_widen_umult_hi_v4si, vec_widen_umult_lo_v4si): New. * config/i386/i386.c (ix86_expand_sse_unpack): New. * config/i386/i386-protos.h (ix86_expand_sse_unpack): New. * config/i386/sse.md (vec_unpacku_hi_v16qi, vec_unpacks_hi_v16qi, vec_unpacku_lo_v16qi, vec_unpacks_lo_v16qi, vec_unpacku_hi_v8hi, vec_unpacks_hi_v8hi, vec_unpacku_lo_v8hi, vec_unpacks_lo_v8hi, vec_unpacku_hi_v4si, vec_unpacks_hi_v4si, vec_unpacku_lo_v4si, vec_unpacks_lo_v4si): New. 2006-11-08 Dorit Nuzman <dorit@il.ibm.com> * tree-vect-transform.c (vectorizable_type_demotion): New function. (vect_transform_stmt): Add case for type_demotion_vec_info_type. (vect_analyze_operations): Call vectorizable_type_demotion. * tree-vectorizer.h (type_demotion_vec_info_type): New enum stmt_vec_info_type value. (vectorizable_type_demotion): New function declaration. * tree-vect-generic.c (expand_vector_operations_1): Consider correct mode. * tree.def (VEC_PACK_MOD_EXPR, VEC_PACK_SAT_EXPR): New tree-codes. * expr.c (expand_expr_real_1): Add case for VEC_PACK_MOD_EXPR and VEC_PACK_SAT_EXPR. * tree-iniline.c (estimate_num_insns_1): Likewise. * tree-pretty-print.c (dump_generic_node, op_prio): Likewise. * optabs.c (optab_for_tree_code): Likewise. * optabs.c (expand_binop): In case of vec_pack_*_optabs the mode compared against the predicate of the result is not 'mode' (the input to the function) but a mode with half the size of 'mode'. (init_optab): Initialize new optabs. * optabs.h (OTI_vec_pack_mod, OTI_vec_pack_ssat, OTI_vec_pack_usat): New optab indices. (vec_pack_mod_optab, vec_pack_ssat_optab, vec_pack_usat_optab): New optabs. * genopinit.c (vec_pack_mod_optab, vec_pack_ssat_optab): (vec_pack_usat_optab): Initialize new optabs. * doc/md.texi (vec_pack_mod, vec_pack_ssat, vec_pack_usat): New. * config/rs6000/altivec.md (vec_pack_mod_v8hi, vec_pack_mod_v4si): New. 2006-11-08 Richard Henderson <rth@redehat.com> * config/i386/sse.md (vec_pack_mod_v8hi, vec_pack_mod_v4si): (vec_pack_mod_v2di, vec_interleave_highv16qi, vec_interleave_lowv16qi): (vec_interleave_highv8hi, vec_interleave_lowv8hi): (vec_interleave_highv4si, vec_interleave_lowv4si): (vec_interleave_highv2di, vec_interleave_lowv2di): New. 2006-11-08 Dorit Nuzman <dorit@il.ibm.com> * tree-vect-transform.c (vectorizable_reduction): Support multiple datatypes. (vect_transform_stmt): Removed redundant code. 2006-11-08 Dorit Nuzman <dorit@il.ibm.com> * tree-vect-transform.c (vectorizable_operation): Support multiple datatypes. 2006-11-08 Dorit Nuzman <dorit@il.ibm.com> * tree-vect-transform.c (vect_align_data_ref): Removed. (vect_create_data_ref_ptr): Added additional argument - ptr_incr. Updated function documentation. Return the increment stmt in ptr_incr. (bump_vector_ptr): New function. (vect_get_vec_def_for_stmt_copy): New function. (vect_finish_stmt_generation): Create a stmt_info to newly created vector stmts. (vect_setup_realignment): Call vect_create_data_ref_ptr with additional argument. (vectorizable_reduction, vectorizable_assignment): Not supported yet if VF is greater than the number of elements that can fit in one vector word. (vectorizable_operation, vectorizable_condition): Likewise. (vectorizable_store, vectorizable_load): Support the case that the VF is greater than the number of elements that can fit in one vector word. (vect_transform_loop): Don't fail in case of multiple data-types. * tree-vect-analyze.c (vect_determine_vectorization_factor): Don't fail in case of multiple data-types; the smallest type determines the VF. (vect_analyze_data_ref_dependence): Don't record datarefs as same_align if they are of different sizes. (vect_update_misalignment_for_peel): Compare misalignments in terms of number of elements rather than number of bytes. (vect_enhance_data_refs_alignment): Fix/Add dump printouts. (vect_can_advance_ivs_p): Fix a dump printout From-SVN: r118577
2006-11-08 08:32:44 +01:00
set et_vect_widen_mult_hi_to_si_saved 1
}
}
verbose "check_effective_target_vect_widen_mult_hi_to_si: returning $et_vect_widen_mult_hi_to_si_saved" 2
return $et_vect_widen_mult_hi_to_si_saved
Makefile.in (tree-vect-patterns.o): Add rule for new file. * Makefile.in (tree-vect-patterns.o): Add rule for new file. * tree-vect-analyze.c (vect_determine_vectorization_factor): Use existing STMT_VINFO_VECTYPE if available. (vect_mark_relevant): Add special handling for stmts that are marked as STMT_VINFO_IN_PATTERN_P. (vect_analyze_loop): Call vect_pattern_recog. * tree-vectorizer.c (new_stmt_vec_info): Initialize new fields. * tree-vectorizer.h (in_pattern_p, related_stmt): New fields in stmt_info. (STMT_VINFO_IN_PATTERN_P, STMT_VINFO_RELATED_STMT): New macros. (vect_recog_func_ptr): New function-pointer type. * tree-vect-patterns.c: New file. (vect_recog_widen_sum_pattern, vect_recog_widen_mult_pattern): (vect_recog_dot_prod_pattern, vect_pattern_recog): (vect_pattern_recog_1): New functions. (vect_pattern_recog_funcs): New array of function pointers. * tree-vectorizer.h (ternary_op): New enum value. * tree-vect-transform.c (vect_create_epilog_for_reduction): Added declaration. Revised documentation. Removed redundant dump prints. Removed redundant argument. Added support for reduction patterns. (vectorizable_reduction): Added support for reduction patterns. (vect_transform_stmt): Added support for patterns. * expr.c (expand_expr_real_1): Added case for DOT_PROD_EXPR. * genopinit.c (udot_prod_optab, sdot_prod_optab): Initialize. * optabs.c (optab_for_tree_code): Added case for DOT_PROD_EXPR. (expand_widen_pattern_expr): New function. (init_optabs): Initialize new optabs udot_prod_optab, sdot_prod_optab. * optabs.h (OTI_sdot_prod, OTI_udot_prod): New. (sdot_prod_optab, udot_prod_optab): Define new optabs. (expand_widen_pattern_expr): New function declaration. * tree.def (DOT_PROD_EXPR, WIDEN_SUM_EXPR, WIDEN_MULT_EXPR): New tree-codes. * tree-inline.c (estimate_num_insns_1): Added cases for new tree-codes DOT_PROD_EXPR, WIDEN_SUM_EXPR, WIDEN_MULT_EXPR. * tree-pretty-print.c (dump_generic_node): Likewise. (op_prio): Likewise. (op_symbol): Added cases for WIDEN_SUM_EXPR, WIDEN_MULT_EXPR. * tree-ssa-operands.c (get_expr_operands): Added case for DOT_PROD_EXPR. * tree-vect-patterns.c (widened_name_p): New function. (vect_recog_dot_prod_pattern): Added function implementation. * tree-vect-transform.c (get_initial_def_for_reduction): Added cases for DOT_PROD_EXPR, WIDEN_SUM_EXPR. * config/rs6000/altivec.md (udot_prod<mode>, sdot_prodv8hi): New. * config/i386/sse.md (sdot_prodv8hi, udot_prodv4si): New. * expr.c (expand_expr_real_1): Added case for WIDEN_SUM_EXPR. * genopinit.c (widen_ssum_optab, widen_usum_optab): Initialize. * optabs.c (optab_for_tree_code): Added case for WIDEN_SUM_EXPR. (init_optabs): Initialize new optabs widen_ssum_optab, widen_usum_optab. * optabs.h (OTI_widen_ssum, OTI_widen_usum): New. (widen_ssum_optab, widen_usum_optab): Define new optabs. * tree-vect-generic.c: (expand_vector_operations_1): Check type of use instead of type of def. * tree-vect-patterns.c (vect_recog_widen_sum_pattern): Added function implementation. * config/rs6000/altivec.md (widen_usum<mode>, widen_ssumv16qi, widen_ssumv8hi): New. * doc/tm.texi (ssum_widen, usum_widen, sdot_prod, udot_prod): New patterns. From-SVN: r109954
2006-01-19 11:24:00 +01:00
}
# Return 1 if the target plus current options supports a vector
# dot-product of signed chars, 0 otherwise.
#
# This won't change for different subtargets so cache the result.
proc check_effective_target_vect_sdot_qi { } {
global et_vect_sdot_qi
if [info exists et_vect_sdot_qi_saved] {
verbose "check_effective_target_vect_sdot_qi: using cached result" 2
} else {
set et_vect_sdot_qi_saved 0
}
verbose "check_effective_target_vect_sdot_qi: returning $et_vect_sdot_qi_saved" 2
return $et_vect_sdot_qi_saved
}
# Return 1 if the target plus current options supports a vector
# dot-product of unsigned chars, 0 otherwise.
#
# This won't change for different subtargets so cache the result.
proc check_effective_target_vect_udot_qi { } {
global et_vect_udot_qi
if [info exists et_vect_udot_qi_saved] {
verbose "check_effective_target_vect_udot_qi: using cached result" 2
} else {
set et_vect_udot_qi_saved 0
[multiple changes] 2006-11-08 Dorit Nuzman <dorit@il.ibm.com> * tree-vect-analyze.c (vect_mark_relevant, vect_stmt_relevant_p): Take enum argument instead of bool. (vect_analyze_operations): Call vectorizable_type_promotion. * tree-vectorizer.h (type_promotion_vec_info_type): New enum stmt_vec_info_type value. (supportable_widening_operation, vectorizable_type_promotion): New function declarations. * tree-vect-transform.c (vect_gen_widened_results_half): New function. (vectorizable_type_promotion): New function. (vect_transform_stmt): Call vectorizable_type_promotion. * tree-vect-analyze.c (supportable_widening_operation): New function. * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Add implementation. * tree-vect-generic.c (expand_vector_operations_1): Consider correct mode. * tree.def (VEC_WIDEN_MULT_HI_EXPR, VEC_WIDEN_MULT_LO_EXPR): (VEC_UNPACK_HI_EXPR, VEC_UNPACK_LO_EXPR): New tree-codes. * tree-inline.c (estimate_num_insns_1): Add cases for above new tree-codes. * tree-pretty-print.c (dump_generic_node, op_prio): Likewise. * expr.c (expand_expr_real_1): Likewise. * optabs.c (optab_for_tree_code): Likewise. (init_optabs): Initialize new optabs. * genopinit.c (vec_widen_umult_hi_optab, vec_widen_smult_hi_optab, vec_widen_smult_hi_optab, vec_widen_smult_lo_optab, vec_unpacks_hi_optab, vec_unpacks_lo_optab, vec_unpacku_hi_optab, vec_unpacku_lo_optab): Initialize new optabs. * optabs.h (OTI_vec_widen_umult_hi, OTI_vec_widen_umult_lo): (OTI_vec_widen_smult_h, OTI_vec_widen_smult_lo, OTI_vec_unpacks_hi, OTI_vec_unpacks_lo, OTI_vec_unpacku_hi, OTI_vec_unpacku_lo): New optab indices. (vec_widen_umult_hi_optab, vec_widen_umult_lo_optab): (vec_widen_smult_hi_optab, vec_widen_smult_lo_optab): (vec_unpacks_hi_optab, vec_unpacku_hi_optab, vec_unpacks_lo_optab): (vec_unpacku_lo_optab): New optabs. * doc/md.texi (vec_unpacks_hi, vec_unpacks_lo, vec_unpacku_hi): (vec_unpacku_lo, vec_widen_umult_hi, vec_widen_umult_lo): (vec_widen_smult_hi, vec_widen_smult_lo): New. * doc/c-tree.texi (VEC_LSHIFT_EXPR, VEC_RSHIFT_EXPR): (VEC_WIDEN_MULT_HI_EXPR, VEC_WIDEN_MULT_LO_EXPR, VEC_UNPACK_HI_EXPR): (VEC_UNPACK_LO_EXPR, VEC_PACK_MOD_EXPR, VEC_PACK_SAT_EXPR): New. * config/rs6000/altivec.md (UNSPEC_VMULWHUB, UNSPEC_VMULWLUB): (UNSPEC_VMULWHSB, UNSPEC_VMULWLSB, UNSPEC_VMULWHUH, UNSPEC_VMULWLUH): (UNSPEC_VMULWHSH, UNSPEC_VMULWLSH): New. (UNSPEC_VPERMSI, UNSPEC_VPERMHI): New. (vec_vperm_v8hiv4si, vec_vperm_v16qiv8hi): New patterns used to implement the unsigned unpacking patterns. (vec_unpacks_hi_v16qi, vec_unpacks_hi_v8hi, vec_unpacks_lo_v16qi): (vec_unpacks_lo_v8hi): New signed unpacking patterns. (vec_unpacku_hi_v16qi, vec_unpacku_hi_v8hi, vec_unpacku_lo_v16qi): (vec_unpacku_lo_v8hi): New unsigned unpacking patterns. (vec_widen_umult_hi_v16qi, vec_widen_umult_lo_v16qi): (vec_widen_smult_hi_v16qi, vec_widen_smult_lo_v16qi): (vec_widen_umult_hi_v8hi, vec_widen_umult_lo_v8hi): (vec_widen_smult_hi_v8hi, vec_widen_smult_lo_v8hi): New widening multiplication patterns. * target.h (builtin_mul_widen_even, builtin_mul_widen_odd): New. * target-def.h (TARGET_VECTORIZE_BUILTIN_MUL_WIDEN_EVEN): (TARGET_VECTORIZE_BUILTIN_MUL_WIDEN_ODD): New. * config/rs6000/rs6000.c (rs6000_builtin_mul_widen_even): New. (rs6000_builtin_mul_widen_odd): New. (TARGET_VECTORIZE_BUILTIN_MUL_WIDEN_EVEN): Defined. (TARGET_VECTORIZE_BUILTIN_MUL_WIDEN_ODD): Defined. * tree-vectorizer.h (enum vect_relevant): New enum type. (_stmt_vec_info): Field relevant chaned from bool to enum vect_relevant. (STMT_VINFO_RELEVANT_P): Updated. (STMT_VINFO_RELEVANT): New. * tree-vectorizer.c (new_stmt_vec_info): Use STMT_VINFO_RELEVANT instead of STMT_VINFO_RELEVANT_P. * tree-vect-analyze.c (vect_mark_relevant, vect_stmt_relevant_p): Replace calls to STMT_VINFO_RELEVANT_P with STMT_VINFO_RELEVANT, and boolean variable with enum vect_relevant. (vect_mark_stmts_to_be_vectorized): Likewise + update documentation. * doc/tm.texi (TARGET_VECTORIZE_BUILTIN_MUL_WIDEN_EVEN): New. (TARGET_VECTORIZE_BUILTIN_MUL_WIDEN_ODD): New. 2006-11-08 Richard Henderson <rth@redhat.com> * config/i386/sse.md (vec_widen_umult_hi_v8hi, vec_widen_umult_lo_v8hi): New. (vec_widen_smult_hi_v4si, vec_widen_smult_lo_v4si, vec_widen_umult_hi_v4si, vec_widen_umult_lo_v4si): New. * config/i386/i386.c (ix86_expand_sse_unpack): New. * config/i386/i386-protos.h (ix86_expand_sse_unpack): New. * config/i386/sse.md (vec_unpacku_hi_v16qi, vec_unpacks_hi_v16qi, vec_unpacku_lo_v16qi, vec_unpacks_lo_v16qi, vec_unpacku_hi_v8hi, vec_unpacks_hi_v8hi, vec_unpacku_lo_v8hi, vec_unpacks_lo_v8hi, vec_unpacku_hi_v4si, vec_unpacks_hi_v4si, vec_unpacku_lo_v4si, vec_unpacks_lo_v4si): New. 2006-11-08 Dorit Nuzman <dorit@il.ibm.com> * tree-vect-transform.c (vectorizable_type_demotion): New function. (vect_transform_stmt): Add case for type_demotion_vec_info_type. (vect_analyze_operations): Call vectorizable_type_demotion. * tree-vectorizer.h (type_demotion_vec_info_type): New enum stmt_vec_info_type value. (vectorizable_type_demotion): New function declaration. * tree-vect-generic.c (expand_vector_operations_1): Consider correct mode. * tree.def (VEC_PACK_MOD_EXPR, VEC_PACK_SAT_EXPR): New tree-codes. * expr.c (expand_expr_real_1): Add case for VEC_PACK_MOD_EXPR and VEC_PACK_SAT_EXPR. * tree-iniline.c (estimate_num_insns_1): Likewise. * tree-pretty-print.c (dump_generic_node, op_prio): Likewise. * optabs.c (optab_for_tree_code): Likewise. * optabs.c (expand_binop): In case of vec_pack_*_optabs the mode compared against the predicate of the result is not 'mode' (the input to the function) but a mode with half the size of 'mode'. (init_optab): Initialize new optabs. * optabs.h (OTI_vec_pack_mod, OTI_vec_pack_ssat, OTI_vec_pack_usat): New optab indices. (vec_pack_mod_optab, vec_pack_ssat_optab, vec_pack_usat_optab): New optabs. * genopinit.c (vec_pack_mod_optab, vec_pack_ssat_optab): (vec_pack_usat_optab): Initialize new optabs. * doc/md.texi (vec_pack_mod, vec_pack_ssat, vec_pack_usat): New. * config/rs6000/altivec.md (vec_pack_mod_v8hi, vec_pack_mod_v4si): New. 2006-11-08 Richard Henderson <rth@redehat.com> * config/i386/sse.md (vec_pack_mod_v8hi, vec_pack_mod_v4si): (vec_pack_mod_v2di, vec_interleave_highv16qi, vec_interleave_lowv16qi): (vec_interleave_highv8hi, vec_interleave_lowv8hi): (vec_interleave_highv4si, vec_interleave_lowv4si): (vec_interleave_highv2di, vec_interleave_lowv2di): New. 2006-11-08 Dorit Nuzman <dorit@il.ibm.com> * tree-vect-transform.c (vectorizable_reduction): Support multiple datatypes. (vect_transform_stmt): Removed redundant code. 2006-11-08 Dorit Nuzman <dorit@il.ibm.com> * tree-vect-transform.c (vectorizable_operation): Support multiple datatypes. 2006-11-08 Dorit Nuzman <dorit@il.ibm.com> * tree-vect-transform.c (vect_align_data_ref): Removed. (vect_create_data_ref_ptr): Added additional argument - ptr_incr. Updated function documentation. Return the increment stmt in ptr_incr. (bump_vector_ptr): New function. (vect_get_vec_def_for_stmt_copy): New function. (vect_finish_stmt_generation): Create a stmt_info to newly created vector stmts. (vect_setup_realignment): Call vect_create_data_ref_ptr with additional argument. (vectorizable_reduction, vectorizable_assignment): Not supported yet if VF is greater than the number of elements that can fit in one vector word. (vectorizable_operation, vectorizable_condition): Likewise. (vectorizable_store, vectorizable_load): Support the case that the VF is greater than the number of elements that can fit in one vector word. (vect_transform_loop): Don't fail in case of multiple data-types. * tree-vect-analyze.c (vect_determine_vectorization_factor): Don't fail in case of multiple data-types; the smallest type determines the VF. (vect_analyze_data_ref_dependence): Don't record datarefs as same_align if they are of different sizes. (vect_update_misalignment_for_peel): Compare misalignments in terms of number of elements rather than number of bytes. (vect_enhance_data_refs_alignment): Fix/Add dump printouts. (vect_can_advance_ivs_p): Fix a dump printout From-SVN: r118577
2006-11-08 08:32:44 +01:00
if { [istarget powerpc*-*-*] } {
Makefile.in (tree-vect-patterns.o): Add rule for new file. * Makefile.in (tree-vect-patterns.o): Add rule for new file. * tree-vect-analyze.c (vect_determine_vectorization_factor): Use existing STMT_VINFO_VECTYPE if available. (vect_mark_relevant): Add special handling for stmts that are marked as STMT_VINFO_IN_PATTERN_P. (vect_analyze_loop): Call vect_pattern_recog. * tree-vectorizer.c (new_stmt_vec_info): Initialize new fields. * tree-vectorizer.h (in_pattern_p, related_stmt): New fields in stmt_info. (STMT_VINFO_IN_PATTERN_P, STMT_VINFO_RELATED_STMT): New macros. (vect_recog_func_ptr): New function-pointer type. * tree-vect-patterns.c: New file. (vect_recog_widen_sum_pattern, vect_recog_widen_mult_pattern): (vect_recog_dot_prod_pattern, vect_pattern_recog): (vect_pattern_recog_1): New functions. (vect_pattern_recog_funcs): New array of function pointers. * tree-vectorizer.h (ternary_op): New enum value. * tree-vect-transform.c (vect_create_epilog_for_reduction): Added declaration. Revised documentation. Removed redundant dump prints. Removed redundant argument. Added support for reduction patterns. (vectorizable_reduction): Added support for reduction patterns. (vect_transform_stmt): Added support for patterns. * expr.c (expand_expr_real_1): Added case for DOT_PROD_EXPR. * genopinit.c (udot_prod_optab, sdot_prod_optab): Initialize. * optabs.c (optab_for_tree_code): Added case for DOT_PROD_EXPR. (expand_widen_pattern_expr): New function. (init_optabs): Initialize new optabs udot_prod_optab, sdot_prod_optab. * optabs.h (OTI_sdot_prod, OTI_udot_prod): New. (sdot_prod_optab, udot_prod_optab): Define new optabs. (expand_widen_pattern_expr): New function declaration. * tree.def (DOT_PROD_EXPR, WIDEN_SUM_EXPR, WIDEN_MULT_EXPR): New tree-codes. * tree-inline.c (estimate_num_insns_1): Added cases for new tree-codes DOT_PROD_EXPR, WIDEN_SUM_EXPR, WIDEN_MULT_EXPR. * tree-pretty-print.c (dump_generic_node): Likewise. (op_prio): Likewise. (op_symbol): Added cases for WIDEN_SUM_EXPR, WIDEN_MULT_EXPR. * tree-ssa-operands.c (get_expr_operands): Added case for DOT_PROD_EXPR. * tree-vect-patterns.c (widened_name_p): New function. (vect_recog_dot_prod_pattern): Added function implementation. * tree-vect-transform.c (get_initial_def_for_reduction): Added cases for DOT_PROD_EXPR, WIDEN_SUM_EXPR. * config/rs6000/altivec.md (udot_prod<mode>, sdot_prodv8hi): New. * config/i386/sse.md (sdot_prodv8hi, udot_prodv4si): New. * expr.c (expand_expr_real_1): Added case for WIDEN_SUM_EXPR. * genopinit.c (widen_ssum_optab, widen_usum_optab): Initialize. * optabs.c (optab_for_tree_code): Added case for WIDEN_SUM_EXPR. (init_optabs): Initialize new optabs widen_ssum_optab, widen_usum_optab. * optabs.h (OTI_widen_ssum, OTI_widen_usum): New. (widen_ssum_optab, widen_usum_optab): Define new optabs. * tree-vect-generic.c: (expand_vector_operations_1): Check type of use instead of type of def. * tree-vect-patterns.c (vect_recog_widen_sum_pattern): Added function implementation. * config/rs6000/altivec.md (widen_usum<mode>, widen_ssumv16qi, widen_ssumv8hi): New. * doc/tm.texi (ssum_widen, usum_widen, sdot_prod, udot_prod): New patterns. From-SVN: r109954
2006-01-19 11:24:00 +01:00
set et_vect_udot_qi_saved 1
}
}
verbose "check_effective_target_vect_udot_qi: returning $et_vect_udot_qi_saved" 2
return $et_vect_udot_qi_saved
}
# Return 1 if the target plus current options supports a vector
# dot-product of signed shorts, 0 otherwise.
#
# This won't change for different subtargets so cache the result.
proc check_effective_target_vect_sdot_hi { } {
global et_vect_sdot_hi
if [info exists et_vect_sdot_hi_saved] {
verbose "check_effective_target_vect_sdot_hi: using cached result" 2
} else {
set et_vect_sdot_hi_saved 0
if { ([istarget powerpc*-*-*] && ![istarget powerpc-*-linux*paired*])
Makefile.in (tree-vect-patterns.o): Add rule for new file. * Makefile.in (tree-vect-patterns.o): Add rule for new file. * tree-vect-analyze.c (vect_determine_vectorization_factor): Use existing STMT_VINFO_VECTYPE if available. (vect_mark_relevant): Add special handling for stmts that are marked as STMT_VINFO_IN_PATTERN_P. (vect_analyze_loop): Call vect_pattern_recog. * tree-vectorizer.c (new_stmt_vec_info): Initialize new fields. * tree-vectorizer.h (in_pattern_p, related_stmt): New fields in stmt_info. (STMT_VINFO_IN_PATTERN_P, STMT_VINFO_RELATED_STMT): New macros. (vect_recog_func_ptr): New function-pointer type. * tree-vect-patterns.c: New file. (vect_recog_widen_sum_pattern, vect_recog_widen_mult_pattern): (vect_recog_dot_prod_pattern, vect_pattern_recog): (vect_pattern_recog_1): New functions. (vect_pattern_recog_funcs): New array of function pointers. * tree-vectorizer.h (ternary_op): New enum value. * tree-vect-transform.c (vect_create_epilog_for_reduction): Added declaration. Revised documentation. Removed redundant dump prints. Removed redundant argument. Added support for reduction patterns. (vectorizable_reduction): Added support for reduction patterns. (vect_transform_stmt): Added support for patterns. * expr.c (expand_expr_real_1): Added case for DOT_PROD_EXPR. * genopinit.c (udot_prod_optab, sdot_prod_optab): Initialize. * optabs.c (optab_for_tree_code): Added case for DOT_PROD_EXPR. (expand_widen_pattern_expr): New function. (init_optabs): Initialize new optabs udot_prod_optab, sdot_prod_optab. * optabs.h (OTI_sdot_prod, OTI_udot_prod): New. (sdot_prod_optab, udot_prod_optab): Define new optabs. (expand_widen_pattern_expr): New function declaration. * tree.def (DOT_PROD_EXPR, WIDEN_SUM_EXPR, WIDEN_MULT_EXPR): New tree-codes. * tree-inline.c (estimate_num_insns_1): Added cases for new tree-codes DOT_PROD_EXPR, WIDEN_SUM_EXPR, WIDEN_MULT_EXPR. * tree-pretty-print.c (dump_generic_node): Likewise. (op_prio): Likewise. (op_symbol): Added cases for WIDEN_SUM_EXPR, WIDEN_MULT_EXPR. * tree-ssa-operands.c (get_expr_operands): Added case for DOT_PROD_EXPR. * tree-vect-patterns.c (widened_name_p): New function. (vect_recog_dot_prod_pattern): Added function implementation. * tree-vect-transform.c (get_initial_def_for_reduction): Added cases for DOT_PROD_EXPR, WIDEN_SUM_EXPR. * config/rs6000/altivec.md (udot_prod<mode>, sdot_prodv8hi): New. * config/i386/sse.md (sdot_prodv8hi, udot_prodv4si): New. * expr.c (expand_expr_real_1): Added case for WIDEN_SUM_EXPR. * genopinit.c (widen_ssum_optab, widen_usum_optab): Initialize. * optabs.c (optab_for_tree_code): Added case for WIDEN_SUM_EXPR. (init_optabs): Initialize new optabs widen_ssum_optab, widen_usum_optab. * optabs.h (OTI_widen_ssum, OTI_widen_usum): New. (widen_ssum_optab, widen_usum_optab): Define new optabs. * tree-vect-generic.c: (expand_vector_operations_1): Check type of use instead of type of def. * tree-vect-patterns.c (vect_recog_widen_sum_pattern): Added function implementation. * config/rs6000/altivec.md (widen_usum<mode>, widen_ssumv16qi, widen_ssumv8hi): New. * doc/tm.texi (ssum_widen, usum_widen, sdot_prod, udot_prod): New patterns. From-SVN: r109954
2006-01-19 11:24:00 +01:00
|| [istarget i?86-*-*]
[multiple changes] 2006-11-08 Dorit Nuzman <dorit@il.ibm.com> * tree-vect-analyze.c (vect_mark_relevant, vect_stmt_relevant_p): Take enum argument instead of bool. (vect_analyze_operations): Call vectorizable_type_promotion. * tree-vectorizer.h (type_promotion_vec_info_type): New enum stmt_vec_info_type value. (supportable_widening_operation, vectorizable_type_promotion): New function declarations. * tree-vect-transform.c (vect_gen_widened_results_half): New function. (vectorizable_type_promotion): New function. (vect_transform_stmt): Call vectorizable_type_promotion. * tree-vect-analyze.c (supportable_widening_operation): New function. * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Add implementation. * tree-vect-generic.c (expand_vector_operations_1): Consider correct mode. * tree.def (VEC_WIDEN_MULT_HI_EXPR, VEC_WIDEN_MULT_LO_EXPR): (VEC_UNPACK_HI_EXPR, VEC_UNPACK_LO_EXPR): New tree-codes. * tree-inline.c (estimate_num_insns_1): Add cases for above new tree-codes. * tree-pretty-print.c (dump_generic_node, op_prio): Likewise. * expr.c (expand_expr_real_1): Likewise. * optabs.c (optab_for_tree_code): Likewise. (init_optabs): Initialize new optabs. * genopinit.c (vec_widen_umult_hi_optab, vec_widen_smult_hi_optab, vec_widen_smult_hi_optab, vec_widen_smult_lo_optab, vec_unpacks_hi_optab, vec_unpacks_lo_optab, vec_unpacku_hi_optab, vec_unpacku_lo_optab): Initialize new optabs. * optabs.h (OTI_vec_widen_umult_hi, OTI_vec_widen_umult_lo): (OTI_vec_widen_smult_h, OTI_vec_widen_smult_lo, OTI_vec_unpacks_hi, OTI_vec_unpacks_lo, OTI_vec_unpacku_hi, OTI_vec_unpacku_lo): New optab indices. (vec_widen_umult_hi_optab, vec_widen_umult_lo_optab): (vec_widen_smult_hi_optab, vec_widen_smult_lo_optab): (vec_unpacks_hi_optab, vec_unpacku_hi_optab, vec_unpacks_lo_optab): (vec_unpacku_lo_optab): New optabs. * doc/md.texi (vec_unpacks_hi, vec_unpacks_lo, vec_unpacku_hi): (vec_unpacku_lo, vec_widen_umult_hi, vec_widen_umult_lo): (vec_widen_smult_hi, vec_widen_smult_lo): New. * doc/c-tree.texi (VEC_LSHIFT_EXPR, VEC_RSHIFT_EXPR): (VEC_WIDEN_MULT_HI_EXPR, VEC_WIDEN_MULT_LO_EXPR, VEC_UNPACK_HI_EXPR): (VEC_UNPACK_LO_EXPR, VEC_PACK_MOD_EXPR, VEC_PACK_SAT_EXPR): New. * config/rs6000/altivec.md (UNSPEC_VMULWHUB, UNSPEC_VMULWLUB): (UNSPEC_VMULWHSB, UNSPEC_VMULWLSB, UNSPEC_VMULWHUH, UNSPEC_VMULWLUH): (UNSPEC_VMULWHSH, UNSPEC_VMULWLSH): New. (UNSPEC_VPERMSI, UNSPEC_VPERMHI): New. (vec_vperm_v8hiv4si, vec_vperm_v16qiv8hi): New patterns used to implement the unsigned unpacking patterns. (vec_unpacks_hi_v16qi, vec_unpacks_hi_v8hi, vec_unpacks_lo_v16qi): (vec_unpacks_lo_v8hi): New signed unpacking patterns. (vec_unpacku_hi_v16qi, vec_unpacku_hi_v8hi, vec_unpacku_lo_v16qi): (vec_unpacku_lo_v8hi): New unsigned unpacking patterns. (vec_widen_umult_hi_v16qi, vec_widen_umult_lo_v16qi): (vec_widen_smult_hi_v16qi, vec_widen_smult_lo_v16qi): (vec_widen_umult_hi_v8hi, vec_widen_umult_lo_v8hi): (vec_widen_smult_hi_v8hi, vec_widen_smult_lo_v8hi): New widening multiplication patterns. * target.h (builtin_mul_widen_even, builtin_mul_widen_odd): New. * target-def.h (TARGET_VECTORIZE_BUILTIN_MUL_WIDEN_EVEN): (TARGET_VECTORIZE_BUILTIN_MUL_WIDEN_ODD): New. * config/rs6000/rs6000.c (rs6000_builtin_mul_widen_even): New. (rs6000_builtin_mul_widen_odd): New. (TARGET_VECTORIZE_BUILTIN_MUL_WIDEN_EVEN): Defined. (TARGET_VECTORIZE_BUILTIN_MUL_WIDEN_ODD): Defined. * tree-vectorizer.h (enum vect_relevant): New enum type. (_stmt_vec_info): Field relevant chaned from bool to enum vect_relevant. (STMT_VINFO_RELEVANT_P): Updated. (STMT_VINFO_RELEVANT): New. * tree-vectorizer.c (new_stmt_vec_info): Use STMT_VINFO_RELEVANT instead of STMT_VINFO_RELEVANT_P. * tree-vect-analyze.c (vect_mark_relevant, vect_stmt_relevant_p): Replace calls to STMT_VINFO_RELEVANT_P with STMT_VINFO_RELEVANT, and boolean variable with enum vect_relevant. (vect_mark_stmts_to_be_vectorized): Likewise + update documentation. * doc/tm.texi (TARGET_VECTORIZE_BUILTIN_MUL_WIDEN_EVEN): New. (TARGET_VECTORIZE_BUILTIN_MUL_WIDEN_ODD): New. 2006-11-08 Richard Henderson <rth@redhat.com> * config/i386/sse.md (vec_widen_umult_hi_v8hi, vec_widen_umult_lo_v8hi): New. (vec_widen_smult_hi_v4si, vec_widen_smult_lo_v4si, vec_widen_umult_hi_v4si, vec_widen_umult_lo_v4si): New. * config/i386/i386.c (ix86_expand_sse_unpack): New. * config/i386/i386-protos.h (ix86_expand_sse_unpack): New. * config/i386/sse.md (vec_unpacku_hi_v16qi, vec_unpacks_hi_v16qi, vec_unpacku_lo_v16qi, vec_unpacks_lo_v16qi, vec_unpacku_hi_v8hi, vec_unpacks_hi_v8hi, vec_unpacku_lo_v8hi, vec_unpacks_lo_v8hi, vec_unpacku_hi_v4si, vec_unpacks_hi_v4si, vec_unpacku_lo_v4si, vec_unpacks_lo_v4si): New. 2006-11-08 Dorit Nuzman <dorit@il.ibm.com> * tree-vect-transform.c (vectorizable_type_demotion): New function. (vect_transform_stmt): Add case for type_demotion_vec_info_type. (vect_analyze_operations): Call vectorizable_type_demotion. * tree-vectorizer.h (type_demotion_vec_info_type): New enum stmt_vec_info_type value. (vectorizable_type_demotion): New function declaration. * tree-vect-generic.c (expand_vector_operations_1): Consider correct mode. * tree.def (VEC_PACK_MOD_EXPR, VEC_PACK_SAT_EXPR): New tree-codes. * expr.c (expand_expr_real_1): Add case for VEC_PACK_MOD_EXPR and VEC_PACK_SAT_EXPR. * tree-iniline.c (estimate_num_insns_1): Likewise. * tree-pretty-print.c (dump_generic_node, op_prio): Likewise. * optabs.c (optab_for_tree_code): Likewise. * optabs.c (expand_binop): In case of vec_pack_*_optabs the mode compared against the predicate of the result is not 'mode' (the input to the function) but a mode with half the size of 'mode'. (init_optab): Initialize new optabs. * optabs.h (OTI_vec_pack_mod, OTI_vec_pack_ssat, OTI_vec_pack_usat): New optab indices. (vec_pack_mod_optab, vec_pack_ssat_optab, vec_pack_usat_optab): New optabs. * genopinit.c (vec_pack_mod_optab, vec_pack_ssat_optab): (vec_pack_usat_optab): Initialize new optabs. * doc/md.texi (vec_pack_mod, vec_pack_ssat, vec_pack_usat): New. * config/rs6000/altivec.md (vec_pack_mod_v8hi, vec_pack_mod_v4si): New. 2006-11-08 Richard Henderson <rth@redehat.com> * config/i386/sse.md (vec_pack_mod_v8hi, vec_pack_mod_v4si): (vec_pack_mod_v2di, vec_interleave_highv16qi, vec_interleave_lowv16qi): (vec_interleave_highv8hi, vec_interleave_lowv8hi): (vec_interleave_highv4si, vec_interleave_lowv4si): (vec_interleave_highv2di, vec_interleave_lowv2di): New. 2006-11-08 Dorit Nuzman <dorit@il.ibm.com> * tree-vect-transform.c (vectorizable_reduction): Support multiple datatypes. (vect_transform_stmt): Removed redundant code. 2006-11-08 Dorit Nuzman <dorit@il.ibm.com> * tree-vect-transform.c (vectorizable_operation): Support multiple datatypes. 2006-11-08 Dorit Nuzman <dorit@il.ibm.com> * tree-vect-transform.c (vect_align_data_ref): Removed. (vect_create_data_ref_ptr): Added additional argument - ptr_incr. Updated function documentation. Return the increment stmt in ptr_incr. (bump_vector_ptr): New function. (vect_get_vec_def_for_stmt_copy): New function. (vect_finish_stmt_generation): Create a stmt_info to newly created vector stmts. (vect_setup_realignment): Call vect_create_data_ref_ptr with additional argument. (vectorizable_reduction, vectorizable_assignment): Not supported yet if VF is greater than the number of elements that can fit in one vector word. (vectorizable_operation, vectorizable_condition): Likewise. (vectorizable_store, vectorizable_load): Support the case that the VF is greater than the number of elements that can fit in one vector word. (vect_transform_loop): Don't fail in case of multiple data-types. * tree-vect-analyze.c (vect_determine_vectorization_factor): Don't fail in case of multiple data-types; the smallest type determines the VF. (vect_analyze_data_ref_dependence): Don't record datarefs as same_align if they are of different sizes. (vect_update_misalignment_for_peel): Compare misalignments in terms of number of elements rather than number of bytes. (vect_enhance_data_refs_alignment): Fix/Add dump printouts. (vect_can_advance_ivs_p): Fix a dump printout From-SVN: r118577
2006-11-08 08:32:44 +01:00
|| [istarget x86_64-*-*] } {
Makefile.in (tree-vect-patterns.o): Add rule for new file. * Makefile.in (tree-vect-patterns.o): Add rule for new file. * tree-vect-analyze.c (vect_determine_vectorization_factor): Use existing STMT_VINFO_VECTYPE if available. (vect_mark_relevant): Add special handling for stmts that are marked as STMT_VINFO_IN_PATTERN_P. (vect_analyze_loop): Call vect_pattern_recog. * tree-vectorizer.c (new_stmt_vec_info): Initialize new fields. * tree-vectorizer.h (in_pattern_p, related_stmt): New fields in stmt_info. (STMT_VINFO_IN_PATTERN_P, STMT_VINFO_RELATED_STMT): New macros. (vect_recog_func_ptr): New function-pointer type. * tree-vect-patterns.c: New file. (vect_recog_widen_sum_pattern, vect_recog_widen_mult_pattern): (vect_recog_dot_prod_pattern, vect_pattern_recog): (vect_pattern_recog_1): New functions. (vect_pattern_recog_funcs): New array of function pointers. * tree-vectorizer.h (ternary_op): New enum value. * tree-vect-transform.c (vect_create_epilog_for_reduction): Added declaration. Revised documentation. Removed redundant dump prints. Removed redundant argument. Added support for reduction patterns. (vectorizable_reduction): Added support for reduction patterns. (vect_transform_stmt): Added support for patterns. * expr.c (expand_expr_real_1): Added case for DOT_PROD_EXPR. * genopinit.c (udot_prod_optab, sdot_prod_optab): Initialize. * optabs.c (optab_for_tree_code): Added case for DOT_PROD_EXPR. (expand_widen_pattern_expr): New function. (init_optabs): Initialize new optabs udot_prod_optab, sdot_prod_optab. * optabs.h (OTI_sdot_prod, OTI_udot_prod): New. (sdot_prod_optab, udot_prod_optab): Define new optabs. (expand_widen_pattern_expr): New function declaration. * tree.def (DOT_PROD_EXPR, WIDEN_SUM_EXPR, WIDEN_MULT_EXPR): New tree-codes. * tree-inline.c (estimate_num_insns_1): Added cases for new tree-codes DOT_PROD_EXPR, WIDEN_SUM_EXPR, WIDEN_MULT_EXPR. * tree-pretty-print.c (dump_generic_node): Likewise. (op_prio): Likewise. (op_symbol): Added cases for WIDEN_SUM_EXPR, WIDEN_MULT_EXPR. * tree-ssa-operands.c (get_expr_operands): Added case for DOT_PROD_EXPR. * tree-vect-patterns.c (widened_name_p): New function. (vect_recog_dot_prod_pattern): Added function implementation. * tree-vect-transform.c (get_initial_def_for_reduction): Added cases for DOT_PROD_EXPR, WIDEN_SUM_EXPR. * config/rs6000/altivec.md (udot_prod<mode>, sdot_prodv8hi): New. * config/i386/sse.md (sdot_prodv8hi, udot_prodv4si): New. * expr.c (expand_expr_real_1): Added case for WIDEN_SUM_EXPR. * genopinit.c (widen_ssum_optab, widen_usum_optab): Initialize. * optabs.c (optab_for_tree_code): Added case for WIDEN_SUM_EXPR. (init_optabs): Initialize new optabs widen_ssum_optab, widen_usum_optab. * optabs.h (OTI_widen_ssum, OTI_widen_usum): New. (widen_ssum_optab, widen_usum_optab): Define new optabs. * tree-vect-generic.c: (expand_vector_operations_1): Check type of use instead of type of def. * tree-vect-patterns.c (vect_recog_widen_sum_pattern): Added function implementation. * config/rs6000/altivec.md (widen_usum<mode>, widen_ssumv16qi, widen_ssumv8hi): New. * doc/tm.texi (ssum_widen, usum_widen, sdot_prod, udot_prod): New patterns. From-SVN: r109954
2006-01-19 11:24:00 +01:00
set et_vect_sdot_hi_saved 1
}
}
verbose "check_effective_target_vect_sdot_hi: returning $et_vect_sdot_hi_saved" 2
return $et_vect_sdot_hi_saved
}
# Return 1 if the target plus current options supports a vector
# dot-product of unsigned shorts, 0 otherwise.
#
# This won't change for different subtargets so cache the result.
proc check_effective_target_vect_udot_hi { } {
global et_vect_udot_hi
if [info exists et_vect_udot_hi_saved] {
verbose "check_effective_target_vect_udot_hi: using cached result" 2
} else {
set et_vect_udot_hi_saved 0
if { ([istarget powerpc*-*-*] && ![istarget powerpc-*-linux*paired*]) } {
Makefile.in (tree-vect-patterns.o): Add rule for new file. * Makefile.in (tree-vect-patterns.o): Add rule for new file. * tree-vect-analyze.c (vect_determine_vectorization_factor): Use existing STMT_VINFO_VECTYPE if available. (vect_mark_relevant): Add special handling for stmts that are marked as STMT_VINFO_IN_PATTERN_P. (vect_analyze_loop): Call vect_pattern_recog. * tree-vectorizer.c (new_stmt_vec_info): Initialize new fields. * tree-vectorizer.h (in_pattern_p, related_stmt): New fields in stmt_info. (STMT_VINFO_IN_PATTERN_P, STMT_VINFO_RELATED_STMT): New macros. (vect_recog_func_ptr): New function-pointer type. * tree-vect-patterns.c: New file. (vect_recog_widen_sum_pattern, vect_recog_widen_mult_pattern): (vect_recog_dot_prod_pattern, vect_pattern_recog): (vect_pattern_recog_1): New functions. (vect_pattern_recog_funcs): New array of function pointers. * tree-vectorizer.h (ternary_op): New enum value. * tree-vect-transform.c (vect_create_epilog_for_reduction): Added declaration. Revised documentation. Removed redundant dump prints. Removed redundant argument. Added support for reduction patterns. (vectorizable_reduction): Added support for reduction patterns. (vect_transform_stmt): Added support for patterns. * expr.c (expand_expr_real_1): Added case for DOT_PROD_EXPR. * genopinit.c (udot_prod_optab, sdot_prod_optab): Initialize. * optabs.c (optab_for_tree_code): Added case for DOT_PROD_EXPR. (expand_widen_pattern_expr): New function. (init_optabs): Initialize new optabs udot_prod_optab, sdot_prod_optab. * optabs.h (OTI_sdot_prod, OTI_udot_prod): New. (sdot_prod_optab, udot_prod_optab): Define new optabs. (expand_widen_pattern_expr): New function declaration. * tree.def (DOT_PROD_EXPR, WIDEN_SUM_EXPR, WIDEN_MULT_EXPR): New tree-codes. * tree-inline.c (estimate_num_insns_1): Added cases for new tree-codes DOT_PROD_EXPR, WIDEN_SUM_EXPR, WIDEN_MULT_EXPR. * tree-pretty-print.c (dump_generic_node): Likewise. (op_prio): Likewise. (op_symbol): Added cases for WIDEN_SUM_EXPR, WIDEN_MULT_EXPR. * tree-ssa-operands.c (get_expr_operands): Added case for DOT_PROD_EXPR. * tree-vect-patterns.c (widened_name_p): New function. (vect_recog_dot_prod_pattern): Added function implementation. * tree-vect-transform.c (get_initial_def_for_reduction): Added cases for DOT_PROD_EXPR, WIDEN_SUM_EXPR. * config/rs6000/altivec.md (udot_prod<mode>, sdot_prodv8hi): New. * config/i386/sse.md (sdot_prodv8hi, udot_prodv4si): New. * expr.c (expand_expr_real_1): Added case for WIDEN_SUM_EXPR. * genopinit.c (widen_ssum_optab, widen_usum_optab): Initialize. * optabs.c (optab_for_tree_code): Added case for WIDEN_SUM_EXPR. (init_optabs): Initialize new optabs widen_ssum_optab, widen_usum_optab. * optabs.h (OTI_widen_ssum, OTI_widen_usum): New. (widen_ssum_optab, widen_usum_optab): Define new optabs. * tree-vect-generic.c: (expand_vector_operations_1): Check type of use instead of type of def. * tree-vect-patterns.c (vect_recog_widen_sum_pattern): Added function implementation. * config/rs6000/altivec.md (widen_usum<mode>, widen_ssumv16qi, widen_ssumv8hi): New. * doc/tm.texi (ssum_widen, usum_widen, sdot_prod, udot_prod): New patterns. From-SVN: r109954
2006-01-19 11:24:00 +01:00
set et_vect_udot_hi_saved 1
}
}
verbose "check_effective_target_vect_udot_hi: returning $et_vect_udot_hi_saved" 2
return $et_vect_udot_hi_saved
}
[multiple changes] 2006-11-08 Dorit Nuzman <dorit@il.ibm.com> * tree-vect-analyze.c (vect_mark_relevant, vect_stmt_relevant_p): Take enum argument instead of bool. (vect_analyze_operations): Call vectorizable_type_promotion. * tree-vectorizer.h (type_promotion_vec_info_type): New enum stmt_vec_info_type value. (supportable_widening_operation, vectorizable_type_promotion): New function declarations. * tree-vect-transform.c (vect_gen_widened_results_half): New function. (vectorizable_type_promotion): New function. (vect_transform_stmt): Call vectorizable_type_promotion. * tree-vect-analyze.c (supportable_widening_operation): New function. * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Add implementation. * tree-vect-generic.c (expand_vector_operations_1): Consider correct mode. * tree.def (VEC_WIDEN_MULT_HI_EXPR, VEC_WIDEN_MULT_LO_EXPR): (VEC_UNPACK_HI_EXPR, VEC_UNPACK_LO_EXPR): New tree-codes. * tree-inline.c (estimate_num_insns_1): Add cases for above new tree-codes. * tree-pretty-print.c (dump_generic_node, op_prio): Likewise. * expr.c (expand_expr_real_1): Likewise. * optabs.c (optab_for_tree_code): Likewise. (init_optabs): Initialize new optabs. * genopinit.c (vec_widen_umult_hi_optab, vec_widen_smult_hi_optab, vec_widen_smult_hi_optab, vec_widen_smult_lo_optab, vec_unpacks_hi_optab, vec_unpacks_lo_optab, vec_unpacku_hi_optab, vec_unpacku_lo_optab): Initialize new optabs. * optabs.h (OTI_vec_widen_umult_hi, OTI_vec_widen_umult_lo): (OTI_vec_widen_smult_h, OTI_vec_widen_smult_lo, OTI_vec_unpacks_hi, OTI_vec_unpacks_lo, OTI_vec_unpacku_hi, OTI_vec_unpacku_lo): New optab indices. (vec_widen_umult_hi_optab, vec_widen_umult_lo_optab): (vec_widen_smult_hi_optab, vec_widen_smult_lo_optab): (vec_unpacks_hi_optab, vec_unpacku_hi_optab, vec_unpacks_lo_optab): (vec_unpacku_lo_optab): New optabs. * doc/md.texi (vec_unpacks_hi, vec_unpacks_lo, vec_unpacku_hi): (vec_unpacku_lo, vec_widen_umult_hi, vec_widen_umult_lo): (vec_widen_smult_hi, vec_widen_smult_lo): New. * doc/c-tree.texi (VEC_LSHIFT_EXPR, VEC_RSHIFT_EXPR): (VEC_WIDEN_MULT_HI_EXPR, VEC_WIDEN_MULT_LO_EXPR, VEC_UNPACK_HI_EXPR): (VEC_UNPACK_LO_EXPR, VEC_PACK_MOD_EXPR, VEC_PACK_SAT_EXPR): New. * config/rs6000/altivec.md (UNSPEC_VMULWHUB, UNSPEC_VMULWLUB): (UNSPEC_VMULWHSB, UNSPEC_VMULWLSB, UNSPEC_VMULWHUH, UNSPEC_VMULWLUH): (UNSPEC_VMULWHSH, UNSPEC_VMULWLSH): New. (UNSPEC_VPERMSI, UNSPEC_VPERMHI): New. (vec_vperm_v8hiv4si, vec_vperm_v16qiv8hi): New patterns used to implement the unsigned unpacking patterns. (vec_unpacks_hi_v16qi, vec_unpacks_hi_v8hi, vec_unpacks_lo_v16qi): (vec_unpacks_lo_v8hi): New signed unpacking patterns. (vec_unpacku_hi_v16qi, vec_unpacku_hi_v8hi, vec_unpacku_lo_v16qi): (vec_unpacku_lo_v8hi): New unsigned unpacking patterns. (vec_widen_umult_hi_v16qi, vec_widen_umult_lo_v16qi): (vec_widen_smult_hi_v16qi, vec_widen_smult_lo_v16qi): (vec_widen_umult_hi_v8hi, vec_widen_umult_lo_v8hi): (vec_widen_smult_hi_v8hi, vec_widen_smult_lo_v8hi): New widening multiplication patterns. * target.h (builtin_mul_widen_even, builtin_mul_widen_odd): New. * target-def.h (TARGET_VECTORIZE_BUILTIN_MUL_WIDEN_EVEN): (TARGET_VECTORIZE_BUILTIN_MUL_WIDEN_ODD): New. * config/rs6000/rs6000.c (rs6000_builtin_mul_widen_even): New. (rs6000_builtin_mul_widen_odd): New. (TARGET_VECTORIZE_BUILTIN_MUL_WIDEN_EVEN): Defined. (TARGET_VECTORIZE_BUILTIN_MUL_WIDEN_ODD): Defined. * tree-vectorizer.h (enum vect_relevant): New enum type. (_stmt_vec_info): Field relevant chaned from bool to enum vect_relevant. (STMT_VINFO_RELEVANT_P): Updated. (STMT_VINFO_RELEVANT): New. * tree-vectorizer.c (new_stmt_vec_info): Use STMT_VINFO_RELEVANT instead of STMT_VINFO_RELEVANT_P. * tree-vect-analyze.c (vect_mark_relevant, vect_stmt_relevant_p): Replace calls to STMT_VINFO_RELEVANT_P with STMT_VINFO_RELEVANT, and boolean variable with enum vect_relevant. (vect_mark_stmts_to_be_vectorized): Likewise + update documentation. * doc/tm.texi (TARGET_VECTORIZE_BUILTIN_MUL_WIDEN_EVEN): New. (TARGET_VECTORIZE_BUILTIN_MUL_WIDEN_ODD): New. 2006-11-08 Richard Henderson <rth@redhat.com> * config/i386/sse.md (vec_widen_umult_hi_v8hi, vec_widen_umult_lo_v8hi): New. (vec_widen_smult_hi_v4si, vec_widen_smult_lo_v4si, vec_widen_umult_hi_v4si, vec_widen_umult_lo_v4si): New. * config/i386/i386.c (ix86_expand_sse_unpack): New. * config/i386/i386-protos.h (ix86_expand_sse_unpack): New. * config/i386/sse.md (vec_unpacku_hi_v16qi, vec_unpacks_hi_v16qi, vec_unpacku_lo_v16qi, vec_unpacks_lo_v16qi, vec_unpacku_hi_v8hi, vec_unpacks_hi_v8hi, vec_unpacku_lo_v8hi, vec_unpacks_lo_v8hi, vec_unpacku_hi_v4si, vec_unpacks_hi_v4si, vec_unpacku_lo_v4si, vec_unpacks_lo_v4si): New. 2006-11-08 Dorit Nuzman <dorit@il.ibm.com> * tree-vect-transform.c (vectorizable_type_demotion): New function. (vect_transform_stmt): Add case for type_demotion_vec_info_type. (vect_analyze_operations): Call vectorizable_type_demotion. * tree-vectorizer.h (type_demotion_vec_info_type): New enum stmt_vec_info_type value. (vectorizable_type_demotion): New function declaration. * tree-vect-generic.c (expand_vector_operations_1): Consider correct mode. * tree.def (VEC_PACK_MOD_EXPR, VEC_PACK_SAT_EXPR): New tree-codes. * expr.c (expand_expr_real_1): Add case for VEC_PACK_MOD_EXPR and VEC_PACK_SAT_EXPR. * tree-iniline.c (estimate_num_insns_1): Likewise. * tree-pretty-print.c (dump_generic_node, op_prio): Likewise. * optabs.c (optab_for_tree_code): Likewise. * optabs.c (expand_binop): In case of vec_pack_*_optabs the mode compared against the predicate of the result is not 'mode' (the input to the function) but a mode with half the size of 'mode'. (init_optab): Initialize new optabs. * optabs.h (OTI_vec_pack_mod, OTI_vec_pack_ssat, OTI_vec_pack_usat): New optab indices. (vec_pack_mod_optab, vec_pack_ssat_optab, vec_pack_usat_optab): New optabs. * genopinit.c (vec_pack_mod_optab, vec_pack_ssat_optab): (vec_pack_usat_optab): Initialize new optabs. * doc/md.texi (vec_pack_mod, vec_pack_ssat, vec_pack_usat): New. * config/rs6000/altivec.md (vec_pack_mod_v8hi, vec_pack_mod_v4si): New. 2006-11-08 Richard Henderson <rth@redehat.com> * config/i386/sse.md (vec_pack_mod_v8hi, vec_pack_mod_v4si): (vec_pack_mod_v2di, vec_interleave_highv16qi, vec_interleave_lowv16qi): (vec_interleave_highv8hi, vec_interleave_lowv8hi): (vec_interleave_highv4si, vec_interleave_lowv4si): (vec_interleave_highv2di, vec_interleave_lowv2di): New. 2006-11-08 Dorit Nuzman <dorit@il.ibm.com> * tree-vect-transform.c (vectorizable_reduction): Support multiple datatypes. (vect_transform_stmt): Removed redundant code. 2006-11-08 Dorit Nuzman <dorit@il.ibm.com> * tree-vect-transform.c (vectorizable_operation): Support multiple datatypes. 2006-11-08 Dorit Nuzman <dorit@il.ibm.com> * tree-vect-transform.c (vect_align_data_ref): Removed. (vect_create_data_ref_ptr): Added additional argument - ptr_incr. Updated function documentation. Return the increment stmt in ptr_incr. (bump_vector_ptr): New function. (vect_get_vec_def_for_stmt_copy): New function. (vect_finish_stmt_generation): Create a stmt_info to newly created vector stmts. (vect_setup_realignment): Call vect_create_data_ref_ptr with additional argument. (vectorizable_reduction, vectorizable_assignment): Not supported yet if VF is greater than the number of elements that can fit in one vector word. (vectorizable_operation, vectorizable_condition): Likewise. (vectorizable_store, vectorizable_load): Support the case that the VF is greater than the number of elements that can fit in one vector word. (vect_transform_loop): Don't fail in case of multiple data-types. * tree-vect-analyze.c (vect_determine_vectorization_factor): Don't fail in case of multiple data-types; the smallest type determines the VF. (vect_analyze_data_ref_dependence): Don't record datarefs as same_align if they are of different sizes. (vect_update_misalignment_for_peel): Compare misalignments in terms of number of elements rather than number of bytes. (vect_enhance_data_refs_alignment): Fix/Add dump printouts. (vect_can_advance_ivs_p): Fix a dump printout From-SVN: r118577
2006-11-08 08:32:44 +01:00
# Return 1 if the target plus current options supports a vector
# demotion (packing) of shorts (to chars) and ints (to shorts)
# using modulo arithmetic, 0 otherwise.
#
# This won't change for different subtargets so cache the result.
proc check_effective_target_vect_pack_trunc { } {
global et_vect_pack_trunc
[multiple changes] 2006-11-08 Dorit Nuzman <dorit@il.ibm.com> * tree-vect-analyze.c (vect_mark_relevant, vect_stmt_relevant_p): Take enum argument instead of bool. (vect_analyze_operations): Call vectorizable_type_promotion. * tree-vectorizer.h (type_promotion_vec_info_type): New enum stmt_vec_info_type value. (supportable_widening_operation, vectorizable_type_promotion): New function declarations. * tree-vect-transform.c (vect_gen_widened_results_half): New function. (vectorizable_type_promotion): New function. (vect_transform_stmt): Call vectorizable_type_promotion. * tree-vect-analyze.c (supportable_widening_operation): New function. * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Add implementation. * tree-vect-generic.c (expand_vector_operations_1): Consider correct mode. * tree.def (VEC_WIDEN_MULT_HI_EXPR, VEC_WIDEN_MULT_LO_EXPR): (VEC_UNPACK_HI_EXPR, VEC_UNPACK_LO_EXPR): New tree-codes. * tree-inline.c (estimate_num_insns_1): Add cases for above new tree-codes. * tree-pretty-print.c (dump_generic_node, op_prio): Likewise. * expr.c (expand_expr_real_1): Likewise. * optabs.c (optab_for_tree_code): Likewise. (init_optabs): Initialize new optabs. * genopinit.c (vec_widen_umult_hi_optab, vec_widen_smult_hi_optab, vec_widen_smult_hi_optab, vec_widen_smult_lo_optab, vec_unpacks_hi_optab, vec_unpacks_lo_optab, vec_unpacku_hi_optab, vec_unpacku_lo_optab): Initialize new optabs. * optabs.h (OTI_vec_widen_umult_hi, OTI_vec_widen_umult_lo): (OTI_vec_widen_smult_h, OTI_vec_widen_smult_lo, OTI_vec_unpacks_hi, OTI_vec_unpacks_lo, OTI_vec_unpacku_hi, OTI_vec_unpacku_lo): New optab indices. (vec_widen_umult_hi_optab, vec_widen_umult_lo_optab): (vec_widen_smult_hi_optab, vec_widen_smult_lo_optab): (vec_unpacks_hi_optab, vec_unpacku_hi_optab, vec_unpacks_lo_optab): (vec_unpacku_lo_optab): New optabs. * doc/md.texi (vec_unpacks_hi, vec_unpacks_lo, vec_unpacku_hi): (vec_unpacku_lo, vec_widen_umult_hi, vec_widen_umult_lo): (vec_widen_smult_hi, vec_widen_smult_lo): New. * doc/c-tree.texi (VEC_LSHIFT_EXPR, VEC_RSHIFT_EXPR): (VEC_WIDEN_MULT_HI_EXPR, VEC_WIDEN_MULT_LO_EXPR, VEC_UNPACK_HI_EXPR): (VEC_UNPACK_LO_EXPR, VEC_PACK_MOD_EXPR, VEC_PACK_SAT_EXPR): New. * config/rs6000/altivec.md (UNSPEC_VMULWHUB, UNSPEC_VMULWLUB): (UNSPEC_VMULWHSB, UNSPEC_VMULWLSB, UNSPEC_VMULWHUH, UNSPEC_VMULWLUH): (UNSPEC_VMULWHSH, UNSPEC_VMULWLSH): New. (UNSPEC_VPERMSI, UNSPEC_VPERMHI): New. (vec_vperm_v8hiv4si, vec_vperm_v16qiv8hi): New patterns used to implement the unsigned unpacking patterns. (vec_unpacks_hi_v16qi, vec_unpacks_hi_v8hi, vec_unpacks_lo_v16qi): (vec_unpacks_lo_v8hi): New signed unpacking patterns. (vec_unpacku_hi_v16qi, vec_unpacku_hi_v8hi, vec_unpacku_lo_v16qi): (vec_unpacku_lo_v8hi): New unsigned unpacking patterns. (vec_widen_umult_hi_v16qi, vec_widen_umult_lo_v16qi): (vec_widen_smult_hi_v16qi, vec_widen_smult_lo_v16qi): (vec_widen_umult_hi_v8hi, vec_widen_umult_lo_v8hi): (vec_widen_smult_hi_v8hi, vec_widen_smult_lo_v8hi): New widening multiplication patterns. * target.h (builtin_mul_widen_even, builtin_mul_widen_odd): New. * target-def.h (TARGET_VECTORIZE_BUILTIN_MUL_WIDEN_EVEN): (TARGET_VECTORIZE_BUILTIN_MUL_WIDEN_ODD): New. * config/rs6000/rs6000.c (rs6000_builtin_mul_widen_even): New. (rs6000_builtin_mul_widen_odd): New. (TARGET_VECTORIZE_BUILTIN_MUL_WIDEN_EVEN): Defined. (TARGET_VECTORIZE_BUILTIN_MUL_WIDEN_ODD): Defined. * tree-vectorizer.h (enum vect_relevant): New enum type. (_stmt_vec_info): Field relevant chaned from bool to enum vect_relevant. (STMT_VINFO_RELEVANT_P): Updated. (STMT_VINFO_RELEVANT): New. * tree-vectorizer.c (new_stmt_vec_info): Use STMT_VINFO_RELEVANT instead of STMT_VINFO_RELEVANT_P. * tree-vect-analyze.c (vect_mark_relevant, vect_stmt_relevant_p): Replace calls to STMT_VINFO_RELEVANT_P with STMT_VINFO_RELEVANT, and boolean variable with enum vect_relevant. (vect_mark_stmts_to_be_vectorized): Likewise + update documentation. * doc/tm.texi (TARGET_VECTORIZE_BUILTIN_MUL_WIDEN_EVEN): New. (TARGET_VECTORIZE_BUILTIN_MUL_WIDEN_ODD): New. 2006-11-08 Richard Henderson <rth@redhat.com> * config/i386/sse.md (vec_widen_umult_hi_v8hi, vec_widen_umult_lo_v8hi): New. (vec_widen_smult_hi_v4si, vec_widen_smult_lo_v4si, vec_widen_umult_hi_v4si, vec_widen_umult_lo_v4si): New. * config/i386/i386.c (ix86_expand_sse_unpack): New. * config/i386/i386-protos.h (ix86_expand_sse_unpack): New. * config/i386/sse.md (vec_unpacku_hi_v16qi, vec_unpacks_hi_v16qi, vec_unpacku_lo_v16qi, vec_unpacks_lo_v16qi, vec_unpacku_hi_v8hi, vec_unpacks_hi_v8hi, vec_unpacku_lo_v8hi, vec_unpacks_lo_v8hi, vec_unpacku_hi_v4si, vec_unpacks_hi_v4si, vec_unpacku_lo_v4si, vec_unpacks_lo_v4si): New. 2006-11-08 Dorit Nuzman <dorit@il.ibm.com> * tree-vect-transform.c (vectorizable_type_demotion): New function. (vect_transform_stmt): Add case for type_demotion_vec_info_type. (vect_analyze_operations): Call vectorizable_type_demotion. * tree-vectorizer.h (type_demotion_vec_info_type): New enum stmt_vec_info_type value. (vectorizable_type_demotion): New function declaration. * tree-vect-generic.c (expand_vector_operations_1): Consider correct mode. * tree.def (VEC_PACK_MOD_EXPR, VEC_PACK_SAT_EXPR): New tree-codes. * expr.c (expand_expr_real_1): Add case for VEC_PACK_MOD_EXPR and VEC_PACK_SAT_EXPR. * tree-iniline.c (estimate_num_insns_1): Likewise. * tree-pretty-print.c (dump_generic_node, op_prio): Likewise. * optabs.c (optab_for_tree_code): Likewise. * optabs.c (expand_binop): In case of vec_pack_*_optabs the mode compared against the predicate of the result is not 'mode' (the input to the function) but a mode with half the size of 'mode'. (init_optab): Initialize new optabs. * optabs.h (OTI_vec_pack_mod, OTI_vec_pack_ssat, OTI_vec_pack_usat): New optab indices. (vec_pack_mod_optab, vec_pack_ssat_optab, vec_pack_usat_optab): New optabs. * genopinit.c (vec_pack_mod_optab, vec_pack_ssat_optab): (vec_pack_usat_optab): Initialize new optabs. * doc/md.texi (vec_pack_mod, vec_pack_ssat, vec_pack_usat): New. * config/rs6000/altivec.md (vec_pack_mod_v8hi, vec_pack_mod_v4si): New. 2006-11-08 Richard Henderson <rth@redehat.com> * config/i386/sse.md (vec_pack_mod_v8hi, vec_pack_mod_v4si): (vec_pack_mod_v2di, vec_interleave_highv16qi, vec_interleave_lowv16qi): (vec_interleave_highv8hi, vec_interleave_lowv8hi): (vec_interleave_highv4si, vec_interleave_lowv4si): (vec_interleave_highv2di, vec_interleave_lowv2di): New. 2006-11-08 Dorit Nuzman <dorit@il.ibm.com> * tree-vect-transform.c (vectorizable_reduction): Support multiple datatypes. (vect_transform_stmt): Removed redundant code. 2006-11-08 Dorit Nuzman <dorit@il.ibm.com> * tree-vect-transform.c (vectorizable_operation): Support multiple datatypes. 2006-11-08 Dorit Nuzman <dorit@il.ibm.com> * tree-vect-transform.c (vect_align_data_ref): Removed. (vect_create_data_ref_ptr): Added additional argument - ptr_incr. Updated function documentation. Return the increment stmt in ptr_incr. (bump_vector_ptr): New function. (vect_get_vec_def_for_stmt_copy): New function. (vect_finish_stmt_generation): Create a stmt_info to newly created vector stmts. (vect_setup_realignment): Call vect_create_data_ref_ptr with additional argument. (vectorizable_reduction, vectorizable_assignment): Not supported yet if VF is greater than the number of elements that can fit in one vector word. (vectorizable_operation, vectorizable_condition): Likewise. (vectorizable_store, vectorizable_load): Support the case that the VF is greater than the number of elements that can fit in one vector word. (vect_transform_loop): Don't fail in case of multiple data-types. * tree-vect-analyze.c (vect_determine_vectorization_factor): Don't fail in case of multiple data-types; the smallest type determines the VF. (vect_analyze_data_ref_dependence): Don't record datarefs as same_align if they are of different sizes. (vect_update_misalignment_for_peel): Compare misalignments in terms of number of elements rather than number of bytes. (vect_enhance_data_refs_alignment): Fix/Add dump printouts. (vect_can_advance_ivs_p): Fix a dump printout From-SVN: r118577
2006-11-08 08:32:44 +01:00
if [info exists et_vect_pack_trunc_saved] {
verbose "check_effective_target_vect_pack_trunc: using cached result" 2
[multiple changes] 2006-11-08 Dorit Nuzman <dorit@il.ibm.com> * tree-vect-analyze.c (vect_mark_relevant, vect_stmt_relevant_p): Take enum argument instead of bool. (vect_analyze_operations): Call vectorizable_type_promotion. * tree-vectorizer.h (type_promotion_vec_info_type): New enum stmt_vec_info_type value. (supportable_widening_operation, vectorizable_type_promotion): New function declarations. * tree-vect-transform.c (vect_gen_widened_results_half): New function. (vectorizable_type_promotion): New function. (vect_transform_stmt): Call vectorizable_type_promotion. * tree-vect-analyze.c (supportable_widening_operation): New function. * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Add implementation. * tree-vect-generic.c (expand_vector_operations_1): Consider correct mode. * tree.def (VEC_WIDEN_MULT_HI_EXPR, VEC_WIDEN_MULT_LO_EXPR): (VEC_UNPACK_HI_EXPR, VEC_UNPACK_LO_EXPR): New tree-codes. * tree-inline.c (estimate_num_insns_1): Add cases for above new tree-codes. * tree-pretty-print.c (dump_generic_node, op_prio): Likewise. * expr.c (expand_expr_real_1): Likewise. * optabs.c (optab_for_tree_code): Likewise. (init_optabs): Initialize new optabs. * genopinit.c (vec_widen_umult_hi_optab, vec_widen_smult_hi_optab, vec_widen_smult_hi_optab, vec_widen_smult_lo_optab, vec_unpacks_hi_optab, vec_unpacks_lo_optab, vec_unpacku_hi_optab, vec_unpacku_lo_optab): Initialize new optabs. * optabs.h (OTI_vec_widen_umult_hi, OTI_vec_widen_umult_lo): (OTI_vec_widen_smult_h, OTI_vec_widen_smult_lo, OTI_vec_unpacks_hi, OTI_vec_unpacks_lo, OTI_vec_unpacku_hi, OTI_vec_unpacku_lo): New optab indices. (vec_widen_umult_hi_optab, vec_widen_umult_lo_optab): (vec_widen_smult_hi_optab, vec_widen_smult_lo_optab): (vec_unpacks_hi_optab, vec_unpacku_hi_optab, vec_unpacks_lo_optab): (vec_unpacku_lo_optab): New optabs. * doc/md.texi (vec_unpacks_hi, vec_unpacks_lo, vec_unpacku_hi): (vec_unpacku_lo, vec_widen_umult_hi, vec_widen_umult_lo): (vec_widen_smult_hi, vec_widen_smult_lo): New. * doc/c-tree.texi (VEC_LSHIFT_EXPR, VEC_RSHIFT_EXPR): (VEC_WIDEN_MULT_HI_EXPR, VEC_WIDEN_MULT_LO_EXPR, VEC_UNPACK_HI_EXPR): (VEC_UNPACK_LO_EXPR, VEC_PACK_MOD_EXPR, VEC_PACK_SAT_EXPR): New. * config/rs6000/altivec.md (UNSPEC_VMULWHUB, UNSPEC_VMULWLUB): (UNSPEC_VMULWHSB, UNSPEC_VMULWLSB, UNSPEC_VMULWHUH, UNSPEC_VMULWLUH): (UNSPEC_VMULWHSH, UNSPEC_VMULWLSH): New. (UNSPEC_VPERMSI, UNSPEC_VPERMHI): New. (vec_vperm_v8hiv4si, vec_vperm_v16qiv8hi): New patterns used to implement the unsigned unpacking patterns. (vec_unpacks_hi_v16qi, vec_unpacks_hi_v8hi, vec_unpacks_lo_v16qi): (vec_unpacks_lo_v8hi): New signed unpacking patterns. (vec_unpacku_hi_v16qi, vec_unpacku_hi_v8hi, vec_unpacku_lo_v16qi): (vec_unpacku_lo_v8hi): New unsigned unpacking patterns. (vec_widen_umult_hi_v16qi, vec_widen_umult_lo_v16qi): (vec_widen_smult_hi_v16qi, vec_widen_smult_lo_v16qi): (vec_widen_umult_hi_v8hi, vec_widen_umult_lo_v8hi): (vec_widen_smult_hi_v8hi, vec_widen_smult_lo_v8hi): New widening multiplication patterns. * target.h (builtin_mul_widen_even, builtin_mul_widen_odd): New. * target-def.h (TARGET_VECTORIZE_BUILTIN_MUL_WIDEN_EVEN): (TARGET_VECTORIZE_BUILTIN_MUL_WIDEN_ODD): New. * config/rs6000/rs6000.c (rs6000_builtin_mul_widen_even): New. (rs6000_builtin_mul_widen_odd): New. (TARGET_VECTORIZE_BUILTIN_MUL_WIDEN_EVEN): Defined. (TARGET_VECTORIZE_BUILTIN_MUL_WIDEN_ODD): Defined. * tree-vectorizer.h (enum vect_relevant): New enum type. (_stmt_vec_info): Field relevant chaned from bool to enum vect_relevant. (STMT_VINFO_RELEVANT_P): Updated. (STMT_VINFO_RELEVANT): New. * tree-vectorizer.c (new_stmt_vec_info): Use STMT_VINFO_RELEVANT instead of STMT_VINFO_RELEVANT_P. * tree-vect-analyze.c (vect_mark_relevant, vect_stmt_relevant_p): Replace calls to STMT_VINFO_RELEVANT_P with STMT_VINFO_RELEVANT, and boolean variable with enum vect_relevant. (vect_mark_stmts_to_be_vectorized): Likewise + update documentation. * doc/tm.texi (TARGET_VECTORIZE_BUILTIN_MUL_WIDEN_EVEN): New. (TARGET_VECTORIZE_BUILTIN_MUL_WIDEN_ODD): New. 2006-11-08 Richard Henderson <rth@redhat.com> * config/i386/sse.md (vec_widen_umult_hi_v8hi, vec_widen_umult_lo_v8hi): New. (vec_widen_smult_hi_v4si, vec_widen_smult_lo_v4si, vec_widen_umult_hi_v4si, vec_widen_umult_lo_v4si): New. * config/i386/i386.c (ix86_expand_sse_unpack): New. * config/i386/i386-protos.h (ix86_expand_sse_unpack): New. * config/i386/sse.md (vec_unpacku_hi_v16qi, vec_unpacks_hi_v16qi, vec_unpacku_lo_v16qi, vec_unpacks_lo_v16qi, vec_unpacku_hi_v8hi, vec_unpacks_hi_v8hi, vec_unpacku_lo_v8hi, vec_unpacks_lo_v8hi, vec_unpacku_hi_v4si, vec_unpacks_hi_v4si, vec_unpacku_lo_v4si, vec_unpacks_lo_v4si): New. 2006-11-08 Dorit Nuzman <dorit@il.ibm.com> * tree-vect-transform.c (vectorizable_type_demotion): New function. (vect_transform_stmt): Add case for type_demotion_vec_info_type. (vect_analyze_operations): Call vectorizable_type_demotion. * tree-vectorizer.h (type_demotion_vec_info_type): New enum stmt_vec_info_type value. (vectorizable_type_demotion): New function declaration. * tree-vect-generic.c (expand_vector_operations_1): Consider correct mode. * tree.def (VEC_PACK_MOD_EXPR, VEC_PACK_SAT_EXPR): New tree-codes. * expr.c (expand_expr_real_1): Add case for VEC_PACK_MOD_EXPR and VEC_PACK_SAT_EXPR. * tree-iniline.c (estimate_num_insns_1): Likewise. * tree-pretty-print.c (dump_generic_node, op_prio): Likewise. * optabs.c (optab_for_tree_code): Likewise. * optabs.c (expand_binop): In case of vec_pack_*_optabs the mode compared against the predicate of the result is not 'mode' (the input to the function) but a mode with half the size of 'mode'. (init_optab): Initialize new optabs. * optabs.h (OTI_vec_pack_mod, OTI_vec_pack_ssat, OTI_vec_pack_usat): New optab indices. (vec_pack_mod_optab, vec_pack_ssat_optab, vec_pack_usat_optab): New optabs. * genopinit.c (vec_pack_mod_optab, vec_pack_ssat_optab): (vec_pack_usat_optab): Initialize new optabs. * doc/md.texi (vec_pack_mod, vec_pack_ssat, vec_pack_usat): New. * config/rs6000/altivec.md (vec_pack_mod_v8hi, vec_pack_mod_v4si): New. 2006-11-08 Richard Henderson <rth@redehat.com> * config/i386/sse.md (vec_pack_mod_v8hi, vec_pack_mod_v4si): (vec_pack_mod_v2di, vec_interleave_highv16qi, vec_interleave_lowv16qi): (vec_interleave_highv8hi, vec_interleave_lowv8hi): (vec_interleave_highv4si, vec_interleave_lowv4si): (vec_interleave_highv2di, vec_interleave_lowv2di): New. 2006-11-08 Dorit Nuzman <dorit@il.ibm.com> * tree-vect-transform.c (vectorizable_reduction): Support multiple datatypes. (vect_transform_stmt): Removed redundant code. 2006-11-08 Dorit Nuzman <dorit@il.ibm.com> * tree-vect-transform.c (vectorizable_operation): Support multiple datatypes. 2006-11-08 Dorit Nuzman <dorit@il.ibm.com> * tree-vect-transform.c (vect_align_data_ref): Removed. (vect_create_data_ref_ptr): Added additional argument - ptr_incr. Updated function documentation. Return the increment stmt in ptr_incr. (bump_vector_ptr): New function. (vect_get_vec_def_for_stmt_copy): New function. (vect_finish_stmt_generation): Create a stmt_info to newly created vector stmts. (vect_setup_realignment): Call vect_create_data_ref_ptr with additional argument. (vectorizable_reduction, vectorizable_assignment): Not supported yet if VF is greater than the number of elements that can fit in one vector word. (vectorizable_operation, vectorizable_condition): Likewise. (vectorizable_store, vectorizable_load): Support the case that the VF is greater than the number of elements that can fit in one vector word. (vect_transform_loop): Don't fail in case of multiple data-types. * tree-vect-analyze.c (vect_determine_vectorization_factor): Don't fail in case of multiple data-types; the smallest type determines the VF. (vect_analyze_data_ref_dependence): Don't record datarefs as same_align if they are of different sizes. (vect_update_misalignment_for_peel): Compare misalignments in terms of number of elements rather than number of bytes. (vect_enhance_data_refs_alignment): Fix/Add dump printouts. (vect_can_advance_ivs_p): Fix a dump printout From-SVN: r118577
2006-11-08 08:32:44 +01:00
} else {
set et_vect_pack_trunc_saved 0
if { ([istarget powerpc*-*-*] && ![istarget powerpc-*-linux*paired*])
[multiple changes] 2006-11-08 Dorit Nuzman <dorit@il.ibm.com> * tree-vect-analyze.c (vect_mark_relevant, vect_stmt_relevant_p): Take enum argument instead of bool. (vect_analyze_operations): Call vectorizable_type_promotion. * tree-vectorizer.h (type_promotion_vec_info_type): New enum stmt_vec_info_type value. (supportable_widening_operation, vectorizable_type_promotion): New function declarations. * tree-vect-transform.c (vect_gen_widened_results_half): New function. (vectorizable_type_promotion): New function. (vect_transform_stmt): Call vectorizable_type_promotion. * tree-vect-analyze.c (supportable_widening_operation): New function. * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Add implementation. * tree-vect-generic.c (expand_vector_operations_1): Consider correct mode. * tree.def (VEC_WIDEN_MULT_HI_EXPR, VEC_WIDEN_MULT_LO_EXPR): (VEC_UNPACK_HI_EXPR, VEC_UNPACK_LO_EXPR): New tree-codes. * tree-inline.c (estimate_num_insns_1): Add cases for above new tree-codes. * tree-pretty-print.c (dump_generic_node, op_prio): Likewise. * expr.c (expand_expr_real_1): Likewise. * optabs.c (optab_for_tree_code): Likewise. (init_optabs): Initialize new optabs. * genopinit.c (vec_widen_umult_hi_optab, vec_widen_smult_hi_optab, vec_widen_smult_hi_optab, vec_widen_smult_lo_optab, vec_unpacks_hi_optab, vec_unpacks_lo_optab, vec_unpacku_hi_optab, vec_unpacku_lo_optab): Initialize new optabs. * optabs.h (OTI_vec_widen_umult_hi, OTI_vec_widen_umult_lo): (OTI_vec_widen_smult_h, OTI_vec_widen_smult_lo, OTI_vec_unpacks_hi, OTI_vec_unpacks_lo, OTI_vec_unpacku_hi, OTI_vec_unpacku_lo): New optab indices. (vec_widen_umult_hi_optab, vec_widen_umult_lo_optab): (vec_widen_smult_hi_optab, vec_widen_smult_lo_optab): (vec_unpacks_hi_optab, vec_unpacku_hi_optab, vec_unpacks_lo_optab): (vec_unpacku_lo_optab): New optabs. * doc/md.texi (vec_unpacks_hi, vec_unpacks_lo, vec_unpacku_hi): (vec_unpacku_lo, vec_widen_umult_hi, vec_widen_umult_lo): (vec_widen_smult_hi, vec_widen_smult_lo): New. * doc/c-tree.texi (VEC_LSHIFT_EXPR, VEC_RSHIFT_EXPR): (VEC_WIDEN_MULT_HI_EXPR, VEC_WIDEN_MULT_LO_EXPR, VEC_UNPACK_HI_EXPR): (VEC_UNPACK_LO_EXPR, VEC_PACK_MOD_EXPR, VEC_PACK_SAT_EXPR): New. * config/rs6000/altivec.md (UNSPEC_VMULWHUB, UNSPEC_VMULWLUB): (UNSPEC_VMULWHSB, UNSPEC_VMULWLSB, UNSPEC_VMULWHUH, UNSPEC_VMULWLUH): (UNSPEC_VMULWHSH, UNSPEC_VMULWLSH): New. (UNSPEC_VPERMSI, UNSPEC_VPERMHI): New. (vec_vperm_v8hiv4si, vec_vperm_v16qiv8hi): New patterns used to implement the unsigned unpacking patterns. (vec_unpacks_hi_v16qi, vec_unpacks_hi_v8hi, vec_unpacks_lo_v16qi): (vec_unpacks_lo_v8hi): New signed unpacking patterns. (vec_unpacku_hi_v16qi, vec_unpacku_hi_v8hi, vec_unpacku_lo_v16qi): (vec_unpacku_lo_v8hi): New unsigned unpacking patterns. (vec_widen_umult_hi_v16qi, vec_widen_umult_lo_v16qi): (vec_widen_smult_hi_v16qi, vec_widen_smult_lo_v16qi): (vec_widen_umult_hi_v8hi, vec_widen_umult_lo_v8hi): (vec_widen_smult_hi_v8hi, vec_widen_smult_lo_v8hi): New widening multiplication patterns. * target.h (builtin_mul_widen_even, builtin_mul_widen_odd): New. * target-def.h (TARGET_VECTORIZE_BUILTIN_MUL_WIDEN_EVEN): (TARGET_VECTORIZE_BUILTIN_MUL_WIDEN_ODD): New. * config/rs6000/rs6000.c (rs6000_builtin_mul_widen_even): New. (rs6000_builtin_mul_widen_odd): New. (TARGET_VECTORIZE_BUILTIN_MUL_WIDEN_EVEN): Defined. (TARGET_VECTORIZE_BUILTIN_MUL_WIDEN_ODD): Defined. * tree-vectorizer.h (enum vect_relevant): New enum type. (_stmt_vec_info): Field relevant chaned from bool to enum vect_relevant. (STMT_VINFO_RELEVANT_P): Updated. (STMT_VINFO_RELEVANT): New. * tree-vectorizer.c (new_stmt_vec_info): Use STMT_VINFO_RELEVANT instead of STMT_VINFO_RELEVANT_P. * tree-vect-analyze.c (vect_mark_relevant, vect_stmt_relevant_p): Replace calls to STMT_VINFO_RELEVANT_P with STMT_VINFO_RELEVANT, and boolean variable with enum vect_relevant. (vect_mark_stmts_to_be_vectorized): Likewise + update documentation. * doc/tm.texi (TARGET_VECTORIZE_BUILTIN_MUL_WIDEN_EVEN): New. (TARGET_VECTORIZE_BUILTIN_MUL_WIDEN_ODD): New. 2006-11-08 Richard Henderson <rth@redhat.com> * config/i386/sse.md (vec_widen_umult_hi_v8hi, vec_widen_umult_lo_v8hi): New. (vec_widen_smult_hi_v4si, vec_widen_smult_lo_v4si, vec_widen_umult_hi_v4si, vec_widen_umult_lo_v4si): New. * config/i386/i386.c (ix86_expand_sse_unpack): New. * config/i386/i386-protos.h (ix86_expand_sse_unpack): New. * config/i386/sse.md (vec_unpacku_hi_v16qi, vec_unpacks_hi_v16qi, vec_unpacku_lo_v16qi, vec_unpacks_lo_v16qi, vec_unpacku_hi_v8hi, vec_unpacks_hi_v8hi, vec_unpacku_lo_v8hi, vec_unpacks_lo_v8hi, vec_unpacku_hi_v4si, vec_unpacks_hi_v4si, vec_unpacku_lo_v4si, vec_unpacks_lo_v4si): New. 2006-11-08 Dorit Nuzman <dorit@il.ibm.com> * tree-vect-transform.c (vectorizable_type_demotion): New function. (vect_transform_stmt): Add case for type_demotion_vec_info_type. (vect_analyze_operations): Call vectorizable_type_demotion. * tree-vectorizer.h (type_demotion_vec_info_type): New enum stmt_vec_info_type value. (vectorizable_type_demotion): New function declaration. * tree-vect-generic.c (expand_vector_operations_1): Consider correct mode. * tree.def (VEC_PACK_MOD_EXPR, VEC_PACK_SAT_EXPR): New tree-codes. * expr.c (expand_expr_real_1): Add case for VEC_PACK_MOD_EXPR and VEC_PACK_SAT_EXPR. * tree-iniline.c (estimate_num_insns_1): Likewise. * tree-pretty-print.c (dump_generic_node, op_prio): Likewise. * optabs.c (optab_for_tree_code): Likewise. * optabs.c (expand_binop): In case of vec_pack_*_optabs the mode compared against the predicate of the result is not 'mode' (the input to the function) but a mode with half the size of 'mode'. (init_optab): Initialize new optabs. * optabs.h (OTI_vec_pack_mod, OTI_vec_pack_ssat, OTI_vec_pack_usat): New optab indices. (vec_pack_mod_optab, vec_pack_ssat_optab, vec_pack_usat_optab): New optabs. * genopinit.c (vec_pack_mod_optab, vec_pack_ssat_optab): (vec_pack_usat_optab): Initialize new optabs. * doc/md.texi (vec_pack_mod, vec_pack_ssat, vec_pack_usat): New. * config/rs6000/altivec.md (vec_pack_mod_v8hi, vec_pack_mod_v4si): New. 2006-11-08 Richard Henderson <rth@redehat.com> * config/i386/sse.md (vec_pack_mod_v8hi, vec_pack_mod_v4si): (vec_pack_mod_v2di, vec_interleave_highv16qi, vec_interleave_lowv16qi): (vec_interleave_highv8hi, vec_interleave_lowv8hi): (vec_interleave_highv4si, vec_interleave_lowv4si): (vec_interleave_highv2di, vec_interleave_lowv2di): New. 2006-11-08 Dorit Nuzman <dorit@il.ibm.com> * tree-vect-transform.c (vectorizable_reduction): Support multiple datatypes. (vect_transform_stmt): Removed redundant code. 2006-11-08 Dorit Nuzman <dorit@il.ibm.com> * tree-vect-transform.c (vectorizable_operation): Support multiple datatypes. 2006-11-08 Dorit Nuzman <dorit@il.ibm.com> * tree-vect-transform.c (vect_align_data_ref): Removed. (vect_create_data_ref_ptr): Added additional argument - ptr_incr. Updated function documentation. Return the increment stmt in ptr_incr. (bump_vector_ptr): New function. (vect_get_vec_def_for_stmt_copy): New function. (vect_finish_stmt_generation): Create a stmt_info to newly created vector stmts. (vect_setup_realignment): Call vect_create_data_ref_ptr with additional argument. (vectorizable_reduction, vectorizable_assignment): Not supported yet if VF is greater than the number of elements that can fit in one vector word. (vectorizable_operation, vectorizable_condition): Likewise. (vectorizable_store, vectorizable_load): Support the case that the VF is greater than the number of elements that can fit in one vector word. (vect_transform_loop): Don't fail in case of multiple data-types. * tree-vect-analyze.c (vect_determine_vectorization_factor): Don't fail in case of multiple data-types; the smallest type determines the VF. (vect_analyze_data_ref_dependence): Don't record datarefs as same_align if they are of different sizes. (vect_update_misalignment_for_peel): Compare misalignments in terms of number of elements rather than number of bytes. (vect_enhance_data_refs_alignment): Fix/Add dump printouts. (vect_can_advance_ivs_p): Fix a dump printout From-SVN: r118577
2006-11-08 08:32:44 +01:00
|| [istarget i?86-*-*]
|| [istarget x86_64-*-*]
|| [istarget spu-*-*] } {
set et_vect_pack_trunc_saved 1
[multiple changes] 2006-11-08 Dorit Nuzman <dorit@il.ibm.com> * tree-vect-analyze.c (vect_mark_relevant, vect_stmt_relevant_p): Take enum argument instead of bool. (vect_analyze_operations): Call vectorizable_type_promotion. * tree-vectorizer.h (type_promotion_vec_info_type): New enum stmt_vec_info_type value. (supportable_widening_operation, vectorizable_type_promotion): New function declarations. * tree-vect-transform.c (vect_gen_widened_results_half): New function. (vectorizable_type_promotion): New function. (vect_transform_stmt): Call vectorizable_type_promotion. * tree-vect-analyze.c (supportable_widening_operation): New function. * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Add implementation. * tree-vect-generic.c (expand_vector_operations_1): Consider correct mode. * tree.def (VEC_WIDEN_MULT_HI_EXPR, VEC_WIDEN_MULT_LO_EXPR): (VEC_UNPACK_HI_EXPR, VEC_UNPACK_LO_EXPR): New tree-codes. * tree-inline.c (estimate_num_insns_1): Add cases for above new tree-codes. * tree-pretty-print.c (dump_generic_node, op_prio): Likewise. * expr.c (expand_expr_real_1): Likewise. * optabs.c (optab_for_tree_code): Likewise. (init_optabs): Initialize new optabs. * genopinit.c (vec_widen_umult_hi_optab, vec_widen_smult_hi_optab, vec_widen_smult_hi_optab, vec_widen_smult_lo_optab, vec_unpacks_hi_optab, vec_unpacks_lo_optab, vec_unpacku_hi_optab, vec_unpacku_lo_optab): Initialize new optabs. * optabs.h (OTI_vec_widen_umult_hi, OTI_vec_widen_umult_lo): (OTI_vec_widen_smult_h, OTI_vec_widen_smult_lo, OTI_vec_unpacks_hi, OTI_vec_unpacks_lo, OTI_vec_unpacku_hi, OTI_vec_unpacku_lo): New optab indices. (vec_widen_umult_hi_optab, vec_widen_umult_lo_optab): (vec_widen_smult_hi_optab, vec_widen_smult_lo_optab): (vec_unpacks_hi_optab, vec_unpacku_hi_optab, vec_unpacks_lo_optab): (vec_unpacku_lo_optab): New optabs. * doc/md.texi (vec_unpacks_hi, vec_unpacks_lo, vec_unpacku_hi): (vec_unpacku_lo, vec_widen_umult_hi, vec_widen_umult_lo): (vec_widen_smult_hi, vec_widen_smult_lo): New. * doc/c-tree.texi (VEC_LSHIFT_EXPR, VEC_RSHIFT_EXPR): (VEC_WIDEN_MULT_HI_EXPR, VEC_WIDEN_MULT_LO_EXPR, VEC_UNPACK_HI_EXPR): (VEC_UNPACK_LO_EXPR, VEC_PACK_MOD_EXPR, VEC_PACK_SAT_EXPR): New. * config/rs6000/altivec.md (UNSPEC_VMULWHUB, UNSPEC_VMULWLUB): (UNSPEC_VMULWHSB, UNSPEC_VMULWLSB, UNSPEC_VMULWHUH, UNSPEC_VMULWLUH): (UNSPEC_VMULWHSH, UNSPEC_VMULWLSH): New. (UNSPEC_VPERMSI, UNSPEC_VPERMHI): New. (vec_vperm_v8hiv4si, vec_vperm_v16qiv8hi): New patterns used to implement the unsigned unpacking patterns. (vec_unpacks_hi_v16qi, vec_unpacks_hi_v8hi, vec_unpacks_lo_v16qi): (vec_unpacks_lo_v8hi): New signed unpacking patterns. (vec_unpacku_hi_v16qi, vec_unpacku_hi_v8hi, vec_unpacku_lo_v16qi): (vec_unpacku_lo_v8hi): New unsigned unpacking patterns. (vec_widen_umult_hi_v16qi, vec_widen_umult_lo_v16qi): (vec_widen_smult_hi_v16qi, vec_widen_smult_lo_v16qi): (vec_widen_umult_hi_v8hi, vec_widen_umult_lo_v8hi): (vec_widen_smult_hi_v8hi, vec_widen_smult_lo_v8hi): New widening multiplication patterns. * target.h (builtin_mul_widen_even, builtin_mul_widen_odd): New. * target-def.h (TARGET_VECTORIZE_BUILTIN_MUL_WIDEN_EVEN): (TARGET_VECTORIZE_BUILTIN_MUL_WIDEN_ODD): New. * config/rs6000/rs6000.c (rs6000_builtin_mul_widen_even): New. (rs6000_builtin_mul_widen_odd): New. (TARGET_VECTORIZE_BUILTIN_MUL_WIDEN_EVEN): Defined. (TARGET_VECTORIZE_BUILTIN_MUL_WIDEN_ODD): Defined. * tree-vectorizer.h (enum vect_relevant): New enum type. (_stmt_vec_info): Field relevant chaned from bool to enum vect_relevant. (STMT_VINFO_RELEVANT_P): Updated. (STMT_VINFO_RELEVANT): New. * tree-vectorizer.c (new_stmt_vec_info): Use STMT_VINFO_RELEVANT instead of STMT_VINFO_RELEVANT_P. * tree-vect-analyze.c (vect_mark_relevant, vect_stmt_relevant_p): Replace calls to STMT_VINFO_RELEVANT_P with STMT_VINFO_RELEVANT, and boolean variable with enum vect_relevant. (vect_mark_stmts_to_be_vectorized): Likewise + update documentation. * doc/tm.texi (TARGET_VECTORIZE_BUILTIN_MUL_WIDEN_EVEN): New. (TARGET_VECTORIZE_BUILTIN_MUL_WIDEN_ODD): New. 2006-11-08 Richard Henderson <rth@redhat.com> * config/i386/sse.md (vec_widen_umult_hi_v8hi, vec_widen_umult_lo_v8hi): New. (vec_widen_smult_hi_v4si, vec_widen_smult_lo_v4si, vec_widen_umult_hi_v4si, vec_widen_umult_lo_v4si): New. * config/i386/i386.c (ix86_expand_sse_unpack): New. * config/i386/i386-protos.h (ix86_expand_sse_unpack): New. * config/i386/sse.md (vec_unpacku_hi_v16qi, vec_unpacks_hi_v16qi, vec_unpacku_lo_v16qi, vec_unpacks_lo_v16qi, vec_unpacku_hi_v8hi, vec_unpacks_hi_v8hi, vec_unpacku_lo_v8hi, vec_unpacks_lo_v8hi, vec_unpacku_hi_v4si, vec_unpacks_hi_v4si, vec_unpacku_lo_v4si, vec_unpacks_lo_v4si): New. 2006-11-08 Dorit Nuzman <dorit@il.ibm.com> * tree-vect-transform.c (vectorizable_type_demotion): New function. (vect_transform_stmt): Add case for type_demotion_vec_info_type. (vect_analyze_operations): Call vectorizable_type_demotion. * tree-vectorizer.h (type_demotion_vec_info_type): New enum stmt_vec_info_type value. (vectorizable_type_demotion): New function declaration. * tree-vect-generic.c (expand_vector_operations_1): Consider correct mode. * tree.def (VEC_PACK_MOD_EXPR, VEC_PACK_SAT_EXPR): New tree-codes. * expr.c (expand_expr_real_1): Add case for VEC_PACK_MOD_EXPR and VEC_PACK_SAT_EXPR. * tree-iniline.c (estimate_num_insns_1): Likewise. * tree-pretty-print.c (dump_generic_node, op_prio): Likewise. * optabs.c (optab_for_tree_code): Likewise. * optabs.c (expand_binop): In case of vec_pack_*_optabs the mode compared against the predicate of the result is not 'mode' (the input to the function) but a mode with half the size of 'mode'. (init_optab): Initialize new optabs. * optabs.h (OTI_vec_pack_mod, OTI_vec_pack_ssat, OTI_vec_pack_usat): New optab indices. (vec_pack_mod_optab, vec_pack_ssat_optab, vec_pack_usat_optab): New optabs. * genopinit.c (vec_pack_mod_optab, vec_pack_ssat_optab): (vec_pack_usat_optab): Initialize new optabs. * doc/md.texi (vec_pack_mod, vec_pack_ssat, vec_pack_usat): New. * config/rs6000/altivec.md (vec_pack_mod_v8hi, vec_pack_mod_v4si): New. 2006-11-08 Richard Henderson <rth@redehat.com> * config/i386/sse.md (vec_pack_mod_v8hi, vec_pack_mod_v4si): (vec_pack_mod_v2di, vec_interleave_highv16qi, vec_interleave_lowv16qi): (vec_interleave_highv8hi, vec_interleave_lowv8hi): (vec_interleave_highv4si, vec_interleave_lowv4si): (vec_interleave_highv2di, vec_interleave_lowv2di): New. 2006-11-08 Dorit Nuzman <dorit@il.ibm.com> * tree-vect-transform.c (vectorizable_reduction): Support multiple datatypes. (vect_transform_stmt): Removed redundant code. 2006-11-08 Dorit Nuzman <dorit@il.ibm.com> * tree-vect-transform.c (vectorizable_operation): Support multiple datatypes. 2006-11-08 Dorit Nuzman <dorit@il.ibm.com> * tree-vect-transform.c (vect_align_data_ref): Removed. (vect_create_data_ref_ptr): Added additional argument - ptr_incr. Updated function documentation. Return the increment stmt in ptr_incr. (bump_vector_ptr): New function. (vect_get_vec_def_for_stmt_copy): New function. (vect_finish_stmt_generation): Create a stmt_info to newly created vector stmts. (vect_setup_realignment): Call vect_create_data_ref_ptr with additional argument. (vectorizable_reduction, vectorizable_assignment): Not supported yet if VF is greater than the number of elements that can fit in one vector word. (vectorizable_operation, vectorizable_condition): Likewise. (vectorizable_store, vectorizable_load): Support the case that the VF is greater than the number of elements that can fit in one vector word. (vect_transform_loop): Don't fail in case of multiple data-types. * tree-vect-analyze.c (vect_determine_vectorization_factor): Don't fail in case of multiple data-types; the smallest type determines the VF. (vect_analyze_data_ref_dependence): Don't record datarefs as same_align if they are of different sizes. (vect_update_misalignment_for_peel): Compare misalignments in terms of number of elements rather than number of bytes. (vect_enhance_data_refs_alignment): Fix/Add dump printouts. (vect_can_advance_ivs_p): Fix a dump printout From-SVN: r118577
2006-11-08 08:32:44 +01:00
}
}
verbose "check_effective_target_vect_pack_trunc: returning $et_vect_pack_trunc_saved" 2
return $et_vect_pack_trunc_saved
[multiple changes] 2006-11-08 Dorit Nuzman <dorit@il.ibm.com> * tree-vect-analyze.c (vect_mark_relevant, vect_stmt_relevant_p): Take enum argument instead of bool. (vect_analyze_operations): Call vectorizable_type_promotion. * tree-vectorizer.h (type_promotion_vec_info_type): New enum stmt_vec_info_type value. (supportable_widening_operation, vectorizable_type_promotion): New function declarations. * tree-vect-transform.c (vect_gen_widened_results_half): New function. (vectorizable_type_promotion): New function. (vect_transform_stmt): Call vectorizable_type_promotion. * tree-vect-analyze.c (supportable_widening_operation): New function. * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Add implementation. * tree-vect-generic.c (expand_vector_operations_1): Consider correct mode. * tree.def (VEC_WIDEN_MULT_HI_EXPR, VEC_WIDEN_MULT_LO_EXPR): (VEC_UNPACK_HI_EXPR, VEC_UNPACK_LO_EXPR): New tree-codes. * tree-inline.c (estimate_num_insns_1): Add cases for above new tree-codes. * tree-pretty-print.c (dump_generic_node, op_prio): Likewise. * expr.c (expand_expr_real_1): Likewise. * optabs.c (optab_for_tree_code): Likewise. (init_optabs): Initialize new optabs. * genopinit.c (vec_widen_umult_hi_optab, vec_widen_smult_hi_optab, vec_widen_smult_hi_optab, vec_widen_smult_lo_optab, vec_unpacks_hi_optab, vec_unpacks_lo_optab, vec_unpacku_hi_optab, vec_unpacku_lo_optab): Initialize new optabs. * optabs.h (OTI_vec_widen_umult_hi, OTI_vec_widen_umult_lo): (OTI_vec_widen_smult_h, OTI_vec_widen_smult_lo, OTI_vec_unpacks_hi, OTI_vec_unpacks_lo, OTI_vec_unpacku_hi, OTI_vec_unpacku_lo): New optab indices. (vec_widen_umult_hi_optab, vec_widen_umult_lo_optab): (vec_widen_smult_hi_optab, vec_widen_smult_lo_optab): (vec_unpacks_hi_optab, vec_unpacku_hi_optab, vec_unpacks_lo_optab): (vec_unpacku_lo_optab): New optabs. * doc/md.texi (vec_unpacks_hi, vec_unpacks_lo, vec_unpacku_hi): (vec_unpacku_lo, vec_widen_umult_hi, vec_widen_umult_lo): (vec_widen_smult_hi, vec_widen_smult_lo): New. * doc/c-tree.texi (VEC_LSHIFT_EXPR, VEC_RSHIFT_EXPR): (VEC_WIDEN_MULT_HI_EXPR, VEC_WIDEN_MULT_LO_EXPR, VEC_UNPACK_HI_EXPR): (VEC_UNPACK_LO_EXPR, VEC_PACK_MOD_EXPR, VEC_PACK_SAT_EXPR): New. * config/rs6000/altivec.md (UNSPEC_VMULWHUB, UNSPEC_VMULWLUB): (UNSPEC_VMULWHSB, UNSPEC_VMULWLSB, UNSPEC_VMULWHUH, UNSPEC_VMULWLUH): (UNSPEC_VMULWHSH, UNSPEC_VMULWLSH): New. (UNSPEC_VPERMSI, UNSPEC_VPERMHI): New. (vec_vperm_v8hiv4si, vec_vperm_v16qiv8hi): New patterns used to implement the unsigned unpacking patterns. (vec_unpacks_hi_v16qi, vec_unpacks_hi_v8hi, vec_unpacks_lo_v16qi): (vec_unpacks_lo_v8hi): New signed unpacking patterns. (vec_unpacku_hi_v16qi, vec_unpacku_hi_v8hi, vec_unpacku_lo_v16qi): (vec_unpacku_lo_v8hi): New unsigned unpacking patterns. (vec_widen_umult_hi_v16qi, vec_widen_umult_lo_v16qi): (vec_widen_smult_hi_v16qi, vec_widen_smult_lo_v16qi): (vec_widen_umult_hi_v8hi, vec_widen_umult_lo_v8hi): (vec_widen_smult_hi_v8hi, vec_widen_smult_lo_v8hi): New widening multiplication patterns. * target.h (builtin_mul_widen_even, builtin_mul_widen_odd): New. * target-def.h (TARGET_VECTORIZE_BUILTIN_MUL_WIDEN_EVEN): (TARGET_VECTORIZE_BUILTIN_MUL_WIDEN_ODD): New. * config/rs6000/rs6000.c (rs6000_builtin_mul_widen_even): New. (rs6000_builtin_mul_widen_odd): New. (TARGET_VECTORIZE_BUILTIN_MUL_WIDEN_EVEN): Defined. (TARGET_VECTORIZE_BUILTIN_MUL_WIDEN_ODD): Defined. * tree-vectorizer.h (enum vect_relevant): New enum type. (_stmt_vec_info): Field relevant chaned from bool to enum vect_relevant. (STMT_VINFO_RELEVANT_P): Updated. (STMT_VINFO_RELEVANT): New. * tree-vectorizer.c (new_stmt_vec_info): Use STMT_VINFO_RELEVANT instead of STMT_VINFO_RELEVANT_P. * tree-vect-analyze.c (vect_mark_relevant, vect_stmt_relevant_p): Replace calls to STMT_VINFO_RELEVANT_P with STMT_VINFO_RELEVANT, and boolean variable with enum vect_relevant. (vect_mark_stmts_to_be_vectorized): Likewise + update documentation. * doc/tm.texi (TARGET_VECTORIZE_BUILTIN_MUL_WIDEN_EVEN): New. (TARGET_VECTORIZE_BUILTIN_MUL_WIDEN_ODD): New. 2006-11-08 Richard Henderson <rth@redhat.com> * config/i386/sse.md (vec_widen_umult_hi_v8hi, vec_widen_umult_lo_v8hi): New. (vec_widen_smult_hi_v4si, vec_widen_smult_lo_v4si, vec_widen_umult_hi_v4si, vec_widen_umult_lo_v4si): New. * config/i386/i386.c (ix86_expand_sse_unpack): New. * config/i386/i386-protos.h (ix86_expand_sse_unpack): New. * config/i386/sse.md (vec_unpacku_hi_v16qi, vec_unpacks_hi_v16qi, vec_unpacku_lo_v16qi, vec_unpacks_lo_v16qi, vec_unpacku_hi_v8hi, vec_unpacks_hi_v8hi, vec_unpacku_lo_v8hi, vec_unpacks_lo_v8hi, vec_unpacku_hi_v4si, vec_unpacks_hi_v4si, vec_unpacku_lo_v4si, vec_unpacks_lo_v4si): New. 2006-11-08 Dorit Nuzman <dorit@il.ibm.com> * tree-vect-transform.c (vectorizable_type_demotion): New function. (vect_transform_stmt): Add case for type_demotion_vec_info_type. (vect_analyze_operations): Call vectorizable_type_demotion. * tree-vectorizer.h (type_demotion_vec_info_type): New enum stmt_vec_info_type value. (vectorizable_type_demotion): New function declaration. * tree-vect-generic.c (expand_vector_operations_1): Consider correct mode. * tree.def (VEC_PACK_MOD_EXPR, VEC_PACK_SAT_EXPR): New tree-codes. * expr.c (expand_expr_real_1): Add case for VEC_PACK_MOD_EXPR and VEC_PACK_SAT_EXPR. * tree-iniline.c (estimate_num_insns_1): Likewise. * tree-pretty-print.c (dump_generic_node, op_prio): Likewise. * optabs.c (optab_for_tree_code): Likewise. * optabs.c (expand_binop): In case of vec_pack_*_optabs the mode compared against the predicate of the result is not 'mode' (the input to the function) but a mode with half the size of 'mode'. (init_optab): Initialize new optabs. * optabs.h (OTI_vec_pack_mod, OTI_vec_pack_ssat, OTI_vec_pack_usat): New optab indices. (vec_pack_mod_optab, vec_pack_ssat_optab, vec_pack_usat_optab): New optabs. * genopinit.c (vec_pack_mod_optab, vec_pack_ssat_optab): (vec_pack_usat_optab): Initialize new optabs. * doc/md.texi (vec_pack_mod, vec_pack_ssat, vec_pack_usat): New. * config/rs6000/altivec.md (vec_pack_mod_v8hi, vec_pack_mod_v4si): New. 2006-11-08 Richard Henderson <rth@redehat.com> * config/i386/sse.md (vec_pack_mod_v8hi, vec_pack_mod_v4si): (vec_pack_mod_v2di, vec_interleave_highv16qi, vec_interleave_lowv16qi): (vec_interleave_highv8hi, vec_interleave_lowv8hi): (vec_interleave_highv4si, vec_interleave_lowv4si): (vec_interleave_highv2di, vec_interleave_lowv2di): New. 2006-11-08 Dorit Nuzman <dorit@il.ibm.com> * tree-vect-transform.c (vectorizable_reduction): Support multiple datatypes. (vect_transform_stmt): Removed redundant code. 2006-11-08 Dorit Nuzman <dorit@il.ibm.com> * tree-vect-transform.c (vectorizable_operation): Support multiple datatypes. 2006-11-08 Dorit Nuzman <dorit@il.ibm.com> * tree-vect-transform.c (vect_align_data_ref): Removed. (vect_create_data_ref_ptr): Added additional argument - ptr_incr. Updated function documentation. Return the increment stmt in ptr_incr. (bump_vector_ptr): New function. (vect_get_vec_def_for_stmt_copy): New function. (vect_finish_stmt_generation): Create a stmt_info to newly created vector stmts. (vect_setup_realignment): Call vect_create_data_ref_ptr with additional argument. (vectorizable_reduction, vectorizable_assignment): Not supported yet if VF is greater than the number of elements that can fit in one vector word. (vectorizable_operation, vectorizable_condition): Likewise. (vectorizable_store, vectorizable_load): Support the case that the VF is greater than the number of elements that can fit in one vector word. (vect_transform_loop): Don't fail in case of multiple data-types. * tree-vect-analyze.c (vect_determine_vectorization_factor): Don't fail in case of multiple data-types; the smallest type determines the VF. (vect_analyze_data_ref_dependence): Don't record datarefs as same_align if they are of different sizes. (vect_update_misalignment_for_peel): Compare misalignments in terms of number of elements rather than number of bytes. (vect_enhance_data_refs_alignment): Fix/Add dump printouts. (vect_can_advance_ivs_p): Fix a dump printout From-SVN: r118577
2006-11-08 08:32:44 +01:00
}
# Return 1 if the target plus current options supports a vector
# promotion (unpacking) of chars (to shorts) and shorts (to ints), 0 otherwise.
#
# This won't change for different subtargets so cache the result.
proc check_effective_target_vect_unpack { } {
global et_vect_unpack
if [info exists et_vect_unpack_saved] {
verbose "check_effective_target_vect_unpack: using cached result" 2
} else {
set et_vect_unpack_saved 0
if { ([istarget powerpc*-*-*] && ![istarget powerpc-*paired*])
[multiple changes] 2006-11-08 Dorit Nuzman <dorit@il.ibm.com> * tree-vect-analyze.c (vect_mark_relevant, vect_stmt_relevant_p): Take enum argument instead of bool. (vect_analyze_operations): Call vectorizable_type_promotion. * tree-vectorizer.h (type_promotion_vec_info_type): New enum stmt_vec_info_type value. (supportable_widening_operation, vectorizable_type_promotion): New function declarations. * tree-vect-transform.c (vect_gen_widened_results_half): New function. (vectorizable_type_promotion): New function. (vect_transform_stmt): Call vectorizable_type_promotion. * tree-vect-analyze.c (supportable_widening_operation): New function. * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Add implementation. * tree-vect-generic.c (expand_vector_operations_1): Consider correct mode. * tree.def (VEC_WIDEN_MULT_HI_EXPR, VEC_WIDEN_MULT_LO_EXPR): (VEC_UNPACK_HI_EXPR, VEC_UNPACK_LO_EXPR): New tree-codes. * tree-inline.c (estimate_num_insns_1): Add cases for above new tree-codes. * tree-pretty-print.c (dump_generic_node, op_prio): Likewise. * expr.c (expand_expr_real_1): Likewise. * optabs.c (optab_for_tree_code): Likewise. (init_optabs): Initialize new optabs. * genopinit.c (vec_widen_umult_hi_optab, vec_widen_smult_hi_optab, vec_widen_smult_hi_optab, vec_widen_smult_lo_optab, vec_unpacks_hi_optab, vec_unpacks_lo_optab, vec_unpacku_hi_optab, vec_unpacku_lo_optab): Initialize new optabs. * optabs.h (OTI_vec_widen_umult_hi, OTI_vec_widen_umult_lo): (OTI_vec_widen_smult_h, OTI_vec_widen_smult_lo, OTI_vec_unpacks_hi, OTI_vec_unpacks_lo, OTI_vec_unpacku_hi, OTI_vec_unpacku_lo): New optab indices. (vec_widen_umult_hi_optab, vec_widen_umult_lo_optab): (vec_widen_smult_hi_optab, vec_widen_smult_lo_optab): (vec_unpacks_hi_optab, vec_unpacku_hi_optab, vec_unpacks_lo_optab): (vec_unpacku_lo_optab): New optabs. * doc/md.texi (vec_unpacks_hi, vec_unpacks_lo, vec_unpacku_hi): (vec_unpacku_lo, vec_widen_umult_hi, vec_widen_umult_lo): (vec_widen_smult_hi, vec_widen_smult_lo): New. * doc/c-tree.texi (VEC_LSHIFT_EXPR, VEC_RSHIFT_EXPR): (VEC_WIDEN_MULT_HI_EXPR, VEC_WIDEN_MULT_LO_EXPR, VEC_UNPACK_HI_EXPR): (VEC_UNPACK_LO_EXPR, VEC_PACK_MOD_EXPR, VEC_PACK_SAT_EXPR): New. * config/rs6000/altivec.md (UNSPEC_VMULWHUB, UNSPEC_VMULWLUB): (UNSPEC_VMULWHSB, UNSPEC_VMULWLSB, UNSPEC_VMULWHUH, UNSPEC_VMULWLUH): (UNSPEC_VMULWHSH, UNSPEC_VMULWLSH): New. (UNSPEC_VPERMSI, UNSPEC_VPERMHI): New. (vec_vperm_v8hiv4si, vec_vperm_v16qiv8hi): New patterns used to implement the unsigned unpacking patterns. (vec_unpacks_hi_v16qi, vec_unpacks_hi_v8hi, vec_unpacks_lo_v16qi): (vec_unpacks_lo_v8hi): New signed unpacking patterns. (vec_unpacku_hi_v16qi, vec_unpacku_hi_v8hi, vec_unpacku_lo_v16qi): (vec_unpacku_lo_v8hi): New unsigned unpacking patterns. (vec_widen_umult_hi_v16qi, vec_widen_umult_lo_v16qi): (vec_widen_smult_hi_v16qi, vec_widen_smult_lo_v16qi): (vec_widen_umult_hi_v8hi, vec_widen_umult_lo_v8hi): (vec_widen_smult_hi_v8hi, vec_widen_smult_lo_v8hi): New widening multiplication patterns. * target.h (builtin_mul_widen_even, builtin_mul_widen_odd): New. * target-def.h (TARGET_VECTORIZE_BUILTIN_MUL_WIDEN_EVEN): (TARGET_VECTORIZE_BUILTIN_MUL_WIDEN_ODD): New. * config/rs6000/rs6000.c (rs6000_builtin_mul_widen_even): New. (rs6000_builtin_mul_widen_odd): New. (TARGET_VECTORIZE_BUILTIN_MUL_WIDEN_EVEN): Defined. (TARGET_VECTORIZE_BUILTIN_MUL_WIDEN_ODD): Defined. * tree-vectorizer.h (enum vect_relevant): New enum type. (_stmt_vec_info): Field relevant chaned from bool to enum vect_relevant. (STMT_VINFO_RELEVANT_P): Updated. (STMT_VINFO_RELEVANT): New. * tree-vectorizer.c (new_stmt_vec_info): Use STMT_VINFO_RELEVANT instead of STMT_VINFO_RELEVANT_P. * tree-vect-analyze.c (vect_mark_relevant, vect_stmt_relevant_p): Replace calls to STMT_VINFO_RELEVANT_P with STMT_VINFO_RELEVANT, and boolean variable with enum vect_relevant. (vect_mark_stmts_to_be_vectorized): Likewise + update documentation. * doc/tm.texi (TARGET_VECTORIZE_BUILTIN_MUL_WIDEN_EVEN): New. (TARGET_VECTORIZE_BUILTIN_MUL_WIDEN_ODD): New. 2006-11-08 Richard Henderson <rth@redhat.com> * config/i386/sse.md (vec_widen_umult_hi_v8hi, vec_widen_umult_lo_v8hi): New. (vec_widen_smult_hi_v4si, vec_widen_smult_lo_v4si, vec_widen_umult_hi_v4si, vec_widen_umult_lo_v4si): New. * config/i386/i386.c (ix86_expand_sse_unpack): New. * config/i386/i386-protos.h (ix86_expand_sse_unpack): New. * config/i386/sse.md (vec_unpacku_hi_v16qi, vec_unpacks_hi_v16qi, vec_unpacku_lo_v16qi, vec_unpacks_lo_v16qi, vec_unpacku_hi_v8hi, vec_unpacks_hi_v8hi, vec_unpacku_lo_v8hi, vec_unpacks_lo_v8hi, vec_unpacku_hi_v4si, vec_unpacks_hi_v4si, vec_unpacku_lo_v4si, vec_unpacks_lo_v4si): New. 2006-11-08 Dorit Nuzman <dorit@il.ibm.com> * tree-vect-transform.c (vectorizable_type_demotion): New function. (vect_transform_stmt): Add case for type_demotion_vec_info_type. (vect_analyze_operations): Call vectorizable_type_demotion. * tree-vectorizer.h (type_demotion_vec_info_type): New enum stmt_vec_info_type value. (vectorizable_type_demotion): New function declaration. * tree-vect-generic.c (expand_vector_operations_1): Consider correct mode. * tree.def (VEC_PACK_MOD_EXPR, VEC_PACK_SAT_EXPR): New tree-codes. * expr.c (expand_expr_real_1): Add case for VEC_PACK_MOD_EXPR and VEC_PACK_SAT_EXPR. * tree-iniline.c (estimate_num_insns_1): Likewise. * tree-pretty-print.c (dump_generic_node, op_prio): Likewise. * optabs.c (optab_for_tree_code): Likewise. * optabs.c (expand_binop): In case of vec_pack_*_optabs the mode compared against the predicate of the result is not 'mode' (the input to the function) but a mode with half the size of 'mode'. (init_optab): Initialize new optabs. * optabs.h (OTI_vec_pack_mod, OTI_vec_pack_ssat, OTI_vec_pack_usat): New optab indices. (vec_pack_mod_optab, vec_pack_ssat_optab, vec_pack_usat_optab): New optabs. * genopinit.c (vec_pack_mod_optab, vec_pack_ssat_optab): (vec_pack_usat_optab): Initialize new optabs. * doc/md.texi (vec_pack_mod, vec_pack_ssat, vec_pack_usat): New. * config/rs6000/altivec.md (vec_pack_mod_v8hi, vec_pack_mod_v4si): New. 2006-11-08 Richard Henderson <rth@redehat.com> * config/i386/sse.md (vec_pack_mod_v8hi, vec_pack_mod_v4si): (vec_pack_mod_v2di, vec_interleave_highv16qi, vec_interleave_lowv16qi): (vec_interleave_highv8hi, vec_interleave_lowv8hi): (vec_interleave_highv4si, vec_interleave_lowv4si): (vec_interleave_highv2di, vec_interleave_lowv2di): New. 2006-11-08 Dorit Nuzman <dorit@il.ibm.com> * tree-vect-transform.c (vectorizable_reduction): Support multiple datatypes. (vect_transform_stmt): Removed redundant code. 2006-11-08 Dorit Nuzman <dorit@il.ibm.com> * tree-vect-transform.c (vectorizable_operation): Support multiple datatypes. 2006-11-08 Dorit Nuzman <dorit@il.ibm.com> * tree-vect-transform.c (vect_align_data_ref): Removed. (vect_create_data_ref_ptr): Added additional argument - ptr_incr. Updated function documentation. Return the increment stmt in ptr_incr. (bump_vector_ptr): New function. (vect_get_vec_def_for_stmt_copy): New function. (vect_finish_stmt_generation): Create a stmt_info to newly created vector stmts. (vect_setup_realignment): Call vect_create_data_ref_ptr with additional argument. (vectorizable_reduction, vectorizable_assignment): Not supported yet if VF is greater than the number of elements that can fit in one vector word. (vectorizable_operation, vectorizable_condition): Likewise. (vectorizable_store, vectorizable_load): Support the case that the VF is greater than the number of elements that can fit in one vector word. (vect_transform_loop): Don't fail in case of multiple data-types. * tree-vect-analyze.c (vect_determine_vectorization_factor): Don't fail in case of multiple data-types; the smallest type determines the VF. (vect_analyze_data_ref_dependence): Don't record datarefs as same_align if they are of different sizes. (vect_update_misalignment_for_peel): Compare misalignments in terms of number of elements rather than number of bytes. (vect_enhance_data_refs_alignment): Fix/Add dump printouts. (vect_can_advance_ivs_p): Fix a dump printout From-SVN: r118577
2006-11-08 08:32:44 +01:00
|| [istarget i?86-*-*]
|| [istarget x86_64-*-*]
|| [istarget spu-*-*] } {
[multiple changes] 2006-11-08 Dorit Nuzman <dorit@il.ibm.com> * tree-vect-analyze.c (vect_mark_relevant, vect_stmt_relevant_p): Take enum argument instead of bool. (vect_analyze_operations): Call vectorizable_type_promotion. * tree-vectorizer.h (type_promotion_vec_info_type): New enum stmt_vec_info_type value. (supportable_widening_operation, vectorizable_type_promotion): New function declarations. * tree-vect-transform.c (vect_gen_widened_results_half): New function. (vectorizable_type_promotion): New function. (vect_transform_stmt): Call vectorizable_type_promotion. * tree-vect-analyze.c (supportable_widening_operation): New function. * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Add implementation. * tree-vect-generic.c (expand_vector_operations_1): Consider correct mode. * tree.def (VEC_WIDEN_MULT_HI_EXPR, VEC_WIDEN_MULT_LO_EXPR): (VEC_UNPACK_HI_EXPR, VEC_UNPACK_LO_EXPR): New tree-codes. * tree-inline.c (estimate_num_insns_1): Add cases for above new tree-codes. * tree-pretty-print.c (dump_generic_node, op_prio): Likewise. * expr.c (expand_expr_real_1): Likewise. * optabs.c (optab_for_tree_code): Likewise. (init_optabs): Initialize new optabs. * genopinit.c (vec_widen_umult_hi_optab, vec_widen_smult_hi_optab, vec_widen_smult_hi_optab, vec_widen_smult_lo_optab, vec_unpacks_hi_optab, vec_unpacks_lo_optab, vec_unpacku_hi_optab, vec_unpacku_lo_optab): Initialize new optabs. * optabs.h (OTI_vec_widen_umult_hi, OTI_vec_widen_umult_lo): (OTI_vec_widen_smult_h, OTI_vec_widen_smult_lo, OTI_vec_unpacks_hi, OTI_vec_unpacks_lo, OTI_vec_unpacku_hi, OTI_vec_unpacku_lo): New optab indices. (vec_widen_umult_hi_optab, vec_widen_umult_lo_optab): (vec_widen_smult_hi_optab, vec_widen_smult_lo_optab): (vec_unpacks_hi_optab, vec_unpacku_hi_optab, vec_unpacks_lo_optab): (vec_unpacku_lo_optab): New optabs. * doc/md.texi (vec_unpacks_hi, vec_unpacks_lo, vec_unpacku_hi): (vec_unpacku_lo, vec_widen_umult_hi, vec_widen_umult_lo): (vec_widen_smult_hi, vec_widen_smult_lo): New. * doc/c-tree.texi (VEC_LSHIFT_EXPR, VEC_RSHIFT_EXPR): (VEC_WIDEN_MULT_HI_EXPR, VEC_WIDEN_MULT_LO_EXPR, VEC_UNPACK_HI_EXPR): (VEC_UNPACK_LO_EXPR, VEC_PACK_MOD_EXPR, VEC_PACK_SAT_EXPR): New. * config/rs6000/altivec.md (UNSPEC_VMULWHUB, UNSPEC_VMULWLUB): (UNSPEC_VMULWHSB, UNSPEC_VMULWLSB, UNSPEC_VMULWHUH, UNSPEC_VMULWLUH): (UNSPEC_VMULWHSH, UNSPEC_VMULWLSH): New. (UNSPEC_VPERMSI, UNSPEC_VPERMHI): New. (vec_vperm_v8hiv4si, vec_vperm_v16qiv8hi): New patterns used to implement the unsigned unpacking patterns. (vec_unpacks_hi_v16qi, vec_unpacks_hi_v8hi, vec_unpacks_lo_v16qi): (vec_unpacks_lo_v8hi): New signed unpacking patterns. (vec_unpacku_hi_v16qi, vec_unpacku_hi_v8hi, vec_unpacku_lo_v16qi): (vec_unpacku_lo_v8hi): New unsigned unpacking patterns. (vec_widen_umult_hi_v16qi, vec_widen_umult_lo_v16qi): (vec_widen_smult_hi_v16qi, vec_widen_smult_lo_v16qi): (vec_widen_umult_hi_v8hi, vec_widen_umult_lo_v8hi): (vec_widen_smult_hi_v8hi, vec_widen_smult_lo_v8hi): New widening multiplication patterns. * target.h (builtin_mul_widen_even, builtin_mul_widen_odd): New. * target-def.h (TARGET_VECTORIZE_BUILTIN_MUL_WIDEN_EVEN): (TARGET_VECTORIZE_BUILTIN_MUL_WIDEN_ODD): New. * config/rs6000/rs6000.c (rs6000_builtin_mul_widen_even): New. (rs6000_builtin_mul_widen_odd): New. (TARGET_VECTORIZE_BUILTIN_MUL_WIDEN_EVEN): Defined. (TARGET_VECTORIZE_BUILTIN_MUL_WIDEN_ODD): Defined. * tree-vectorizer.h (enum vect_relevant): New enum type. (_stmt_vec_info): Field relevant chaned from bool to enum vect_relevant. (STMT_VINFO_RELEVANT_P): Updated. (STMT_VINFO_RELEVANT): New. * tree-vectorizer.c (new_stmt_vec_info): Use STMT_VINFO_RELEVANT instead of STMT_VINFO_RELEVANT_P. * tree-vect-analyze.c (vect_mark_relevant, vect_stmt_relevant_p): Replace calls to STMT_VINFO_RELEVANT_P with STMT_VINFO_RELEVANT, and boolean variable with enum vect_relevant. (vect_mark_stmts_to_be_vectorized): Likewise + update documentation. * doc/tm.texi (TARGET_VECTORIZE_BUILTIN_MUL_WIDEN_EVEN): New. (TARGET_VECTORIZE_BUILTIN_MUL_WIDEN_ODD): New. 2006-11-08 Richard Henderson <rth@redhat.com> * config/i386/sse.md (vec_widen_umult_hi_v8hi, vec_widen_umult_lo_v8hi): New. (vec_widen_smult_hi_v4si, vec_widen_smult_lo_v4si, vec_widen_umult_hi_v4si, vec_widen_umult_lo_v4si): New. * config/i386/i386.c (ix86_expand_sse_unpack): New. * config/i386/i386-protos.h (ix86_expand_sse_unpack): New. * config/i386/sse.md (vec_unpacku_hi_v16qi, vec_unpacks_hi_v16qi, vec_unpacku_lo_v16qi, vec_unpacks_lo_v16qi, vec_unpacku_hi_v8hi, vec_unpacks_hi_v8hi, vec_unpacku_lo_v8hi, vec_unpacks_lo_v8hi, vec_unpacku_hi_v4si, vec_unpacks_hi_v4si, vec_unpacku_lo_v4si, vec_unpacks_lo_v4si): New. 2006-11-08 Dorit Nuzman <dorit@il.ibm.com> * tree-vect-transform.c (vectorizable_type_demotion): New function. (vect_transform_stmt): Add case for type_demotion_vec_info_type. (vect_analyze_operations): Call vectorizable_type_demotion. * tree-vectorizer.h (type_demotion_vec_info_type): New enum stmt_vec_info_type value. (vectorizable_type_demotion): New function declaration. * tree-vect-generic.c (expand_vector_operations_1): Consider correct mode. * tree.def (VEC_PACK_MOD_EXPR, VEC_PACK_SAT_EXPR): New tree-codes. * expr.c (expand_expr_real_1): Add case for VEC_PACK_MOD_EXPR and VEC_PACK_SAT_EXPR. * tree-iniline.c (estimate_num_insns_1): Likewise. * tree-pretty-print.c (dump_generic_node, op_prio): Likewise. * optabs.c (optab_for_tree_code): Likewise. * optabs.c (expand_binop): In case of vec_pack_*_optabs the mode compared against the predicate of the result is not 'mode' (the input to the function) but a mode with half the size of 'mode'. (init_optab): Initialize new optabs. * optabs.h (OTI_vec_pack_mod, OTI_vec_pack_ssat, OTI_vec_pack_usat): New optab indices. (vec_pack_mod_optab, vec_pack_ssat_optab, vec_pack_usat_optab): New optabs. * genopinit.c (vec_pack_mod_optab, vec_pack_ssat_optab): (vec_pack_usat_optab): Initialize new optabs. * doc/md.texi (vec_pack_mod, vec_pack_ssat, vec_pack_usat): New. * config/rs6000/altivec.md (vec_pack_mod_v8hi, vec_pack_mod_v4si): New. 2006-11-08 Richard Henderson <rth@redehat.com> * config/i386/sse.md (vec_pack_mod_v8hi, vec_pack_mod_v4si): (vec_pack_mod_v2di, vec_interleave_highv16qi, vec_interleave_lowv16qi): (vec_interleave_highv8hi, vec_interleave_lowv8hi): (vec_interleave_highv4si, vec_interleave_lowv4si): (vec_interleave_highv2di, vec_interleave_lowv2di): New. 2006-11-08 Dorit Nuzman <dorit@il.ibm.com> * tree-vect-transform.c (vectorizable_reduction): Support multiple datatypes. (vect_transform_stmt): Removed redundant code. 2006-11-08 Dorit Nuzman <dorit@il.ibm.com> * tree-vect-transform.c (vectorizable_operation): Support multiple datatypes. 2006-11-08 Dorit Nuzman <dorit@il.ibm.com> * tree-vect-transform.c (vect_align_data_ref): Removed. (vect_create_data_ref_ptr): Added additional argument - ptr_incr. Updated function documentation. Return the increment stmt in ptr_incr. (bump_vector_ptr): New function. (vect_get_vec_def_for_stmt_copy): New function. (vect_finish_stmt_generation): Create a stmt_info to newly created vector stmts. (vect_setup_realignment): Call vect_create_data_ref_ptr with additional argument. (vectorizable_reduction, vectorizable_assignment): Not supported yet if VF is greater than the number of elements that can fit in one vector word. (vectorizable_operation, vectorizable_condition): Likewise. (vectorizable_store, vectorizable_load): Support the case that the VF is greater than the number of elements that can fit in one vector word. (vect_transform_loop): Don't fail in case of multiple data-types. * tree-vect-analyze.c (vect_determine_vectorization_factor): Don't fail in case of multiple data-types; the smallest type determines the VF. (vect_analyze_data_ref_dependence): Don't record datarefs as same_align if they are of different sizes. (vect_update_misalignment_for_peel): Compare misalignments in terms of number of elements rather than number of bytes. (vect_enhance_data_refs_alignment): Fix/Add dump printouts. (vect_can_advance_ivs_p): Fix a dump printout From-SVN: r118577
2006-11-08 08:32:44 +01:00
set et_vect_unpack_saved 1
}
}
verbose "check_effective_target_vect_unpack: returning $et_vect_unpack_saved" 2
return $et_vect_unpack_saved
}
# Return 1 if the target plus current options does not guarantee
# that its STACK_BOUNDARY is >= the reguired vector alignment.
#
# This won't change for different subtargets so cache the result.
proc check_effective_target_unaligned_stack { } {
global et_unaligned_stack_saved
if [info exists et_unaligned_stack_saved] {
verbose "check_effective_target_unaligned_stack: using cached result" 2
} else {
set et_unaligned_stack_saved 0
}
verbose "check_effective_target_unaligned_stack: returning $et_unaligned_stack_saved" 2
return $et_unaligned_stack_saved
}
# Return 1 if the target plus current options does not support a vector
# alignment mechanism, 0 otherwise.
#
# This won't change for different subtargets so cache the result.
proc check_effective_target_vect_no_align { } {
global et_vect_no_align_saved
if [info exists et_vect_no_align_saved] {
verbose "check_effective_target_vect_no_align: using cached result" 2
} else {
set et_vect_no_align_saved 0
if { [istarget mipsisa64*-*-*]
ia64.c (TARGET_VECTOR_MODE_SUPPORTED_P): New. * config/ia64/ia64.c (TARGET_VECTOR_MODE_SUPPORTED_P): New. (ia64_const_ok_for_letter_p): New. (ia64_const_double_ok_for_letter_p): New. (ia64_extra_constraint): New. (ia64_expand_vecint_compare): New. (ia64_expand_vcondu_v2si): New. (ia64_expand_vecint_cmov): New. (ia64_expand_vecint_minmax): New. (ia64_print_operand): Add 'v'. (ia64_preferred_reload_class): New. (ia64_vector_mode_supported_p): New. * config/ia64/ia64.h (UNITS_PER_SIMD_WORD): New. (PREFERRED_RELOAD_CLASS): Move to function. (CONST_OK_FOR_LETTER_P): Move to function. (CONST_DOUBLE_OK_FOR_LETTER_P): Move to function. (CONSTRAINT_OK_FOR_Q, CONSTRAINT_OK_FOR_R): Remove. (CONSTRAINT_OK_FOR_S, CONSTRAINT_OK_FOR_T): Remove. (EXTRA_CONSTRAINT): Move to function. * config/ia64/ia64.md: Include vect.md. (itanium_class): Add mmalua. (type): Handle it. * config/ia64/itanium1.md (1_mmalua): New. Add it to bypasses. (1b_mmalua): New. * config/ia64/itanium2.md (2_mmalua, 2b_mmalua): Similarly. * config/ia64/predicates.md (gr_reg_or_0_operand): Accept any CONST0_RTX. (const_int_2bit_operand): New. (fr_reg_or_0_operand): New. * config/ia64/ia64-modes.def: Add vector modes. * config/ia64/ia64-protos.h: Update. * config/ia64/vect.md: New file. * gcc.dg/vect/vect.exp: Enable for ia64. * lib/target-supports.exp (check_effective_target_vect_int): Likewise. (check_effective_target_vect_float): Likewise. (check_effective_target_vect_no_align): Likewise. * gcc.dg/vect/vect-30.c: XFAIL for vect_no_align. * gcc.dg/vect/vect-8.c: Likewise. From-SVN: r92862
2005-01-03 20:59:13 +01:00
|| [istarget sparc*-*-*]
|| [istarget ia64-*-*]
|| [check_effective_target_arm32] } {
set et_vect_no_align_saved 1
}
}
verbose "check_effective_target_vect_no_align: returning $et_vect_no_align_saved" 2
return $et_vect_no_align_saved
}
# Return 1 if the target supports a vector misalign access, 0 otherwise.
#
# This won't change for different subtargets so cache the result.
proc check_effective_target_vect_hw_misalign { } {
global et_vect_hw_misalign_saved
if [info exists et_vect_hw_misalign_saved] {
verbose "check_effective_target_vect_hw_misalign: using cached result" 2
} else {
set et_vect_hw_misalign_saved 0
if { ([istarget x86_64-*-*]
|| [istarget i?86-*-*]) } {
set et_vect_hw_misalign_saved 1
}
}
verbose "check_effective_target_vect_hw_misalign: returning $et_vect_hw_misalign_saved" 2
return $et_vect_hw_misalign_saved
}
# Return 1 if arrays are aligned to the vector alignment
# boundary, 0 otherwise.
#
# This won't change for different subtargets so cache the result.
proc check_effective_target_vect_aligned_arrays { } {
global et_vect_aligned_arrays
if [info exists et_vect_aligned_arrays_saved] {
verbose "check_effective_target_vect_aligned_arrays: using cached result" 2
} else {
set et_vect_aligned_arrays_saved 0
vect-ifcvt-5.c: Require vect_int. * gcc.dg/vect/vect-ifcvt-5.c: Require vect_int. * gcc.dg/vect/vect-16.c: Fix comment. * gcc.dg/vect/pr33369.c: Require vect_int. * gcc.dg/vect/slp-33.c: Add spaces. * gcc.dg/vect/no-scevccp-outer-18.c: Enable only for vect_interleave targets. * gcc.dg/vect/vect-ifcvt-6.c: Require vect_int. * gcc.dg/vect/no-scevccp-outer-19.c: Enable only for vect_unpack targets. * gcc.dg/vect/vect-ifcvt-7.c: Require vect_int. * gcc.dg/vect/vect-strided-store-u16-i4.c: Add vect_unpack to targets. * gcc.dg/vect/slp-10.c: Add spaces. * gcc.dg/vect/no-scevccp-outer-21.c: Enable only for vect_pack_trunc targets. * gcc.dg/vect/slp-36.c: Require vect_int. * gcc.dg/vect/vect-ifcvt-9.c, gcc.dg/vect/vect-strided-store-u32-i2.c, gcc.dg/vect/vect-ifcvt-2.c, gcc.dg/vect/vect-ifcvt-3.c, gcc.dg/vect/vect-82.c, gcc.dg/vect/vect-83.c: Likewise. * gcc.dg/vect/no-scevccp-outer-16.c: Enable only for vect_unpack targets. * gcc.dg/vect/no-scevccp-outer-17.c: Likewise. * gcc.dg/vect/pr25413.c: Use vector alignment_reachable_for_64bit instead of vector_alignment_reachable_for_double. * lib/target-supports.exp (vect_aligned_arrays): Add spu-*-*. (natural_alignment): Split into... (natural_alignment_32, natural_alignment_64): New. (vector_alignment_reachable): Depend on natural_alignment_32. (vector_alignment_reachable_for_double): Rename to ... (vector_alignment_reachable_for_64bit): And depend on natural_alignment_64. Co-Authored-By: Revital Eres <eres@il.ibm.com> From-SVN: r129529
2007-10-21 12:01:16 +02:00
if { (([istarget x86_64-*-*]
|| [istarget i?86-*-*]) && [is-effective-target lp64])
|| [istarget spu-*-*] } {
set et_vect_aligned_arrays_saved 1
}
}
verbose "check_effective_target_vect_aligned_arrays: returning $et_vect_aligned_arrays_saved" 2
return $et_vect_aligned_arrays_saved
}
vect-ifcvt-5.c: Require vect_int. * gcc.dg/vect/vect-ifcvt-5.c: Require vect_int. * gcc.dg/vect/vect-16.c: Fix comment. * gcc.dg/vect/pr33369.c: Require vect_int. * gcc.dg/vect/slp-33.c: Add spaces. * gcc.dg/vect/no-scevccp-outer-18.c: Enable only for vect_interleave targets. * gcc.dg/vect/vect-ifcvt-6.c: Require vect_int. * gcc.dg/vect/no-scevccp-outer-19.c: Enable only for vect_unpack targets. * gcc.dg/vect/vect-ifcvt-7.c: Require vect_int. * gcc.dg/vect/vect-strided-store-u16-i4.c: Add vect_unpack to targets. * gcc.dg/vect/slp-10.c: Add spaces. * gcc.dg/vect/no-scevccp-outer-21.c: Enable only for vect_pack_trunc targets. * gcc.dg/vect/slp-36.c: Require vect_int. * gcc.dg/vect/vect-ifcvt-9.c, gcc.dg/vect/vect-strided-store-u32-i2.c, gcc.dg/vect/vect-ifcvt-2.c, gcc.dg/vect/vect-ifcvt-3.c, gcc.dg/vect/vect-82.c, gcc.dg/vect/vect-83.c: Likewise. * gcc.dg/vect/no-scevccp-outer-16.c: Enable only for vect_unpack targets. * gcc.dg/vect/no-scevccp-outer-17.c: Likewise. * gcc.dg/vect/pr25413.c: Use vector alignment_reachable_for_64bit instead of vector_alignment_reachable_for_double. * lib/target-supports.exp (vect_aligned_arrays): Add spu-*-*. (natural_alignment): Split into... (natural_alignment_32, natural_alignment_64): New. (vector_alignment_reachable): Depend on natural_alignment_32. (vector_alignment_reachable_for_double): Rename to ... (vector_alignment_reachable_for_64bit): And depend on natural_alignment_64. Co-Authored-By: Revital Eres <eres@il.ibm.com> From-SVN: r129529
2007-10-21 12:01:16 +02:00
# Return 1 if types of size 32 bit or less are naturally aligned
# (aligned to their type-size), 0 otherwise.
#
# This won't change for different subtargets so cache the result.
proc check_effective_target_natural_alignment_32 { } {
global et_natural_alignment_32
if [info exists et_natural_alignment_32_saved] {
verbose "check_effective_target_natural_alignment_32: using cached result" 2
} else {
# FIXME: 32bit powerpc: guaranteed only if MASK_ALIGN_NATURAL/POWER.
set et_natural_alignment_32_saved 1
if { ([istarget *-*-darwin*] && [is-effective-target lp64]) } {
set et_natural_alignment_32_saved 0
}
}
verbose "check_effective_target_natural_alignment_32: returning $et_natural_alignment_32_saved" 2
return $et_natural_alignment_32_saved
}
# Return 1 if types of size 64 bit or less are naturally aligned (aligned to their
# type-size), 0 otherwise.
#
# This won't change for different subtargets so cache the result.
vect-ifcvt-5.c: Require vect_int. * gcc.dg/vect/vect-ifcvt-5.c: Require vect_int. * gcc.dg/vect/vect-16.c: Fix comment. * gcc.dg/vect/pr33369.c: Require vect_int. * gcc.dg/vect/slp-33.c: Add spaces. * gcc.dg/vect/no-scevccp-outer-18.c: Enable only for vect_interleave targets. * gcc.dg/vect/vect-ifcvt-6.c: Require vect_int. * gcc.dg/vect/no-scevccp-outer-19.c: Enable only for vect_unpack targets. * gcc.dg/vect/vect-ifcvt-7.c: Require vect_int. * gcc.dg/vect/vect-strided-store-u16-i4.c: Add vect_unpack to targets. * gcc.dg/vect/slp-10.c: Add spaces. * gcc.dg/vect/no-scevccp-outer-21.c: Enable only for vect_pack_trunc targets. * gcc.dg/vect/slp-36.c: Require vect_int. * gcc.dg/vect/vect-ifcvt-9.c, gcc.dg/vect/vect-strided-store-u32-i2.c, gcc.dg/vect/vect-ifcvt-2.c, gcc.dg/vect/vect-ifcvt-3.c, gcc.dg/vect/vect-82.c, gcc.dg/vect/vect-83.c: Likewise. * gcc.dg/vect/no-scevccp-outer-16.c: Enable only for vect_unpack targets. * gcc.dg/vect/no-scevccp-outer-17.c: Likewise. * gcc.dg/vect/pr25413.c: Use vector alignment_reachable_for_64bit instead of vector_alignment_reachable_for_double. * lib/target-supports.exp (vect_aligned_arrays): Add spu-*-*. (natural_alignment): Split into... (natural_alignment_32, natural_alignment_64): New. (vector_alignment_reachable): Depend on natural_alignment_32. (vector_alignment_reachable_for_double): Rename to ... (vector_alignment_reachable_for_64bit): And depend on natural_alignment_64. Co-Authored-By: Revital Eres <eres@il.ibm.com> From-SVN: r129529
2007-10-21 12:01:16 +02:00
proc check_effective_target_natural_alignment_64 { } {
global et_natural_alignment_64
vect-ifcvt-5.c: Require vect_int. * gcc.dg/vect/vect-ifcvt-5.c: Require vect_int. * gcc.dg/vect/vect-16.c: Fix comment. * gcc.dg/vect/pr33369.c: Require vect_int. * gcc.dg/vect/slp-33.c: Add spaces. * gcc.dg/vect/no-scevccp-outer-18.c: Enable only for vect_interleave targets. * gcc.dg/vect/vect-ifcvt-6.c: Require vect_int. * gcc.dg/vect/no-scevccp-outer-19.c: Enable only for vect_unpack targets. * gcc.dg/vect/vect-ifcvt-7.c: Require vect_int. * gcc.dg/vect/vect-strided-store-u16-i4.c: Add vect_unpack to targets. * gcc.dg/vect/slp-10.c: Add spaces. * gcc.dg/vect/no-scevccp-outer-21.c: Enable only for vect_pack_trunc targets. * gcc.dg/vect/slp-36.c: Require vect_int. * gcc.dg/vect/vect-ifcvt-9.c, gcc.dg/vect/vect-strided-store-u32-i2.c, gcc.dg/vect/vect-ifcvt-2.c, gcc.dg/vect/vect-ifcvt-3.c, gcc.dg/vect/vect-82.c, gcc.dg/vect/vect-83.c: Likewise. * gcc.dg/vect/no-scevccp-outer-16.c: Enable only for vect_unpack targets. * gcc.dg/vect/no-scevccp-outer-17.c: Likewise. * gcc.dg/vect/pr25413.c: Use vector alignment_reachable_for_64bit instead of vector_alignment_reachable_for_double. * lib/target-supports.exp (vect_aligned_arrays): Add spu-*-*. (natural_alignment): Split into... (natural_alignment_32, natural_alignment_64): New. (vector_alignment_reachable): Depend on natural_alignment_32. (vector_alignment_reachable_for_double): Rename to ... (vector_alignment_reachable_for_64bit): And depend on natural_alignment_64. Co-Authored-By: Revital Eres <eres@il.ibm.com> From-SVN: r129529
2007-10-21 12:01:16 +02:00
if [info exists et_natural_alignment_64_saved] {
verbose "check_effective_target_natural_alignment_64: using cached result" 2
} else {
vect-ifcvt-5.c: Require vect_int. * gcc.dg/vect/vect-ifcvt-5.c: Require vect_int. * gcc.dg/vect/vect-16.c: Fix comment. * gcc.dg/vect/pr33369.c: Require vect_int. * gcc.dg/vect/slp-33.c: Add spaces. * gcc.dg/vect/no-scevccp-outer-18.c: Enable only for vect_interleave targets. * gcc.dg/vect/vect-ifcvt-6.c: Require vect_int. * gcc.dg/vect/no-scevccp-outer-19.c: Enable only for vect_unpack targets. * gcc.dg/vect/vect-ifcvt-7.c: Require vect_int. * gcc.dg/vect/vect-strided-store-u16-i4.c: Add vect_unpack to targets. * gcc.dg/vect/slp-10.c: Add spaces. * gcc.dg/vect/no-scevccp-outer-21.c: Enable only for vect_pack_trunc targets. * gcc.dg/vect/slp-36.c: Require vect_int. * gcc.dg/vect/vect-ifcvt-9.c, gcc.dg/vect/vect-strided-store-u32-i2.c, gcc.dg/vect/vect-ifcvt-2.c, gcc.dg/vect/vect-ifcvt-3.c, gcc.dg/vect/vect-82.c, gcc.dg/vect/vect-83.c: Likewise. * gcc.dg/vect/no-scevccp-outer-16.c: Enable only for vect_unpack targets. * gcc.dg/vect/no-scevccp-outer-17.c: Likewise. * gcc.dg/vect/pr25413.c: Use vector alignment_reachable_for_64bit instead of vector_alignment_reachable_for_double. * lib/target-supports.exp (vect_aligned_arrays): Add spu-*-*. (natural_alignment): Split into... (natural_alignment_32, natural_alignment_64): New. (vector_alignment_reachable): Depend on natural_alignment_32. (vector_alignment_reachable_for_double): Rename to ... (vector_alignment_reachable_for_64bit): And depend on natural_alignment_64. Co-Authored-By: Revital Eres <eres@il.ibm.com> From-SVN: r129529
2007-10-21 12:01:16 +02:00
set et_natural_alignment_64_saved 0
if { ([is-effective-target lp64] && ![istarget *-*-darwin*])
|| [istarget spu-*-*] } {
set et_natural_alignment_64_saved 1
}
}
vect-ifcvt-5.c: Require vect_int. * gcc.dg/vect/vect-ifcvt-5.c: Require vect_int. * gcc.dg/vect/vect-16.c: Fix comment. * gcc.dg/vect/pr33369.c: Require vect_int. * gcc.dg/vect/slp-33.c: Add spaces. * gcc.dg/vect/no-scevccp-outer-18.c: Enable only for vect_interleave targets. * gcc.dg/vect/vect-ifcvt-6.c: Require vect_int. * gcc.dg/vect/no-scevccp-outer-19.c: Enable only for vect_unpack targets. * gcc.dg/vect/vect-ifcvt-7.c: Require vect_int. * gcc.dg/vect/vect-strided-store-u16-i4.c: Add vect_unpack to targets. * gcc.dg/vect/slp-10.c: Add spaces. * gcc.dg/vect/no-scevccp-outer-21.c: Enable only for vect_pack_trunc targets. * gcc.dg/vect/slp-36.c: Require vect_int. * gcc.dg/vect/vect-ifcvt-9.c, gcc.dg/vect/vect-strided-store-u32-i2.c, gcc.dg/vect/vect-ifcvt-2.c, gcc.dg/vect/vect-ifcvt-3.c, gcc.dg/vect/vect-82.c, gcc.dg/vect/vect-83.c: Likewise. * gcc.dg/vect/no-scevccp-outer-16.c: Enable only for vect_unpack targets. * gcc.dg/vect/no-scevccp-outer-17.c: Likewise. * gcc.dg/vect/pr25413.c: Use vector alignment_reachable_for_64bit instead of vector_alignment_reachable_for_double. * lib/target-supports.exp (vect_aligned_arrays): Add spu-*-*. (natural_alignment): Split into... (natural_alignment_32, natural_alignment_64): New. (vector_alignment_reachable): Depend on natural_alignment_32. (vector_alignment_reachable_for_double): Rename to ... (vector_alignment_reachable_for_64bit): And depend on natural_alignment_64. Co-Authored-By: Revital Eres <eres@il.ibm.com> From-SVN: r129529
2007-10-21 12:01:16 +02:00
verbose "check_effective_target_natural_alignment_64: returning $et_natural_alignment_64_saved" 2
return $et_natural_alignment_64_saved
}
vect-ifcvt-5.c: Require vect_int. * gcc.dg/vect/vect-ifcvt-5.c: Require vect_int. * gcc.dg/vect/vect-16.c: Fix comment. * gcc.dg/vect/pr33369.c: Require vect_int. * gcc.dg/vect/slp-33.c: Add spaces. * gcc.dg/vect/no-scevccp-outer-18.c: Enable only for vect_interleave targets. * gcc.dg/vect/vect-ifcvt-6.c: Require vect_int. * gcc.dg/vect/no-scevccp-outer-19.c: Enable only for vect_unpack targets. * gcc.dg/vect/vect-ifcvt-7.c: Require vect_int. * gcc.dg/vect/vect-strided-store-u16-i4.c: Add vect_unpack to targets. * gcc.dg/vect/slp-10.c: Add spaces. * gcc.dg/vect/no-scevccp-outer-21.c: Enable only for vect_pack_trunc targets. * gcc.dg/vect/slp-36.c: Require vect_int. * gcc.dg/vect/vect-ifcvt-9.c, gcc.dg/vect/vect-strided-store-u32-i2.c, gcc.dg/vect/vect-ifcvt-2.c, gcc.dg/vect/vect-ifcvt-3.c, gcc.dg/vect/vect-82.c, gcc.dg/vect/vect-83.c: Likewise. * gcc.dg/vect/no-scevccp-outer-16.c: Enable only for vect_unpack targets. * gcc.dg/vect/no-scevccp-outer-17.c: Likewise. * gcc.dg/vect/pr25413.c: Use vector alignment_reachable_for_64bit instead of vector_alignment_reachable_for_double. * lib/target-supports.exp (vect_aligned_arrays): Add spu-*-*. (natural_alignment): Split into... (natural_alignment_32, natural_alignment_64): New. (vector_alignment_reachable): Depend on natural_alignment_32. (vector_alignment_reachable_for_double): Rename to ... (vector_alignment_reachable_for_64bit): And depend on natural_alignment_64. Co-Authored-By: Revital Eres <eres@il.ibm.com> From-SVN: r129529
2007-10-21 12:01:16 +02:00
# Return 1 if vector alignment (for types of size 32 bit or less) is reachable, 0 otherwise.
#
# This won't change for different subtargets so cache the result.
proc check_effective_target_vector_alignment_reachable { } {
global et_vector_alignment_reachable
if [info exists et_vector_alignment_reachable_saved] {
verbose "check_effective_target_vector_alignment_reachable: using cached result" 2
} else {
if { [check_effective_target_vect_aligned_arrays]
vect-ifcvt-5.c: Require vect_int. * gcc.dg/vect/vect-ifcvt-5.c: Require vect_int. * gcc.dg/vect/vect-16.c: Fix comment. * gcc.dg/vect/pr33369.c: Require vect_int. * gcc.dg/vect/slp-33.c: Add spaces. * gcc.dg/vect/no-scevccp-outer-18.c: Enable only for vect_interleave targets. * gcc.dg/vect/vect-ifcvt-6.c: Require vect_int. * gcc.dg/vect/no-scevccp-outer-19.c: Enable only for vect_unpack targets. * gcc.dg/vect/vect-ifcvt-7.c: Require vect_int. * gcc.dg/vect/vect-strided-store-u16-i4.c: Add vect_unpack to targets. * gcc.dg/vect/slp-10.c: Add spaces. * gcc.dg/vect/no-scevccp-outer-21.c: Enable only for vect_pack_trunc targets. * gcc.dg/vect/slp-36.c: Require vect_int. * gcc.dg/vect/vect-ifcvt-9.c, gcc.dg/vect/vect-strided-store-u32-i2.c, gcc.dg/vect/vect-ifcvt-2.c, gcc.dg/vect/vect-ifcvt-3.c, gcc.dg/vect/vect-82.c, gcc.dg/vect/vect-83.c: Likewise. * gcc.dg/vect/no-scevccp-outer-16.c: Enable only for vect_unpack targets. * gcc.dg/vect/no-scevccp-outer-17.c: Likewise. * gcc.dg/vect/pr25413.c: Use vector alignment_reachable_for_64bit instead of vector_alignment_reachable_for_double. * lib/target-supports.exp (vect_aligned_arrays): Add spu-*-*. (natural_alignment): Split into... (natural_alignment_32, natural_alignment_64): New. (vector_alignment_reachable): Depend on natural_alignment_32. (vector_alignment_reachable_for_double): Rename to ... (vector_alignment_reachable_for_64bit): And depend on natural_alignment_64. Co-Authored-By: Revital Eres <eres@il.ibm.com> From-SVN: r129529
2007-10-21 12:01:16 +02:00
|| [check_effective_target_natural_alignment_32] } {
set et_vector_alignment_reachable_saved 1
} else {
set et_vector_alignment_reachable_saved 0
}
}
verbose "check_effective_target_vector_alignment_reachable: returning $et_vector_alignment_reachable_saved" 2
return $et_vector_alignment_reachable_saved
}
vect-ifcvt-5.c: Require vect_int. * gcc.dg/vect/vect-ifcvt-5.c: Require vect_int. * gcc.dg/vect/vect-16.c: Fix comment. * gcc.dg/vect/pr33369.c: Require vect_int. * gcc.dg/vect/slp-33.c: Add spaces. * gcc.dg/vect/no-scevccp-outer-18.c: Enable only for vect_interleave targets. * gcc.dg/vect/vect-ifcvt-6.c: Require vect_int. * gcc.dg/vect/no-scevccp-outer-19.c: Enable only for vect_unpack targets. * gcc.dg/vect/vect-ifcvt-7.c: Require vect_int. * gcc.dg/vect/vect-strided-store-u16-i4.c: Add vect_unpack to targets. * gcc.dg/vect/slp-10.c: Add spaces. * gcc.dg/vect/no-scevccp-outer-21.c: Enable only for vect_pack_trunc targets. * gcc.dg/vect/slp-36.c: Require vect_int. * gcc.dg/vect/vect-ifcvt-9.c, gcc.dg/vect/vect-strided-store-u32-i2.c, gcc.dg/vect/vect-ifcvt-2.c, gcc.dg/vect/vect-ifcvt-3.c, gcc.dg/vect/vect-82.c, gcc.dg/vect/vect-83.c: Likewise. * gcc.dg/vect/no-scevccp-outer-16.c: Enable only for vect_unpack targets. * gcc.dg/vect/no-scevccp-outer-17.c: Likewise. * gcc.dg/vect/pr25413.c: Use vector alignment_reachable_for_64bit instead of vector_alignment_reachable_for_double. * lib/target-supports.exp (vect_aligned_arrays): Add spu-*-*. (natural_alignment): Split into... (natural_alignment_32, natural_alignment_64): New. (vector_alignment_reachable): Depend on natural_alignment_32. (vector_alignment_reachable_for_double): Rename to ... (vector_alignment_reachable_for_64bit): And depend on natural_alignment_64. Co-Authored-By: Revital Eres <eres@il.ibm.com> From-SVN: r129529
2007-10-21 12:01:16 +02:00
# Return 1 if vector alignment for 64 bit is reachable, 0 otherwise.
#
# This won't change for different subtargets so cache the result.
vect-ifcvt-5.c: Require vect_int. * gcc.dg/vect/vect-ifcvt-5.c: Require vect_int. * gcc.dg/vect/vect-16.c: Fix comment. * gcc.dg/vect/pr33369.c: Require vect_int. * gcc.dg/vect/slp-33.c: Add spaces. * gcc.dg/vect/no-scevccp-outer-18.c: Enable only for vect_interleave targets. * gcc.dg/vect/vect-ifcvt-6.c: Require vect_int. * gcc.dg/vect/no-scevccp-outer-19.c: Enable only for vect_unpack targets. * gcc.dg/vect/vect-ifcvt-7.c: Require vect_int. * gcc.dg/vect/vect-strided-store-u16-i4.c: Add vect_unpack to targets. * gcc.dg/vect/slp-10.c: Add spaces. * gcc.dg/vect/no-scevccp-outer-21.c: Enable only for vect_pack_trunc targets. * gcc.dg/vect/slp-36.c: Require vect_int. * gcc.dg/vect/vect-ifcvt-9.c, gcc.dg/vect/vect-strided-store-u32-i2.c, gcc.dg/vect/vect-ifcvt-2.c, gcc.dg/vect/vect-ifcvt-3.c, gcc.dg/vect/vect-82.c, gcc.dg/vect/vect-83.c: Likewise. * gcc.dg/vect/no-scevccp-outer-16.c: Enable only for vect_unpack targets. * gcc.dg/vect/no-scevccp-outer-17.c: Likewise. * gcc.dg/vect/pr25413.c: Use vector alignment_reachable_for_64bit instead of vector_alignment_reachable_for_double. * lib/target-supports.exp (vect_aligned_arrays): Add spu-*-*. (natural_alignment): Split into... (natural_alignment_32, natural_alignment_64): New. (vector_alignment_reachable): Depend on natural_alignment_32. (vector_alignment_reachable_for_double): Rename to ... (vector_alignment_reachable_for_64bit): And depend on natural_alignment_64. Co-Authored-By: Revital Eres <eres@il.ibm.com> From-SVN: r129529
2007-10-21 12:01:16 +02:00
proc check_effective_target_vector_alignment_reachable_for_64bit { } {
global et_vector_alignment_reachable_for_64bit
vect-ifcvt-5.c: Require vect_int. * gcc.dg/vect/vect-ifcvt-5.c: Require vect_int. * gcc.dg/vect/vect-16.c: Fix comment. * gcc.dg/vect/pr33369.c: Require vect_int. * gcc.dg/vect/slp-33.c: Add spaces. * gcc.dg/vect/no-scevccp-outer-18.c: Enable only for vect_interleave targets. * gcc.dg/vect/vect-ifcvt-6.c: Require vect_int. * gcc.dg/vect/no-scevccp-outer-19.c: Enable only for vect_unpack targets. * gcc.dg/vect/vect-ifcvt-7.c: Require vect_int. * gcc.dg/vect/vect-strided-store-u16-i4.c: Add vect_unpack to targets. * gcc.dg/vect/slp-10.c: Add spaces. * gcc.dg/vect/no-scevccp-outer-21.c: Enable only for vect_pack_trunc targets. * gcc.dg/vect/slp-36.c: Require vect_int. * gcc.dg/vect/vect-ifcvt-9.c, gcc.dg/vect/vect-strided-store-u32-i2.c, gcc.dg/vect/vect-ifcvt-2.c, gcc.dg/vect/vect-ifcvt-3.c, gcc.dg/vect/vect-82.c, gcc.dg/vect/vect-83.c: Likewise. * gcc.dg/vect/no-scevccp-outer-16.c: Enable only for vect_unpack targets. * gcc.dg/vect/no-scevccp-outer-17.c: Likewise. * gcc.dg/vect/pr25413.c: Use vector alignment_reachable_for_64bit instead of vector_alignment_reachable_for_double. * lib/target-supports.exp (vect_aligned_arrays): Add spu-*-*. (natural_alignment): Split into... (natural_alignment_32, natural_alignment_64): New. (vector_alignment_reachable): Depend on natural_alignment_32. (vector_alignment_reachable_for_double): Rename to ... (vector_alignment_reachable_for_64bit): And depend on natural_alignment_64. Co-Authored-By: Revital Eres <eres@il.ibm.com> From-SVN: r129529
2007-10-21 12:01:16 +02:00
if [info exists et_vector_alignment_reachable_for_64bit_saved] {
verbose "check_effective_target_vector_alignment_reachable_for_64bit: using cached result" 2
} else {
vect-ifcvt-5.c: Require vect_int. * gcc.dg/vect/vect-ifcvt-5.c: Require vect_int. * gcc.dg/vect/vect-16.c: Fix comment. * gcc.dg/vect/pr33369.c: Require vect_int. * gcc.dg/vect/slp-33.c: Add spaces. * gcc.dg/vect/no-scevccp-outer-18.c: Enable only for vect_interleave targets. * gcc.dg/vect/vect-ifcvt-6.c: Require vect_int. * gcc.dg/vect/no-scevccp-outer-19.c: Enable only for vect_unpack targets. * gcc.dg/vect/vect-ifcvt-7.c: Require vect_int. * gcc.dg/vect/vect-strided-store-u16-i4.c: Add vect_unpack to targets. * gcc.dg/vect/slp-10.c: Add spaces. * gcc.dg/vect/no-scevccp-outer-21.c: Enable only for vect_pack_trunc targets. * gcc.dg/vect/slp-36.c: Require vect_int. * gcc.dg/vect/vect-ifcvt-9.c, gcc.dg/vect/vect-strided-store-u32-i2.c, gcc.dg/vect/vect-ifcvt-2.c, gcc.dg/vect/vect-ifcvt-3.c, gcc.dg/vect/vect-82.c, gcc.dg/vect/vect-83.c: Likewise. * gcc.dg/vect/no-scevccp-outer-16.c: Enable only for vect_unpack targets. * gcc.dg/vect/no-scevccp-outer-17.c: Likewise. * gcc.dg/vect/pr25413.c: Use vector alignment_reachable_for_64bit instead of vector_alignment_reachable_for_double. * lib/target-supports.exp (vect_aligned_arrays): Add spu-*-*. (natural_alignment): Split into... (natural_alignment_32, natural_alignment_64): New. (vector_alignment_reachable): Depend on natural_alignment_32. (vector_alignment_reachable_for_double): Rename to ... (vector_alignment_reachable_for_64bit): And depend on natural_alignment_64. Co-Authored-By: Revital Eres <eres@il.ibm.com> From-SVN: r129529
2007-10-21 12:01:16 +02:00
if { [check_effective_target_vect_aligned_arrays]
|| [check_effective_target_natural_alignment_64] } {
set et_vector_alignment_reachable_for_64bit_saved 1
} else {
vect-ifcvt-5.c: Require vect_int. * gcc.dg/vect/vect-ifcvt-5.c: Require vect_int. * gcc.dg/vect/vect-16.c: Fix comment. * gcc.dg/vect/pr33369.c: Require vect_int. * gcc.dg/vect/slp-33.c: Add spaces. * gcc.dg/vect/no-scevccp-outer-18.c: Enable only for vect_interleave targets. * gcc.dg/vect/vect-ifcvt-6.c: Require vect_int. * gcc.dg/vect/no-scevccp-outer-19.c: Enable only for vect_unpack targets. * gcc.dg/vect/vect-ifcvt-7.c: Require vect_int. * gcc.dg/vect/vect-strided-store-u16-i4.c: Add vect_unpack to targets. * gcc.dg/vect/slp-10.c: Add spaces. * gcc.dg/vect/no-scevccp-outer-21.c: Enable only for vect_pack_trunc targets. * gcc.dg/vect/slp-36.c: Require vect_int. * gcc.dg/vect/vect-ifcvt-9.c, gcc.dg/vect/vect-strided-store-u32-i2.c, gcc.dg/vect/vect-ifcvt-2.c, gcc.dg/vect/vect-ifcvt-3.c, gcc.dg/vect/vect-82.c, gcc.dg/vect/vect-83.c: Likewise. * gcc.dg/vect/no-scevccp-outer-16.c: Enable only for vect_unpack targets. * gcc.dg/vect/no-scevccp-outer-17.c: Likewise. * gcc.dg/vect/pr25413.c: Use vector alignment_reachable_for_64bit instead of vector_alignment_reachable_for_double. * lib/target-supports.exp (vect_aligned_arrays): Add spu-*-*. (natural_alignment): Split into... (natural_alignment_32, natural_alignment_64): New. (vector_alignment_reachable): Depend on natural_alignment_32. (vector_alignment_reachable_for_double): Rename to ... (vector_alignment_reachable_for_64bit): And depend on natural_alignment_64. Co-Authored-By: Revital Eres <eres@il.ibm.com> From-SVN: r129529
2007-10-21 12:01:16 +02:00
set et_vector_alignment_reachable_for_64bit_saved 0
}
}
vect-ifcvt-5.c: Require vect_int. * gcc.dg/vect/vect-ifcvt-5.c: Require vect_int. * gcc.dg/vect/vect-16.c: Fix comment. * gcc.dg/vect/pr33369.c: Require vect_int. * gcc.dg/vect/slp-33.c: Add spaces. * gcc.dg/vect/no-scevccp-outer-18.c: Enable only for vect_interleave targets. * gcc.dg/vect/vect-ifcvt-6.c: Require vect_int. * gcc.dg/vect/no-scevccp-outer-19.c: Enable only for vect_unpack targets. * gcc.dg/vect/vect-ifcvt-7.c: Require vect_int. * gcc.dg/vect/vect-strided-store-u16-i4.c: Add vect_unpack to targets. * gcc.dg/vect/slp-10.c: Add spaces. * gcc.dg/vect/no-scevccp-outer-21.c: Enable only for vect_pack_trunc targets. * gcc.dg/vect/slp-36.c: Require vect_int. * gcc.dg/vect/vect-ifcvt-9.c, gcc.dg/vect/vect-strided-store-u32-i2.c, gcc.dg/vect/vect-ifcvt-2.c, gcc.dg/vect/vect-ifcvt-3.c, gcc.dg/vect/vect-82.c, gcc.dg/vect/vect-83.c: Likewise. * gcc.dg/vect/no-scevccp-outer-16.c: Enable only for vect_unpack targets. * gcc.dg/vect/no-scevccp-outer-17.c: Likewise. * gcc.dg/vect/pr25413.c: Use vector alignment_reachable_for_64bit instead of vector_alignment_reachable_for_double. * lib/target-supports.exp (vect_aligned_arrays): Add spu-*-*. (natural_alignment): Split into... (natural_alignment_32, natural_alignment_64): New. (vector_alignment_reachable): Depend on natural_alignment_32. (vector_alignment_reachable_for_double): Rename to ... (vector_alignment_reachable_for_64bit): And depend on natural_alignment_64. Co-Authored-By: Revital Eres <eres@il.ibm.com> From-SVN: r129529
2007-10-21 12:01:16 +02:00
verbose "check_effective_target_vector_alignment_reachable_for_64bit: returning $et_vector_alignment_reachable_for_64bit_saved" 2
return $et_vector_alignment_reachable_for_64bit_saved
}
# Return 1 if the target supports vector conditional operations, 0 otherwise.
proc check_effective_target_vect_condition { } {
global et_vect_cond_saved
if [info exists et_vect_cond_saved] {
verbose "check_effective_target_vect_cond: using cached result" 2
} else {
set et_vect_cond_saved 0
if { [istarget powerpc*-*-*]
|| [istarget ia64-*-*]
|| [istarget i?86-*-*]
config.gcc: Add options for arch and tune on SPU. 2007-07-13 Sa Liu <saliu@de.ibm.com> * config.gcc: Add options for arch and tune on SPU. * config/spu/predicates.md: Add constant operands 0 and 1. * config/spu/spu-builtins.def: Add builtins for double precision floating point comparison: si_dfceq, si_dfcmeq, si_dfcgt, si_dfcmgt, si_dftsv, spu_cmpeq_13, spu_cmpabseq_1, spu_cmpgt_13, spu_cmpabsgt_1, spu_testsv. * config/spu/spu-c.c: Define __SPU_EDP__ when builtins invoked with a CELLEDP target. * config/spu/spu-protos.h: Add new function prototypes. * config/spu/spu.c (spu_override_options): Check options -march and -mtune. (spu_comp_icode): Add comparison code for DFmode and vector mode. (spu_emit_branch_or_set): Use the new code for DFmode and vector mode comparison. (spu_const_from_int): New. Create a vector constant from 4 ints. (get_vec_cmp_insn): New. Get insn index of vector compare instruction. (spu_emit_vector_compare): New. Emit vector compare. (spu_emit_vector_cond_expr): New. Emit vector conditional expression. * config/spu/spu.h: Add options -march and -mtune. Define processor types PROCESSOR_CELL and PROCESSOR_CELLEDP. Define macro CANONICALIZE_COMPARISON. * config/spu/spu.md: Add new insns for double precision compare and double precision vector compare. Add vcond and smax/smin patterns to enable DFmode vector conditional expression. * config/spu/spu.opt: Add options -march and -mtune. * config/spu/spu_internals.h: Add builtins for CELLEDP target: si_dfceq, si_dfcmeq, si_dfcgt, si_dfcmgt, si_dftsv. Add builtin for both CELL and CELLEDP targets: spu_testsv. * config/spu/spu_intrinsics.h: Add flag mnemonics for test special values. testsuite/ * gcc.dg/vect/fast-math-vect-reduc-7.c: Switch on test for V2DFmode vector conditional expression. * gcc.target/spu/dfcmeq.c: New. Test combination of abs and dfceq patterns. * gcc.target/spu/dfcmgt.c: New. Test combination of abs and dfcgt patterns. * gcc.target/spu/intrinsics-2.c: New. Test intrinsics for V2DFmode comparison and test special values. * lib/target-supports.exp: Switch on test for V2DFmode vector conditional expression. From-SVN: r126626
2007-07-13 20:31:08 +02:00
|| [istarget spu-*-*]
|| [istarget x86_64-*-*] } {
set et_vect_cond_saved 1
}
}
verbose "check_effective_target_vect_cond: returning $et_vect_cond_saved" 2
return $et_vect_cond_saved
}
# Return 1 if the target supports vector char multiplication, 0 otherwise.
proc check_effective_target_vect_char_mult { } {
global et_vect_char_mult_saved
if [info exists et_vect_char_mult_saved] {
verbose "check_effective_target_vect_char_mult: using cached result" 2
} else {
set et_vect_char_mult_saved 0
if { [istarget ia64-*-*]
|| [istarget i?86-*-*]
|| [istarget x86_64-*-*] } {
set et_vect_char_mult_saved 1
}
}
verbose "check_effective_target_vect_char_mult: returning $et_vect_char_mult_saved" 2
return $et_vect_char_mult_saved
}
# Return 1 if the target supports vector short multiplication, 0 otherwise.
proc check_effective_target_vect_short_mult { } {
global et_vect_short_mult_saved
if [info exists et_vect_short_mult_saved] {
verbose "check_effective_target_vect_short_mult: using cached result" 2
} else {
set et_vect_short_mult_saved 0
if { [istarget ia64-*-*]
|| [istarget spu-*-*]
|| [istarget i?86-*-*]
|| [istarget x86_64-*-*]
|| [istarget powerpc*-*-*]
|| [check_effective_target_arm32] } {
set et_vect_short_mult_saved 1
}
}
verbose "check_effective_target_vect_short_mult: returning $et_vect_short_mult_saved" 2
return $et_vect_short_mult_saved
}
# Return 1 if the target supports vector int multiplication, 0 otherwise.
proc check_effective_target_vect_int_mult { } {
global et_vect_int_mult_saved
if [info exists et_vect_int_mult_saved] {
verbose "check_effective_target_vect_int_mult: using cached result" 2
} else {
set et_vect_int_mult_saved 0
if { ([istarget powerpc*-*-*] && ![istarget powerpc-*-linux*paired*])
target.h (builtin_vectorization_cost): Add new target builtin. 2007-07-12 Dorit Nuzman <dorit@il.ibm.com> * target.h (builtin_vectorization_cost): Add new target builtin. * target-def.h (TARGET_VECTORIZE_BUILTIN_VECTORIZATION_COST): New. * tree-vectorizer.h (TARG_SCALAR_STMT_COST): New. (TARG_SCALAR_LOAD_COST, TARG_SCALAR_STORE_COST): New. * tree-vect-analyze.c (vect_analyze_slp_instance): Initisliaze uninitialized variables. * tree-vect-transform.c (cost_for_stmt): New function. (vect_estimate_min_profitable_iters): Call cost_for_stmt instead of using cost 1 for all scalar stmts. Be less conservative when estimating the number of prologue/epulogue iterations. Call targetm.vectorize.builtin_vectorization_cost. Return min_profitable_iters-1. (vect_model_reduction_cost): Use TARG_SCALAR_TO_VEC_COST for initialization cost instead of TARG_VEC_STMT_COST. Use TARG_VEC_TO_SCALAR_COST instead of TARG_VEC_STMT_COST for reduction epilogue code. Fix epilogue cost computation. * config/spu/spu.c (spu_builtin_vectorization_cost): New. (TARGET_VECTORIZE_BUILTIN_VECTORIZATION_COST): Implement. * config/spu/spu.h (TARG_COND_BRANCH_COST, TARG_SCALAR_STMT_COST): (TARG_SCALAR_LOAD_COST, TARG_SCALAR_STORE_COST, TARG_VEC_STMT_COST): (TARG_VEC_TO_SCALAR_COST, TARG_SCALAR_TO_VEC, TARG_VEC_LOAD_COST): (TARG_VEC_UNALIGNED_LOAD_COST, TARG_VEC_STORE_COST): Define. 2007-07-12 Dorit Nuzman <dorit@il.ibm.com> * gcc.dg/vect/costmodel/ppc/costmodel-vect-reduc-1char.c: Loops now get vectorized. * gcc.dg/vect/costmodel/i386/costmodel-vect-reduc-1char.c: Loops now get vectorized. * gcc.dg/vect/costmodel/spu/spu-costmodel-vect.exp: New. * gcc.dg/vect/costmodel/spu/costmodel-fast-math-vect-pr29925.c: New. * gcc.dg/vect/costmodel/spu/costmodel-vect-31a.c: New. * gcc.dg/vect/costmodel/spu/costmodel-vect-31b.c: New. * gcc.dg/vect/costmodel/spu/costmodel-vect-31c.c: New. * gcc.dg/vect/costmodel/spu/costmodel-vect-31d.c: New. * gcc.dg/vect/costmodel/spu/costmodel-vect-iv-9.c: New. * gcc.dg/vect/costmodel/spu/costmodel-vect-33.c: New. * gcc.dg/vect/costmodel/spu/costmodel-vect-76a.c: New. * gcc.dg/vect/costmodel/spu/costmodel-vect-76b.c: New. * gcc.dg/vect/costmodel/spu/costmodel-vect-76c.c: New. * gcc.dg/vect/costmodel/spu/costmodel-vect-68a.c: New. * gcc.dg/vect/costmodel/spu/costmodel-vect-68b.c: New. * gcc.dg/vect/costmodel/spu/costmodel-vect-68c.c: New. * gcc.dg/vect/costmodel/spu/costmodel-vect-68d.c: New. * lib/target-supports.exp (check_effective_target_vect_int_mul): Add spu. From-SVN: r126584
2007-07-12 14:17:03 +02:00
|| [istarget spu-*-*]
|| [istarget i?86-*-*]
|| [istarget x86_64-*-*]
|| [check_effective_target_arm32] } {
set et_vect_int_mult_saved 1
}
}
verbose "check_effective_target_vect_int_mult: returning $et_vect_int_mult_saved" 2
return $et_vect_int_mult_saved
}
c-tree.texi: Document new tree codes. * doc/c-tree.texi: Document new tree codes. * doc/md.texi: Document new optabs. * tree-pretty-print.c (dump_generic_node): Handle print of new tree codes. * optabs.c (optab_for_tree_code, init_optabs): Handle new optabs. * optabs.h (optab_index): Add new. (vec_extract_even_optab, vec_extract_odd_optab, vec_interleave_high_optab, vec_interleave_low_optab): New optabs. * genopinit.c (vec_extract_even_optab, vec_extract_odd_optab, vec_interleave_high_optab, vec_interleave_low_optab): Initialize new optabs. * expr.c (expand_expr_real_1): Add implementation for new tree codes. * tree-vectorizer.c (new_stmt_vec_info): Initialize new fields. * tree-vectorizer.h (stmt_vec_info): Add new fields for interleaving along with macros for their access. * tree-data-ref.h (first_location_in_loop, data_reference): Update comment. * tree-vect-analyze.c (toplev.h): Include. (vect_determine_vectorization_factor): Fix indentation. (vect_insert_into_interleaving_chain, vect_update_interleaving_chain, vect_equal_offsets): New functions. (vect_analyze_data_ref_dependence): Add argument for interleaving check. Check for interleaving if it's true. (vect_check_dependences): New function. (vect_analyze_data_ref_dependences): Call vect_check_dependences for every ddr. Call vect_analyze_data_ref_dependence with new argument. (vect_update_misalignment_for_peel): Update for interleaving. (vect_verify_datarefs_alignment): Check only first data-ref for interleaving. (vect_enhance_data_refs_alignment): Update for interleaving. Check only first data-ref for interleaving. (vect_analyze_data_ref_access): Check interleaving, update interleaving data. (vect_analyze_data_refs): Call compute_data_dependences_for_loop with different parameters. * tree.def (VEC_EXTRACT_EVEN_EXPR, VEC_EXTRACT_ODD_EXPR, VEC_INTERLEAVE_HIGH_EXPR, VEC_INTERLEAVE_LOW_EXPR): New tree codes. * tree-inline.c (estimate_num_insns_1): Add cases for new codes. * tree-vect-transform.c (vect_create_addr_base_for_vector_ref): Update step in case of interleaving. (vect_strided_store_supported, vect_permute_store_chain): New functions. (vectorizable_store): Handle strided stores. (vect_strided_load_supported, vect_permute_load_chain, vect_transform_strided_load): New functions. (vectorizable_load): Handle strided loads. (vect_transform_stmt): Add argument. Handle strided stores. Check that vectorized stmt exists for patterns. (vect_gen_niters_for_prolog_loop): Update calculation for interleaving. (vect_transform_loop): Remove stmt_vec_info for strided stores after whole chain vectorization. * config/rs6000/altivec.md (UNSPEC_EXTEVEN, UNSPEC_EXTODD, UNSPEC_INTERHI, UNSPEC_INTERLO): New constants. (vpkuhum_nomode, vpkuwum_nomode, vec_extract_even<mode>, vec_extract_odd<mode>, altivec_vmrghsf, altivec_vmrglsf, vec_interleave_high<mode>, vec_interleave_low<mode>): Implement. From-SVN: r119088
2006-11-22 09:46:03 +01:00
# Return 1 if the target supports vector even/odd elements extraction, 0 otherwise.
proc check_effective_target_vect_extract_even_odd { } {
global et_vect_extract_even_odd_saved
if [info exists et_vect_extract_even_odd_saved] {
verbose "check_effective_target_vect_extract_even_odd: using cached result" 2
} else {
set et_vect_extract_even_odd_saved 0
if { [istarget powerpc*-*-*]
|| [istarget spu-*-*] } {
c-tree.texi: Document new tree codes. * doc/c-tree.texi: Document new tree codes. * doc/md.texi: Document new optabs. * tree-pretty-print.c (dump_generic_node): Handle print of new tree codes. * optabs.c (optab_for_tree_code, init_optabs): Handle new optabs. * optabs.h (optab_index): Add new. (vec_extract_even_optab, vec_extract_odd_optab, vec_interleave_high_optab, vec_interleave_low_optab): New optabs. * genopinit.c (vec_extract_even_optab, vec_extract_odd_optab, vec_interleave_high_optab, vec_interleave_low_optab): Initialize new optabs. * expr.c (expand_expr_real_1): Add implementation for new tree codes. * tree-vectorizer.c (new_stmt_vec_info): Initialize new fields. * tree-vectorizer.h (stmt_vec_info): Add new fields for interleaving along with macros for their access. * tree-data-ref.h (first_location_in_loop, data_reference): Update comment. * tree-vect-analyze.c (toplev.h): Include. (vect_determine_vectorization_factor): Fix indentation. (vect_insert_into_interleaving_chain, vect_update_interleaving_chain, vect_equal_offsets): New functions. (vect_analyze_data_ref_dependence): Add argument for interleaving check. Check for interleaving if it's true. (vect_check_dependences): New function. (vect_analyze_data_ref_dependences): Call vect_check_dependences for every ddr. Call vect_analyze_data_ref_dependence with new argument. (vect_update_misalignment_for_peel): Update for interleaving. (vect_verify_datarefs_alignment): Check only first data-ref for interleaving. (vect_enhance_data_refs_alignment): Update for interleaving. Check only first data-ref for interleaving. (vect_analyze_data_ref_access): Check interleaving, update interleaving data. (vect_analyze_data_refs): Call compute_data_dependences_for_loop with different parameters. * tree.def (VEC_EXTRACT_EVEN_EXPR, VEC_EXTRACT_ODD_EXPR, VEC_INTERLEAVE_HIGH_EXPR, VEC_INTERLEAVE_LOW_EXPR): New tree codes. * tree-inline.c (estimate_num_insns_1): Add cases for new codes. * tree-vect-transform.c (vect_create_addr_base_for_vector_ref): Update step in case of interleaving. (vect_strided_store_supported, vect_permute_store_chain): New functions. (vectorizable_store): Handle strided stores. (vect_strided_load_supported, vect_permute_load_chain, vect_transform_strided_load): New functions. (vectorizable_load): Handle strided loads. (vect_transform_stmt): Add argument. Handle strided stores. Check that vectorized stmt exists for patterns. (vect_gen_niters_for_prolog_loop): Update calculation for interleaving. (vect_transform_loop): Remove stmt_vec_info for strided stores after whole chain vectorization. * config/rs6000/altivec.md (UNSPEC_EXTEVEN, UNSPEC_EXTODD, UNSPEC_INTERHI, UNSPEC_INTERLO): New constants. (vpkuhum_nomode, vpkuwum_nomode, vec_extract_even<mode>, vec_extract_odd<mode>, altivec_vmrghsf, altivec_vmrglsf, vec_interleave_high<mode>, vec_interleave_low<mode>): Implement. From-SVN: r119088
2006-11-22 09:46:03 +01:00
set et_vect_extract_even_odd_saved 1
}
}
verbose "check_effective_target_vect_extract_even_odd: returning $et_vect_extract_even_odd_saved" 2
return $et_vect_extract_even_odd_saved
}
# Return 1 if the target supports vector even/odd elements extraction of
# vectors with SImode elements or larger, 0 otherwise.
proc check_effective_target_vect_extract_even_odd_wide { } {
global et_vect_extract_even_odd_wide_saved
if [info exists et_vect_extract_even_odd_wide_saved] {
verbose "check_effective_target_vect_extract_even_odd_wide: using cached result" 2
} else {
set et_vect_extract_even_odd_wide_saved 0
if { [istarget powerpc*-*-*]
|| [istarget i?86-*-*]
|| [istarget x86_64-*-*]
|| [istarget spu-*-*] } {
set et_vect_extract_even_odd_wide_saved 1
}
}
verbose "check_effective_target_vect_extract_even_wide_odd: returning $et_vect_extract_even_odd_wide_saved" 2
return $et_vect_extract_even_odd_wide_saved
}
c-tree.texi: Document new tree codes. * doc/c-tree.texi: Document new tree codes. * doc/md.texi: Document new optabs. * tree-pretty-print.c (dump_generic_node): Handle print of new tree codes. * optabs.c (optab_for_tree_code, init_optabs): Handle new optabs. * optabs.h (optab_index): Add new. (vec_extract_even_optab, vec_extract_odd_optab, vec_interleave_high_optab, vec_interleave_low_optab): New optabs. * genopinit.c (vec_extract_even_optab, vec_extract_odd_optab, vec_interleave_high_optab, vec_interleave_low_optab): Initialize new optabs. * expr.c (expand_expr_real_1): Add implementation for new tree codes. * tree-vectorizer.c (new_stmt_vec_info): Initialize new fields. * tree-vectorizer.h (stmt_vec_info): Add new fields for interleaving along with macros for their access. * tree-data-ref.h (first_location_in_loop, data_reference): Update comment. * tree-vect-analyze.c (toplev.h): Include. (vect_determine_vectorization_factor): Fix indentation. (vect_insert_into_interleaving_chain, vect_update_interleaving_chain, vect_equal_offsets): New functions. (vect_analyze_data_ref_dependence): Add argument for interleaving check. Check for interleaving if it's true. (vect_check_dependences): New function. (vect_analyze_data_ref_dependences): Call vect_check_dependences for every ddr. Call vect_analyze_data_ref_dependence with new argument. (vect_update_misalignment_for_peel): Update for interleaving. (vect_verify_datarefs_alignment): Check only first data-ref for interleaving. (vect_enhance_data_refs_alignment): Update for interleaving. Check only first data-ref for interleaving. (vect_analyze_data_ref_access): Check interleaving, update interleaving data. (vect_analyze_data_refs): Call compute_data_dependences_for_loop with different parameters. * tree.def (VEC_EXTRACT_EVEN_EXPR, VEC_EXTRACT_ODD_EXPR, VEC_INTERLEAVE_HIGH_EXPR, VEC_INTERLEAVE_LOW_EXPR): New tree codes. * tree-inline.c (estimate_num_insns_1): Add cases for new codes. * tree-vect-transform.c (vect_create_addr_base_for_vector_ref): Update step in case of interleaving. (vect_strided_store_supported, vect_permute_store_chain): New functions. (vectorizable_store): Handle strided stores. (vect_strided_load_supported, vect_permute_load_chain, vect_transform_strided_load): New functions. (vectorizable_load): Handle strided loads. (vect_transform_stmt): Add argument. Handle strided stores. Check that vectorized stmt exists for patterns. (vect_gen_niters_for_prolog_loop): Update calculation for interleaving. (vect_transform_loop): Remove stmt_vec_info for strided stores after whole chain vectorization. * config/rs6000/altivec.md (UNSPEC_EXTEVEN, UNSPEC_EXTODD, UNSPEC_INTERHI, UNSPEC_INTERLO): New constants. (vpkuhum_nomode, vpkuwum_nomode, vec_extract_even<mode>, vec_extract_odd<mode>, altivec_vmrghsf, altivec_vmrglsf, vec_interleave_high<mode>, vec_interleave_low<mode>): Implement. From-SVN: r119088
2006-11-22 09:46:03 +01:00
# Return 1 if the target supports vector interleaving, 0 otherwise.
proc check_effective_target_vect_interleave { } {
global et_vect_interleave_saved
if [info exists et_vect_interleave_saved] {
verbose "check_effective_target_vect_interleave: using cached result" 2
} else {
set et_vect_interleave_saved 0
if { [istarget powerpc*-*-*]
|| [istarget i?86-*-*]
|| [istarget x86_64-*-*]
|| [istarget spu-*-*] } {
c-tree.texi: Document new tree codes. * doc/c-tree.texi: Document new tree codes. * doc/md.texi: Document new optabs. * tree-pretty-print.c (dump_generic_node): Handle print of new tree codes. * optabs.c (optab_for_tree_code, init_optabs): Handle new optabs. * optabs.h (optab_index): Add new. (vec_extract_even_optab, vec_extract_odd_optab, vec_interleave_high_optab, vec_interleave_low_optab): New optabs. * genopinit.c (vec_extract_even_optab, vec_extract_odd_optab, vec_interleave_high_optab, vec_interleave_low_optab): Initialize new optabs. * expr.c (expand_expr_real_1): Add implementation for new tree codes. * tree-vectorizer.c (new_stmt_vec_info): Initialize new fields. * tree-vectorizer.h (stmt_vec_info): Add new fields for interleaving along with macros for their access. * tree-data-ref.h (first_location_in_loop, data_reference): Update comment. * tree-vect-analyze.c (toplev.h): Include. (vect_determine_vectorization_factor): Fix indentation. (vect_insert_into_interleaving_chain, vect_update_interleaving_chain, vect_equal_offsets): New functions. (vect_analyze_data_ref_dependence): Add argument for interleaving check. Check for interleaving if it's true. (vect_check_dependences): New function. (vect_analyze_data_ref_dependences): Call vect_check_dependences for every ddr. Call vect_analyze_data_ref_dependence with new argument. (vect_update_misalignment_for_peel): Update for interleaving. (vect_verify_datarefs_alignment): Check only first data-ref for interleaving. (vect_enhance_data_refs_alignment): Update for interleaving. Check only first data-ref for interleaving. (vect_analyze_data_ref_access): Check interleaving, update interleaving data. (vect_analyze_data_refs): Call compute_data_dependences_for_loop with different parameters. * tree.def (VEC_EXTRACT_EVEN_EXPR, VEC_EXTRACT_ODD_EXPR, VEC_INTERLEAVE_HIGH_EXPR, VEC_INTERLEAVE_LOW_EXPR): New tree codes. * tree-inline.c (estimate_num_insns_1): Add cases for new codes. * tree-vect-transform.c (vect_create_addr_base_for_vector_ref): Update step in case of interleaving. (vect_strided_store_supported, vect_permute_store_chain): New functions. (vectorizable_store): Handle strided stores. (vect_strided_load_supported, vect_permute_load_chain, vect_transform_strided_load): New functions. (vectorizable_load): Handle strided loads. (vect_transform_stmt): Add argument. Handle strided stores. Check that vectorized stmt exists for patterns. (vect_gen_niters_for_prolog_loop): Update calculation for interleaving. (vect_transform_loop): Remove stmt_vec_info for strided stores after whole chain vectorization. * config/rs6000/altivec.md (UNSPEC_EXTEVEN, UNSPEC_EXTODD, UNSPEC_INTERHI, UNSPEC_INTERLO): New constants. (vpkuhum_nomode, vpkuwum_nomode, vec_extract_even<mode>, vec_extract_odd<mode>, altivec_vmrghsf, altivec_vmrglsf, vec_interleave_high<mode>, vec_interleave_low<mode>): Implement. From-SVN: r119088
2006-11-22 09:46:03 +01:00
set et_vect_interleave_saved 1
}
}
verbose "check_effective_target_vect_interleave: returning $et_vect_interleave_saved" 2
return $et_vect_interleave_saved
}
tree-vectorizer.h (enum vect_def_type): Start enumeration from 1. * tree-vectorizer.h (enum vect_def_type): Start enumeration from 1. (struct _slp_tree, struct _slp_instance): Define new data structures along macros for their access. (struct _loop_vec_info): Define new fields: strided_stores, slp_instances, and slp_unrolling_factor along macros for their access. (enum slp_vect_type): New. (struct _stmt_vec_info): Define new field, slp_type, and macros for its access. (STMT_VINFO_STRIDED_ACCESS): New macro. (vect_free_slp_tree): Declare. (vectorizable_load): Add an argument of type slp_tree. (vectorizable_store, vectorizable_operation, vectorizable_conversion, vectorizable_assignment): Likewise. (vect_model_simple_cost, vect_model_store_cost, vect_model_load_cost): Declare (make extern). * tree-vectorizer.c (new_stmt_vec_info): Initiliaze the new field. (new_loop_vec_info): Likewise. (destroy_loop_vec_info): Free memory allocated for SLP structures. * tree-vect-analyze.c: Include recog.h. (vect_update_slp_costs_according_to_vf): New. (vect_analyze_operations): Add argument for calls to vectorizable_ () functions. For not pure SLP stmts with strided access check that the group size is power of 2. Update the vectorization factor according to SLP. Call vect_update_slp_costs_according_to_vf. (vect_analyze_group_access): New. (vect_analyze_data_ref_access): Call vect_analyze_group_access. (vect_free_slp_tree): New functions. (vect_get_and_check_slp_defs, vect_build_slp_tree, vect_print_slp_tree, vect_mark_slp_stmts, vect_analyze_slp_instance, vect_analyze_slp, vect_make_slp_decision, vect_detect_hybrid_slp_stmts, vect_detect_hybrid_slp): Likewise. (vect_analyze_loop): Call vect_analyze_slp, vect_make_slp_decision and vect_detect_hybrid_slp. * tree-vect-transform.c (vect_estimate_min_profitable_iters): Take SLP costs into account. (vect_get_cost_fields): New function. (vect_model_simple_cost): Make extern, add SLP parameter and handle SLP. (vect_model_store_cost, vect_model_load_cost): Likewise. (vect_get_constant_vectors): New function. (vect_get_slp_vect_defs, vect_get_slp_defs, vect_get_vec_defs_for_stmt_copy, vect_get_vec_defs_for_stmt_copy, vect_get_vec_defs): Likewise. (vectorizable_reduction): Don't handle SLP for now. (vectorizable_call): Don't handle SLP for now. Add argument to vect_model_simple_cost. (vectorizable_conversion): Handle SLP (call vect_get_vec_defs to get SLPed and vectorized defs). Fix indentation and spacing. (vectorizable_assignment): Handle SLP. (vectorizable_induction): Don't handle SLP for now. (vectorizable_operation): Likewise. (vectorizable_type_demotion): Add argument to vect_model_simple_cost. (vectorizable_type_promotion): Likewise. (vectorizable_store, vectorizable_load): Handle SLP. (vectorizable_condition): Don't handle SLP for now. (vect_transform_stmt): Add a new argument for SLP. Check that there is no SLP transformation required for unsupported cases. Add SLP argument for supported cases. (vect_remove_stores): New function. (vect_schedule_slp_instance, vect_schedule_slp): Likewise. (vect_transform_loop): Schedule SLP instances. * Makefile.in: (tree-vect-analyze.o): Depend on recog.h. From-SVN: r128289
2007-09-09 10:46:12 +02:00
# Return 1 if the target supports vector interleaving and extract even/odd, 0 otherwise.
proc check_effective_target_vect_strided { } {
global et_vect_strided_saved
if [info exists et_vect_strided_saved] {
verbose "check_effective_target_vect_strided: using cached result" 2
} else {
set et_vect_strided_saved 0
if { [check_effective_target_vect_interleave]
&& [check_effective_target_vect_extract_even_odd] } {
set et_vect_strided_saved 1
}
}
verbose "check_effective_target_vect_strided: returning $et_vect_strided_saved" 2
return $et_vect_strided_saved
}
# Return 1 if the target supports vector interleaving and extract even/odd
# for wide element types, 0 otherwise.
proc check_effective_target_vect_strided_wide { } {
global et_vect_strided_wide_saved
if [info exists et_vect_strided_wide_saved] {
verbose "check_effective_target_vect_strided_wide: using cached result" 2
} else {
set et_vect_strided_wide_saved 0
if { [check_effective_target_vect_interleave]
&& [check_effective_target_vect_extract_even_odd_wide] } {
set et_vect_strided_wide_saved 1
}
}
verbose "check_effective_target_vect_strided_wide: returning $et_vect_strided_wide_saved" 2
return $et_vect_strided_wide_saved
}
# Return 1 if the target supports section-anchors
proc check_effective_target_section_anchors { } {
global et_section_anchors_saved
if [info exists et_section_anchors_saved] {
verbose "check_effective_target_section_anchors: using cached result" 2
} else {
set et_section_anchors_saved 0
if { [istarget powerpc*-*-*] } {
set et_section_anchors_saved 1
}
}
verbose "check_effective_target_section_anchors: returning $et_section_anchors_saved" 2
return $et_section_anchors_saved
}
# Return 1 if the target supports atomic operations on "int" and "long".
proc check_effective_target_sync_int_long { } {
global et_sync_int_long_saved
if [info exists et_sync_int_long_saved] {
verbose "check_effective_target_sync_int_long: using cached result" 2
} else {
set et_sync_int_long_saved 0
Index: ChangeLog 2005-04-21 Geoffrey Keating <geoffk@apple.com> * config/rs6000/rs6000-protos.h (rs6000_emit_sync): New. * config/rs6000/rs6000.c (rs6000_emit_vector_compare): Use gen_rtx_* not gen_rtx_fmt_*. (rs6000_emit_vector_select): Likewise. (rs6000_emit_sync): New. * config/rs6000/rs6000.md (GPR, INT, INT1): New mode macros. (larx, stcx, cmp): New mode substitutions. (UNSPEC_SYNC, UNSPEC_SYNC_OP, UNSPEC_SYNC_SWAP, UNSPEC_LWSYNC, UNSPEC_ISYNC): New constants. (rlwinm): Give name. (memory_barrier, isync, lwsync): New insns. (sync_compare_and_swap<mode>, sync_lock_test_and_set<mode>): New insn. (sync_lock_release<mode>): New expander. (sync_add<mode>, sync_sub<mode>, sync_ior<mode>, sync_and<mode>, sync_xor<mode>, sync_nand<mode>, sync_old_add<mode>, sync_old_sub<mode>, sync_old_ior<mode>, sync_old_and<mode>, sync_old_xor<mode>, sync_old_nand<mode>, sync_new_add<mode>, sync_new_sub<mode>, sync_new_ior<mode>, sync_new_and<mode>, sync_new_xor<mode>, sync_new_nand<mode>): New expanders. (sync_add<mode>_internal, sync_addshort_internal, sync_sub<mode>_internal, sync_andsi_internal, sync_anddi_internal, sync_boolsi_internal, sync_booldi_internal, sync_boolc<mode>_internal, sync_boolc<mode>_internal2, sync_boolcc<mode>_internal): New insns. * doc/md.texi (Standard Names): sync_compare_and_swap's operand 0 is the memory before, not after, the operation. Clarify barrier requirements. Index: testsuite/ChangeLog 2005-04-21 Geoffrey Keating <geoffk@apple.com> * lib/target-supports.exp (check_effective_target_sync_int_long): Add powerpc*. From-SVN: r98527
2005-04-21 23:13:41 +02:00
# This is intentionally powerpc but not rs6000, rs6000 doesn't have the
# load-reserved/store-conditional instructions.
if { [istarget ia64-*-*]
|| [istarget i?86-*-*]
|| [istarget x86_64-*-*]
Index: ChangeLog 2005-04-21 Geoffrey Keating <geoffk@apple.com> * config/rs6000/rs6000-protos.h (rs6000_emit_sync): New. * config/rs6000/rs6000.c (rs6000_emit_vector_compare): Use gen_rtx_* not gen_rtx_fmt_*. (rs6000_emit_vector_select): Likewise. (rs6000_emit_sync): New. * config/rs6000/rs6000.md (GPR, INT, INT1): New mode macros. (larx, stcx, cmp): New mode substitutions. (UNSPEC_SYNC, UNSPEC_SYNC_OP, UNSPEC_SYNC_SWAP, UNSPEC_LWSYNC, UNSPEC_ISYNC): New constants. (rlwinm): Give name. (memory_barrier, isync, lwsync): New insns. (sync_compare_and_swap<mode>, sync_lock_test_and_set<mode>): New insn. (sync_lock_release<mode>): New expander. (sync_add<mode>, sync_sub<mode>, sync_ior<mode>, sync_and<mode>, sync_xor<mode>, sync_nand<mode>, sync_old_add<mode>, sync_old_sub<mode>, sync_old_ior<mode>, sync_old_and<mode>, sync_old_xor<mode>, sync_old_nand<mode>, sync_new_add<mode>, sync_new_sub<mode>, sync_new_ior<mode>, sync_new_and<mode>, sync_new_xor<mode>, sync_new_nand<mode>): New expanders. (sync_add<mode>_internal, sync_addshort_internal, sync_sub<mode>_internal, sync_andsi_internal, sync_anddi_internal, sync_boolsi_internal, sync_booldi_internal, sync_boolc<mode>_internal, sync_boolc<mode>_internal2, sync_boolcc<mode>_internal): New insns. * doc/md.texi (Standard Names): sync_compare_and_swap's operand 0 is the memory before, not after, the operation. Clarify barrier requirements. Index: testsuite/ChangeLog 2005-04-21 Geoffrey Keating <geoffk@apple.com> * lib/target-supports.exp (check_effective_target_sync_int_long): Add powerpc*. From-SVN: r98527
2005-04-21 23:13:41 +02:00
|| [istarget alpha*-*-*]
|| [istarget s390*-*-*]
|| [istarget powerpc*-*-*]
|| [istarget sparc64-*-*]
|| [istarget sparcv9-*-*]
|| [istarget mips*-*-*] } {
set et_sync_int_long_saved 1
}
}
verbose "check_effective_target_sync_int_long: returning $et_sync_int_long_saved" 2
return $et_sync_int_long_saved
}
# Return 1 if the target supports atomic operations on "char" and "short".
proc check_effective_target_sync_char_short { } {
global et_sync_char_short_saved
if [info exists et_sync_char_short_saved] {
verbose "check_effective_target_sync_char_short: using cached result" 2
} else {
set et_sync_char_short_saved 0
# This is intentionally powerpc but not rs6000, rs6000 doesn't have the
# load-reserved/store-conditional instructions.
if { [istarget ia64-*-*]
|| [istarget i?86-*-*]
|| [istarget x86_64-*-*]
|| [istarget alpha*-*-*]
|| [istarget s390*-*-*]
|| [istarget powerpc*-*-*]
|| [istarget sparc64-*-*]
|| [istarget sparcv9-*-*]
|| [istarget mips*-*-*] } {
set et_sync_char_short_saved 1
}
}
verbose "check_effective_target_sync_char_short: returning $et_sync_char_short_saved" 2
return $et_sync_char_short_saved
}
# Return 1 if the target uses a ColdFire FPU.
proc check_effective_target_coldfire_fpu { } {
return [check_no_compiler_messages coldfire_fpu assembly {
#ifndef __mcffpu__
#error FOO
#endif
}]
}
# Return true if this is a uClibc target.
proc check_effective_target_uclibc {} {
return [check_no_compiler_messages uclibc object {
#include <features.h>
#if !defined (__UCLIBC__)
#error FOO
#endif
}]
}
# Return true if this is a uclibc target and if the uclibc feature
# described by __$feature__ is not present.
proc check_missing_uclibc_feature {feature} {
return [check_no_compiler_messages $feature object "
#include <features.h>
#if !defined (__UCLIBC) || defined (__${feature}__)
#error FOO
#endif
"]
}
# Return true if this is a Newlib target.
proc check_effective_target_newlib {} {
return [check_no_compiler_messages newlib object {
#include <newlib.h>
}]
}
# Return 1 if
# (a) an error of a few ULP is expected in string to floating-point
# conversion functions; and
# (b) overflow is not always detected correctly by those functions.
proc check_effective_target_lax_strtofp {} {
# By default, assume that all uClibc targets suffer from this.
return [check_effective_target_uclibc]
}
# Return 1 if this is a target for which wcsftime is a dummy
# function that always returns 0.
proc check_effective_target_dummy_wcsftime {} {
# By default, assume that all uClibc targets suffer from this.
return [check_effective_target_uclibc]
}
extend.texi: Document optional priority argument to constructors and destructors. * doc/extend.texi: Document optional priority argument to constructors and destructors. * tree.c (init_priority_for_decl): Adjust GTY markers. (init_ttree): Use priority-info hash functions for init_priority_for_decl. (tree_map_eq): Rename to ... (tree_map_base_eq): ... this. (tree_map_marked_p): Rename to ... (tree_map_base_marked_p): ... this. (tree_map_base_hash): New function. (decl_init_priority_lookup): Rework. (decl_fini_priority_lookup): New function. (decl_priority_info): New function. (decl_init_priority_insert): Use it. (decl_fini_priority_insert): Likewise. (decl_restrict_base_lookup): Adjust for refactoring of tree_map hierarchy. (decl_restrict_base_insert): Likewise. (decl_debug_expr_insert): Likewise. (decl_value_expr_lookup): Likewise. (decl_value_expr_insert): Likewise. * tree.h (priority_type): New type. (decl_init_priority_lookup): Use priority_type. (decl_fini_priority_lookup): New function. (decl_init_priority_insert): Use priority_type. (decl_fini_priority_insert): New function. (DECL_HAS_INIT_PRIORITY): Tweak comments. (DECL_INIT_PRIORITY): Likewise. (SET_DECL_INIT_PRIORITY): Add comment. (DECL_FINI_PRIORITY): New macro. (SET_DECL_FINI_PRIORITY): Likewise. (DEFAULT_INIT_PRIORITY): Document. (MAX_INIT_PRIORITY): Likewise. (MAX_RESERVED_INIT_PRIORITY): Likewise. (tree_map_base): New type. (tree_map_base_eq): New function. (tree_map_base_hash): Likewise. (tree_map_base_marked_p): Likewise. (tree_map): Inherit from tree_map_base. (tree_map_eq): Make it a macro. (tree_map_marked_p): Likewise. (tree_int_map): Inherit from tree_map_base. (tree_int_map_eq): Make it a macro. (tree_int_map_hash): Likewise. (tree_int_map_marked_p): Likewise. (tree_priority_map): New type. (tree_priority_map_eq): New macro. (tree_priority_map_hash): Likewise. (tree_priority_map_marked_p): Likewise. * varasm.c (emults_decl): Adjust for refactoring of tree_map hierarchy. (emutls_common_1): Likewise. * lambda-code.c (replace_uses_equiv_to_x_with_y): Likewise. * tree-ssa-structalias.c (heapvar_lookup): Adjust for refactoring of tree_map hierarchy. * tree-cfg.c (move_stmt_r): Likewise. (new_label_mapper): Likewise. * c-tree.h (c_expand_body): Move to ... * c-common.h (c_expand_body): ... here. * c-decl.c (c_expand_body): Move to ... * c-common.c (c_expand_body): ... here. (c_common_attribute_table): Allow 1 argument for the constructor and destructor attributes. (get_priority): New function. (handle_constructor_attribute): Set DECL_INIT_PRIORITY. (handle_destructor_attribute): Set DECL_FINI_PRIORITY. * cp-tree.h (static_ctors): Remove. * cp-tree.h (static_dtors): Likewise. * cp-objcp-common.c (decl_shadowed_for_var_lookup): Adjust for refactoring of tree_map hierarchy. (decl_shadowed_for_var_insert): Likewise. * semantics.c (expand_body): Use c_expand_body. (expand_or_defer_fn): Don't update static_ctors or static_dtors. * decl2.c (static_ctors): Remove. (static_dtors): Likewise. (generate_ctor_or_dtor_function): Pass NULL_TREE to objc_generate_static_init_call. Do not call static_[cd]tors. (generate_ctor_and_dtor_functions_for_priority): Do not check for static_[cd]tors. (cp_write_global_declarations): Likewise. * decl.c (annotate_value): Adjust for refactoring of tree_map hierarchy. * gcc.dg/initpri1.c: New test. * gcc.dg/initpri2.c: Likewise. * g++.dg/special/initpri1.C: New test. * g++.dg/special/initpri2.C: Likewise. * g++.dg/special/conpr-1.C: Use init_priority effective target. * g++.dg/special/conpr-2.C: Likewise. * g++.dg/special/conpr-3.C: Likewise. * g++.dg/special/conpr-4.C: Likewise. * g++.dg/special/initp1.C: Likewise. * g++.dg/special/ecos.exp: Remove code to detect availability of constructor priorities. * lib/target-support.exp (target_init_priority): New function. From-SVN: r122315
2007-02-25 19:47:05 +01:00
# Return 1 if constructors with initialization priority arguments are
# supposed on this target.
proc check_effective_target_init_priority {} {
return [check_no_compiler_messages init_priority assembly "
void f() __attribute__((constructor (1000)));
void f() \{\}
"]
}
# Return 1 if the target matches the effective target 'arg', 0 otherwise.
# This can be used with any check_* proc that takes no argument and
# returns only 1 or 0. It could be used with check_* procs that take
# arguments with keywords that pass particular arguments.
proc is-effective-target { arg } {
set selected 0
if { [info procs check_effective_target_${arg}] != [list] } {
set selected [check_effective_target_${arg}]
} else {
switch $arg {
"vmx_hw" { set selected [check_vmx_hw_available] }
"named_sections" { set selected [check_named_sections_available] }
"gc_sections" { set selected [check_gc_sections_available] }
"cxa_atexit" { set selected [check_cxa_atexit_available] }
default { error "unknown effective target keyword `$arg'" }
}
}
verbose "is-effective-target: $arg $selected" 2
return $selected
}
# Return 1 if the argument is an effective-target keyword, 0 otherwise.
proc is-effective-target-keyword { arg } {
if { [info procs check_effective_target_${arg}] != [list] } {
return 1
} else {
# These have different names for their check_* procs.
switch $arg {
"vmx_hw" { return 1 }
"named_sections" { return 1 }
"gc_sections" { return 1 }
"cxa_atexit" { return 1 }
default { return 0 }
}
}
}
# Return 1 if target default to short enums
proc check_effective_target_short_enums { } {
return [check_no_compiler_messages short_enums assembly {
enum foo { bar };
int s[sizeof (enum foo) == 1 ? 1 : -1];
}]
}
# Return 1 if target supports merging string constants at link time.
proc check_effective_target_string_merging { } {
return [check_no_messages_and_pattern string_merging \
"rodata\\.str" assembly {
const char *var = "String";
} {-O2}]
}
# Return 1 if target has the basic signed and unsigned types in
re PR c/448 (<stdint.h>-related issues (C99 issues)) PR c/448 fixincludes: * inclhack.def (newlib_stdint_1, newlib_stdint_2): New fixes. * fixincl.x: Regenerate. * tests/base/stdint.h: Update. gcc: * Makefile.in (USE_GCC_STDINT): Define. (stmp-int-hdrs): Install stdint.h if applicable. * c-common.c (CHAR16_TYPE): Define in terms of UINT_LEAST16_TYPE if known. (CHAR32_TYPE): Define in terms of UINT_LEAST32_TYPE if known. (SIG_ATOMIC_TYPE, INT8_TYPE, INT16_TYPE, INT32_TYPE, INT64_TYPE, UINT8_TYPE, UINT16_TYPE, UINT32_TYPE, UINT64_TYPE, INT_LEAST8_TYPE, INT_LEAST16_TYPE, INT_LEAST32_TYPE, INT_LEAST64_TYPE, UINT_LEAST8_TYPE, UINT_LEAST16_TYPE, UINT_LEAST32_TYPE, UINT_LEAST64_TYPE, INT_FAST8_TYPE, INT_FAST16_TYPE, INT_FAST32_TYPE, INT_FAST64_TYPE, UINT_FAST8_TYPE, UINT_FAST16_TYPE, UINT_FAST32_TYPE, UINT_FAST64_TYPE, INTPTR_TYPE, UINTPTR_TYPE): Define. (c_common_nodes_and_builtins): Initialize underlying_wchar_type_node. Do not initialize signed_wchar_type_node or unsigned_wchar_type_node. Initialize nodes for new types. (c_stddef_cpp_builtins): Define macros for new types. * c-common.h (CTI_SIGNED_WCHAR_TYPE, CTI_UNSIGNED_WCHAR_TYPE): Remove. (CTI_UNDERLYING_WCHAR_TYPE, CTI_SIG_ATOMIC_TYPE, CTI_INT8_TYPE, CTI_INT16_TYPE, CTI_INT32_TYPE, CTI_INT64_TYPE, CTI_UINT8_TYPE, CTI_UINT16_TYPE, CTI_UINT32_TYPE, CTI_UINT64_TYPE, CTI_INT_LEAST8_TYPE, CTI_INT_LEAST16_TYPE, CTI_INT_LEAST32_TYPE, CTI_INT_LEAST64_TYPE, CTI_UINT_LEAST8_TYPE, CTI_UINT_LEAST16_TYPE, CTI_UINT_LEAST32_TYPE, CTI_UINT_LEAST64_TYPE, CTI_INT_FAST8_TYPE, CTI_INT_FAST16_TYPE, CTI_INT_FAST32_TYPE, CTI_INT_FAST64_TYPE, CTI_UINT_FAST8_TYPE, CTI_UINT_FAST16_TYPE, CTI_UINT_FAST32_TYPE, CTI_UINT_FAST64_TYPE, CTI_INTPTR_TYPE, CTI_UINTPTR_TYPE): Define. (signed_wchar_type_node, unsigned_wchar_type_node): Remove. (underlying_wchar_type_node, sig_atomic_type_node, int8_type_node, int16_type_node, int32_type_node, int64_type_node, uint8_type_node, uint16_type_node, c_uint32_type_node, c_uint64_type_node, int_least8_type_node, int_least16_type_node, int_least32_type_node, int_least64_type_node, uint_least8_type_node, uint_least16_type_node, uint_least32_type_node, uint_least64_type_node, int_fast8_type_node, int_fast16_type_node, int_fast32_type_node, int_fast64_type_node, uint_fast8_type_node, uint_fast16_type_node, uint_fast32_type_node, uint_fast64_type_node, intptr_type_node, uintptr_type_node): Define. * c-cppbuiltin.c (builtin_define_constants, builtin_define_type_minmax): New. (builtin_define_stdint_macros): Define more macros. (c_cpp_builtins): Define more limit macros. (type_suffix): New. (builtin_define_type_max): Define in terms of builtin_define_type_minmax. Remove is_long parameter. All callers changed. * config.gcc (use_gcc_stdint): Define. (tm_file): Add glibc-stdint.h for targets using glibc or uClibc. Add newlib-stdint.h for generic targets. * config/glibc-stdint.h, config/newlib-stdint.h, ginclude/stdint-gcc.h, ginclude/stdint-wrap.h: New. * config/m32c/m32c.h (UINTPTR_TYPE): Define. * config/score/score.h (UINTPTR_TYPE): Define. * config/sol2.h (SIG_ATOMIC_TYPE, INT8_TYPE, INT16_TYPE, INT32_TYPE, INT64_TYPE, UINT8_TYPE, UINT16_TYPE, UINT32_TYPE, UINT64_TYPE, INT_LEAST8_TYPE, INT_LEAST16_TYPE, INT_LEAST32_TYPE, INT_LEAST64_TYPE, UINT_LEAST8_TYPE, UINT_LEAST16_TYPE, UINT_LEAST32_TYPE, UINT_LEAST64_TYPE, INT_FAST8_TYPE, INT_FAST16_TYPE, INT_FAST32_TYPE, INT_FAST64_TYPE, UINT_FAST8_TYPE, UINT_FAST16_TYPE, UINT_FAST32_TYPE, UINT_FAST64_TYPE, INTPTR_TYPE, UINTPTR_TYPE): Define. * config/spu/spu.h (STDINT_LONG32): Define. * configure.ac (use_gcc_stdint): Substitute. * configure: Regenerate. * doc/cpp.texi (__SIG_ATOMIC_TYPE__, __INT8_TYPE__, __INT16_TYPE__, __INT32_TYPE__, __INT64_TYPE__, __UINT8_TYPE__, __UINT16_TYPE__, __UINT32_TYPE__, __UINT64_TYPE__, __INT_LEAST8_TYPE__, __INT_LEAST16_TYPE__, __INT_LEAST32_TYPE__, __INT_LEAST64_TYPE__, __UINT_LEAST8_TYPE__, __UINT_LEAST16_TYPE__, __UINT_LEAST32_TYPE_, __UINT_LEAST64_TYPE__, __INT_FAST8_TYPE__, __INT_FAST16_TYPE__, __INT_FAST32_TYPE__, __INT_FAST64_TYPE__, __UINT_FAST8_TYPE__, __UINT_FAST16_TYPE__, __UINT_FAST32_TYPE__, __UINT_FAST64_TYPE__, __INTPTR_TYPE__, __UINTPTR_TYPE__, __WINT_MAX__, __SIZE_MAX__, __PTRDIFF_MAX__, __UINTMAX_MAX__, __SIG_ATOMIC_MAX__, __INT8_MAX__, __INT16_MAX__, __INT32_MAX__, __INT64_MAX__, __UINT8_MAX__, __UINT16_MAX__, __UINT32_MAX__, __UINT64_MAX__, __INT_LEAST8_MAX__, __INT_LEAST16_MAX__, __INT_LEAST32_MAX__, __INT_LEAST64_MAX__, __UINT_LEAST8_MAX__, __UINT_LEAST16_MAX__, __UINT_LEAST32_MAX__, __UINT_LEAST64_MAX__, __INT_FAST8_MAX__, __INT_FAST16_MAX__, __INT_FAST32_MAX__, __INT_FAST64_MAX__, __UINT_FAST8_MAX__, __UINT_FAST16_MAX__, __UINT_FAST32_MAX__, __UINT_FAST64_MAX__, __INTPTR_MAX__, __UINTPTR_MAX__, __WCHAR_MIN__, __WINT_MIN__, __SIG_ATOMIC_MIN__, __INT8_C, __INT16_C, __INT32_C, __INT64_C, __UINT8_C, __UINT16_C, __UINT32_C, __UINT64_C, __INTMAX_C, __UINTMAX_C): Document. * doc/tm.texi (SIG_ATOMIC_TYPE, INT8_TYPE, INT16_TYPE, INT32_TYPE, INT64_TYPE, UINT8_TYPE, UINT16_TYPE, UINT32_TYPE, UINT64_TYPE, INT_LEAST8_TYPE, INT_LEAST16_TYPE, INT_LEAST32_TYPE, INT_LEAST64_TYPE, UINT_LEAST8_TYPE, UINT_LEAST16_TYPE, UINT_LEAST32_TYPE, UINT_LEAST64_TYPE, INT_FAST8_TYPE, INT_FAST16_TYPE, INT_FAST32_TYPE, INT_FAST64_TYPE, UINT_FAST8_TYPE, UINT_FAST16_TYPE, UINT_FAST32_TYPE, UINT_FAST64_TYPE, INTPTR_TYPE, UINTPTR_TYPE): Document. gcc/testsuite: * lib/target-supports.exp (check_effective_target_stdint_types): Update comment. (check_effective_target_inttypes_types): New. * gcc.dg/c99-stdint-1.c, gcc.dg/c99-stdint-2.c, gcc.dg/c99-stdint-3.c, gcc.dg/c99-stdint-4.c, gcc.dg/c99-stdint-5.c, gcc.dg/c99-stdint-6.c: New tests. From-SVN: r145372
2009-03-31 22:30:31 +02:00
# <stdint.h>, 0 otherwise. This will be obsolete when GCC ensures a
# working <stdint.h> for all targets.
proc check_effective_target_stdint_types { } {
return [check_no_compiler_messages stdint_types assembly {
#include <stdint.h>
int8_t a; int16_t b; int32_t c; int64_t d;
uint8_t e; uint16_t f; uint32_t g; uint64_t h;
}]
}
re PR c/448 (<stdint.h>-related issues (C99 issues)) PR c/448 fixincludes: * inclhack.def (newlib_stdint_1, newlib_stdint_2): New fixes. * fixincl.x: Regenerate. * tests/base/stdint.h: Update. gcc: * Makefile.in (USE_GCC_STDINT): Define. (stmp-int-hdrs): Install stdint.h if applicable. * c-common.c (CHAR16_TYPE): Define in terms of UINT_LEAST16_TYPE if known. (CHAR32_TYPE): Define in terms of UINT_LEAST32_TYPE if known. (SIG_ATOMIC_TYPE, INT8_TYPE, INT16_TYPE, INT32_TYPE, INT64_TYPE, UINT8_TYPE, UINT16_TYPE, UINT32_TYPE, UINT64_TYPE, INT_LEAST8_TYPE, INT_LEAST16_TYPE, INT_LEAST32_TYPE, INT_LEAST64_TYPE, UINT_LEAST8_TYPE, UINT_LEAST16_TYPE, UINT_LEAST32_TYPE, UINT_LEAST64_TYPE, INT_FAST8_TYPE, INT_FAST16_TYPE, INT_FAST32_TYPE, INT_FAST64_TYPE, UINT_FAST8_TYPE, UINT_FAST16_TYPE, UINT_FAST32_TYPE, UINT_FAST64_TYPE, INTPTR_TYPE, UINTPTR_TYPE): Define. (c_common_nodes_and_builtins): Initialize underlying_wchar_type_node. Do not initialize signed_wchar_type_node or unsigned_wchar_type_node. Initialize nodes for new types. (c_stddef_cpp_builtins): Define macros for new types. * c-common.h (CTI_SIGNED_WCHAR_TYPE, CTI_UNSIGNED_WCHAR_TYPE): Remove. (CTI_UNDERLYING_WCHAR_TYPE, CTI_SIG_ATOMIC_TYPE, CTI_INT8_TYPE, CTI_INT16_TYPE, CTI_INT32_TYPE, CTI_INT64_TYPE, CTI_UINT8_TYPE, CTI_UINT16_TYPE, CTI_UINT32_TYPE, CTI_UINT64_TYPE, CTI_INT_LEAST8_TYPE, CTI_INT_LEAST16_TYPE, CTI_INT_LEAST32_TYPE, CTI_INT_LEAST64_TYPE, CTI_UINT_LEAST8_TYPE, CTI_UINT_LEAST16_TYPE, CTI_UINT_LEAST32_TYPE, CTI_UINT_LEAST64_TYPE, CTI_INT_FAST8_TYPE, CTI_INT_FAST16_TYPE, CTI_INT_FAST32_TYPE, CTI_INT_FAST64_TYPE, CTI_UINT_FAST8_TYPE, CTI_UINT_FAST16_TYPE, CTI_UINT_FAST32_TYPE, CTI_UINT_FAST64_TYPE, CTI_INTPTR_TYPE, CTI_UINTPTR_TYPE): Define. (signed_wchar_type_node, unsigned_wchar_type_node): Remove. (underlying_wchar_type_node, sig_atomic_type_node, int8_type_node, int16_type_node, int32_type_node, int64_type_node, uint8_type_node, uint16_type_node, c_uint32_type_node, c_uint64_type_node, int_least8_type_node, int_least16_type_node, int_least32_type_node, int_least64_type_node, uint_least8_type_node, uint_least16_type_node, uint_least32_type_node, uint_least64_type_node, int_fast8_type_node, int_fast16_type_node, int_fast32_type_node, int_fast64_type_node, uint_fast8_type_node, uint_fast16_type_node, uint_fast32_type_node, uint_fast64_type_node, intptr_type_node, uintptr_type_node): Define. * c-cppbuiltin.c (builtin_define_constants, builtin_define_type_minmax): New. (builtin_define_stdint_macros): Define more macros. (c_cpp_builtins): Define more limit macros. (type_suffix): New. (builtin_define_type_max): Define in terms of builtin_define_type_minmax. Remove is_long parameter. All callers changed. * config.gcc (use_gcc_stdint): Define. (tm_file): Add glibc-stdint.h for targets using glibc or uClibc. Add newlib-stdint.h for generic targets. * config/glibc-stdint.h, config/newlib-stdint.h, ginclude/stdint-gcc.h, ginclude/stdint-wrap.h: New. * config/m32c/m32c.h (UINTPTR_TYPE): Define. * config/score/score.h (UINTPTR_TYPE): Define. * config/sol2.h (SIG_ATOMIC_TYPE, INT8_TYPE, INT16_TYPE, INT32_TYPE, INT64_TYPE, UINT8_TYPE, UINT16_TYPE, UINT32_TYPE, UINT64_TYPE, INT_LEAST8_TYPE, INT_LEAST16_TYPE, INT_LEAST32_TYPE, INT_LEAST64_TYPE, UINT_LEAST8_TYPE, UINT_LEAST16_TYPE, UINT_LEAST32_TYPE, UINT_LEAST64_TYPE, INT_FAST8_TYPE, INT_FAST16_TYPE, INT_FAST32_TYPE, INT_FAST64_TYPE, UINT_FAST8_TYPE, UINT_FAST16_TYPE, UINT_FAST32_TYPE, UINT_FAST64_TYPE, INTPTR_TYPE, UINTPTR_TYPE): Define. * config/spu/spu.h (STDINT_LONG32): Define. * configure.ac (use_gcc_stdint): Substitute. * configure: Regenerate. * doc/cpp.texi (__SIG_ATOMIC_TYPE__, __INT8_TYPE__, __INT16_TYPE__, __INT32_TYPE__, __INT64_TYPE__, __UINT8_TYPE__, __UINT16_TYPE__, __UINT32_TYPE__, __UINT64_TYPE__, __INT_LEAST8_TYPE__, __INT_LEAST16_TYPE__, __INT_LEAST32_TYPE__, __INT_LEAST64_TYPE__, __UINT_LEAST8_TYPE__, __UINT_LEAST16_TYPE__, __UINT_LEAST32_TYPE_, __UINT_LEAST64_TYPE__, __INT_FAST8_TYPE__, __INT_FAST16_TYPE__, __INT_FAST32_TYPE__, __INT_FAST64_TYPE__, __UINT_FAST8_TYPE__, __UINT_FAST16_TYPE__, __UINT_FAST32_TYPE__, __UINT_FAST64_TYPE__, __INTPTR_TYPE__, __UINTPTR_TYPE__, __WINT_MAX__, __SIZE_MAX__, __PTRDIFF_MAX__, __UINTMAX_MAX__, __SIG_ATOMIC_MAX__, __INT8_MAX__, __INT16_MAX__, __INT32_MAX__, __INT64_MAX__, __UINT8_MAX__, __UINT16_MAX__, __UINT32_MAX__, __UINT64_MAX__, __INT_LEAST8_MAX__, __INT_LEAST16_MAX__, __INT_LEAST32_MAX__, __INT_LEAST64_MAX__, __UINT_LEAST8_MAX__, __UINT_LEAST16_MAX__, __UINT_LEAST32_MAX__, __UINT_LEAST64_MAX__, __INT_FAST8_MAX__, __INT_FAST16_MAX__, __INT_FAST32_MAX__, __INT_FAST64_MAX__, __UINT_FAST8_MAX__, __UINT_FAST16_MAX__, __UINT_FAST32_MAX__, __UINT_FAST64_MAX__, __INTPTR_MAX__, __UINTPTR_MAX__, __WCHAR_MIN__, __WINT_MIN__, __SIG_ATOMIC_MIN__, __INT8_C, __INT16_C, __INT32_C, __INT64_C, __UINT8_C, __UINT16_C, __UINT32_C, __UINT64_C, __INTMAX_C, __UINTMAX_C): Document. * doc/tm.texi (SIG_ATOMIC_TYPE, INT8_TYPE, INT16_TYPE, INT32_TYPE, INT64_TYPE, UINT8_TYPE, UINT16_TYPE, UINT32_TYPE, UINT64_TYPE, INT_LEAST8_TYPE, INT_LEAST16_TYPE, INT_LEAST32_TYPE, INT_LEAST64_TYPE, UINT_LEAST8_TYPE, UINT_LEAST16_TYPE, UINT_LEAST32_TYPE, UINT_LEAST64_TYPE, INT_FAST8_TYPE, INT_FAST16_TYPE, INT_FAST32_TYPE, INT_FAST64_TYPE, UINT_FAST8_TYPE, UINT_FAST16_TYPE, UINT_FAST32_TYPE, UINT_FAST64_TYPE, INTPTR_TYPE, UINTPTR_TYPE): Document. gcc/testsuite: * lib/target-supports.exp (check_effective_target_stdint_types): Update comment. (check_effective_target_inttypes_types): New. * gcc.dg/c99-stdint-1.c, gcc.dg/c99-stdint-2.c, gcc.dg/c99-stdint-3.c, gcc.dg/c99-stdint-4.c, gcc.dg/c99-stdint-5.c, gcc.dg/c99-stdint-6.c: New tests. From-SVN: r145372
2009-03-31 22:30:31 +02:00
# Return 1 if target has the basic signed and unsigned types in
# <inttypes.h>, 0 otherwise. This is for tests that GCC's notions of
# these types agree with those in the header, as some systems have
# only <inttypes.h>.
proc check_effective_target_inttypes_types { } {
return [check_no_compiler_messages inttypes_types assembly {
#include <inttypes.h>
int8_t a; int16_t b; int32_t c; int64_t d;
uint8_t e; uint16_t f; uint32_t g; uint64_t h;
}]
}
# Return 1 if programs are intended to be run on a simulator
# (i.e. slowly) rather than hardware (i.e. fast).
proc check_effective_target_simulator { } {
# All "src/sim" simulators set this one.
if [board_info target exists is_simulator] {
return [board_info target is_simulator]
}
# The "sid" simulators don't set that one, but at least they set
# this one.
if [board_info target exists slow_simulator] {
return [board_info target slow_simulator]
}
return 0
}
# Return 1 if the target is a VxWorks kernel.
proc check_effective_target_vxworks_kernel { } {
return [check_no_compiler_messages vxworks_kernel assembly {
#if !defined __vxworks || defined __RTP__
#error NO
#endif
}]
}
# Return 1 if the target is a VxWorks RTP.
proc check_effective_target_vxworks_rtp { } {
return [check_no_compiler_messages vxworks_rtp assembly {
#if !defined __vxworks || !defined __RTP__
#error NO
#endif
}]
}
# Return 1 if the target is expected to provide wide character support.
proc check_effective_target_wchar { } {
if {[check_missing_uclibc_feature UCLIBC_HAS_WCHAR]} {
return 0
}
return [check_no_compiler_messages wchar assembly {
#include <wchar.h>
}]
}
# Return 1 if the target has <pthread.h>.
proc check_effective_target_pthread_h { } {
return [check_no_compiler_messages pthread_h assembly {
#include <pthread.h>
}]
}
re PR libfortran/19872 ([4.0 only] closed and re-opened file not overwriten) * lib/lib/target-supports.exp (check_effective_target_fd_truncate): New. * gfortran.fortran-torture/execute/list_read_1.x, gfortran.fortran-torture/execute/read_null_string.x, gfortran.fortran-torture/execute/backspace.x, gfortran.fortran-torture/execute/seq_io.x, gfortran.fortran-torture/execute/slash_edit.x, gfortran.fortran-torture/execute/unopened_unit_1.x, gfortran.dg/namelist_21.f90, gfortran.dg/advance_5.f90, gfortran.dg/fmt_t_7.f, gfortran.dg/eor_1.f90, gfortran.dg/read_x_past.f, gfortran.dg/tl_editing.f90, gfortran.dg/ftell_2.f90, gfortran.dg/namelist_13.f90, gfortran.dg/namelist_22.f90, gfortran.dg/advance_6.f90, gfortran.dg/read_bad_advance.f90, gfortran.dg/func_derived_3.f90, gfortran.dg/namelist_40.f90, gfortran.dg/x_slash_2.f, gfortran.dg/namelist_14.f90, gfortran.dg/backspace_1.f, gfortran.dg/namelist_23.f90, gfortran.dg/pr17285.f90, gfortran.dg/read_noadvance.f90, gfortran.dg/namelist_use_only.f90, gfortran.dg/namelist_41.f90, gfortran.dg/namelist_15.f90, gfortran.dg/backspace_3.f, gfortran.dg/backslash_3.f, gfortran.dg/namelist_24.f90, gfortran.dg/pr17286.f90, gfortran.dg/endfile.f90, gfortran.dg/open_access_append_1.f90, gfortran.dg/fmt_huge.f90, gfortran.dg/namelist_42.f90, gfortran.dg/pr18392.f90, gfortran.dg/pr19155.f, gfortran.dg/pr12884.f, gfortran.dg/namelist_16.f90, gfortran.dg/backspace_5.f, gfortran.dg/open_readonly_1.f90, gfortran.dg/fmt_read.f90, gfortran.dg/iostat_1.f90, gfortran.dg/namelist_43.f90, gfortran.dg/read_size_noadvance.f90, gfortran.dg/inquire_5.f90, gfortran.dg/read_many_1.f, gfortran.dg/namelist_17.f90, gfortran.dg/list_read_1.f90, gfortran.dg/backspace_10.f90, gfortran.dg/namelist_26.f90, gfortran.dg/unf_read_corrupted_2.f90, gfortran.dg/record_marker_1.f90, gfortran.dg/convert_implied_open.f90, gfortran.dg/iostat_2.f90, gfortran.dg/write_check3.f90, gfortran.dg/namelist_44.f90, gfortran.dg/namelist_use.f90, gfortran.dg/rewind_1.f90, gfortran.dg/streamio_11.f90, gfortran.dg/namelist_18.f90, gfortran.dg/backspace_9.f, gfortran.dg/dos_eol.f, gfortran.dg/read_eof_1.f90, gfortran.dg/namelist_27.f90, gfortran.dg/pad_no.f90, gfortran.dg/endfile.f, gfortran.dg/namelist_11.f, gfortran.dg/namelist_19.f90, gfortran.dg/eor_handling_1.f90, gfortran.dg/write_rewind_1.f, gfortran.dg/comma.f, gfortran.dg/read_eof_2.f90, gfortran.dg/namelist_28.f90, gfortran.dg/record_marker_3.f90, gfortran.dg/complex_read.f90, gfortran.dg/namelist_37.f90, gfortran.dg/error_recovery_5.f90, gfortran.dg/namelist_char_only.f90, gfortran.dg/pr18122.f90, gfortran.dg/list_read_4.f90, gfortran.dg/eor_handling_2.f90, gfortran.dg/read_eof_3.f90, gfortran.dg/dollar_edit_descriptor_1.f, gfortran.dg/pr19467.f90, gfortran.dg/namelist_38.f90, gfortran.dg/inquire_9.f90, gfortran.dg/list_read_5.f90, gfortran.dg/noadv_size.f90, gfortran.dg/backslash_1.f90, gfortran.dg/eor_handling_3.f90, gfortran.dg/read_eof_4.f90, gfortran.dg/runtime_warning_1.f90, gfortran.dg/x_slash_1.f, gfortran.dg/namelist_39.f90, gfortran.dg/streamio_3.f90, gfortran.dg/read_comma.f, gfortran.dg/pr19657.f, gfortran.dg/streamio_15.f90, gfortran.dg/list_read_6.f90, gfortran.dg/eor_handling_4.f90, gfortran.dg/backslash_2.f90, gfortran.dg/pr19216.f, gfortran.dg/PR19872.f, gfortran.dg/backspace_2.f, gfortran.dg/empty_format_1.f90, gfortran.dg/streamio_4.f90, gfortran.dg/append_1.f90, gfortran.dg/fgetc_1.f90, gfortran.dg/complex_write.f90, gfortran.dg/list_read_7.f90, gfortran.dg/eor_handling_5.f90, gfortran.dg/fmt_t_1.f90, gfortran.dg/pr17090.f90, gfortran.dg/backspace_4.f, gfortran.dg/shape_3.f90, gfortran.dg/unf_io_convert_1.f90, gfortran.dg/fgetc_2.f90, gfortran.dg/vector_subscript_3.f90, gfortran.dg/list_read_8.f90, gfortran.dg/flush_1.f90, gfortran.dg/advance_1.f90, gfortran.dg/fmt_t_2.f90, gfortran.dg/backspace_6.f, gfortran.dg/slash_1.f90, gfortran.dg/stat_1.f90, gfortran.dg/unformatted_recl_1.f90, gfortran.dg/record_marker_2.f, gfortran.dg/overwrite_1.f, gfortran.dg/unf_io_convert_2.f90, gfortran.dg/fmt_t_3.f90, gfortran.dg/backspace_8.f, gfortran.dg/stat_2.f90, gfortran.dg/pr18210.f90, gfortran.dg/unformatted_subrecord_1.f90, gfortran.dg/pr20257.f90, gfortran.dg/eof_1.f90, gfortran.dg/fmt_t_4.f90, gfortran.dg/unf_short_record_1.f90, gfortran.dg/fmt_exhaust.f90, gfortran.dg/namelist_20.f90, gfortran.dg/advance_4.f90, gfortran.dg/fmt_t_5.f90, gfortran.dg/namelist_12.f, gfortran.dg/backspace_7.f90, gfortran.dg/write_rewind_2.f, gfortran.dg/ftell_1.f90, gfortran.dg/fseek.f90, gfortran.dg/write_back.f: Gate test on effective_target fd_truncate. From-SVN: r132885
2008-03-05 01:59:34 +01:00
# Return 1 if the target can truncate a file from a file-descriptor,
# as used by libgfortran/io/unix.c:fd_truncate; i.e. ftruncate or
# chsize. We test for a trivially functional truncation; no stubs.
# As libgfortran uses _FILE_OFFSET_BITS 64, we do too; it'll cause a
# different function to be used.
proc check_effective_target_fd_truncate { } {
set prog {
#define _FILE_OFFSET_BITS 64
#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>
int main ()
{
FILE *f = fopen ("tst.tmp", "wb");
int fd;
const char t[] = "test writing more than ten characters";
char s[11];
fd = fileno (f);
write (fd, t, sizeof (t) - 1);
lseek (fd, 0, 0);
if (ftruncate (fd, 10) != 0)
exit (1);
close (fd);
f = fopen ("tst.tmp", "rb");
if (fread (s, 1, sizeof (s), f) != 10 || strncmp (s, t, 10) != 0)
exit (1);
exit (0);
}
}
if { [check_runtime ftruncate $prog] } {
return 1;
}
regsub "ftruncate" $prog "chsize" prog
return [check_runtime chsize $prog]
}
# Add to FLAGS all the target-specific flags needed to access the c99 runtime.
proc add_options_for_c99_runtime { flags } {
if { [istarget *-*-solaris2*] } {
return "$flags -std=c99"
}
if { [istarget powerpc-*-darwin*] } {
return "$flags -mmacosx-version-min=10.3"
}
return $flags
}
# Return 1 if the target provides a full C99 runtime.
proc check_effective_target_c99_runtime { } {
return [check_cached_effective_target c99_runtime {
global srcdir
set file [open "$srcdir/gcc.dg/builtins-config.h"]
set contents [read $file]
close $file
append contents {
#ifndef HAVE_C99_RUNTIME
#error FOO
#endif
}
target-supports.exp (get_compiler_messages): Replace with... gcc/testsuite/ * lib/target-supports.exp (get_compiler_messages): Replace with... (check_compile): ...this new procedure. Handle TYPE == executable. Use comments in the source to determine the correct extension. Return a pair containing the compiler output and the output filename. Don't delete the file here. (check_no_compiler_messages_nocache): New procedure. (check_no_compiler_messages): Use it. (check_no_messages_and_pattern_nocache): New procedure. (check_no_messages_and_pattern): Use it. (check_runtime_nocache, check_runtime): New procedures. (check_effective_target_tls): Use check_no_compiler_messages. (check_effective_target_tls_native): Use check_no_messages_and_pattern. (check_effective_target_tls_runtime): Use check_runtime. (check_effective_target_fstack_protector): Likewise. (check_iconv_available): Use check_runtime_nocache. (check_effective_target_fortran_large_real): Use check_no_compiler_messages. (check_effective_target_fortran_large_int): Likewise. (check_effective_target_static_libgfortran): Likewise. (check_750cl_hw_available): Use check_cached_effective_target and check_runtime_nocache. (check_vmx_hw_available): Likewise. (check_effective_target_broken_cplxf_arg): Likewise. (check_alpha_max_hw_available): Use check_runtime. (check_function_available): Use check_no_compiler_messages. (check_cxa_atexit_available): Use check_cached_effective_target and check_runtime_nocache. (check_effective_target_dfp_nocache): Use check_no_compiler_messages_nocache. (check_effective_target_dfprt_nocache): Use check_runtime_nocache. (check_effective_target_dfp): Use check_cached_effective_target. (check_effective_target_dfprt): Likewise. (check_effective_target_arm_neon_hw): Use check_runtime. (check_effective_target_ultrasparc_hw): Likewise. (check_effective_target_c99_runtime): Use check_no_compiler_messages_nocache. From-SVN: r130599
2007-12-04 11:16:17 +01:00
check_no_compiler_messages_nocache c99_runtime assembly \
$contents [add_options_for_c99_runtime ""]
}]
}
# Return 1 if target wchar_t is at least 4 bytes.
proc check_effective_target_4byte_wchar_t { } {
return [check_no_compiler_messages 4byte_wchar_t object {
int dummy[sizeof (__WCHAR_TYPE__) >= 4 ? 1 : -1];
}]
}
func-vararg-alternate-d128-2.c: New. 2008-07-30 H.J. Lu <hongjiu.lu@intel.com> Joey Ye <joey.ye@intel.com> * gcc.dg/dfp/func-vararg-alternate-d128-2.c: New. * gcc.dg/dfp/func-vararg-mixed-2.c: Likewise. * gcc.dg/torture/stackalign/alloca-1.c: Likewise. * gcc.dg/torture/stackalign/builtin-apply-1.c: Likewise. * gcc.dg/torture/stackalign/builtin-apply-2.c: Likewise. * gcc.dg/torture/stackalign/builtin-apply-3.c: Likewise. * gcc.dg/torture/stackalign/builtin-apply-4.c: Likewise. * gcc.dg/torture/stackalign/builtin-return-1.c: Likewise. * gcc.dg/torture/stackalign/check.h: Likewise. * gcc.dg/torture/stackalign/comp-goto-1.c: Likewise. * gcc.dg/torture/stackalign/fastcall-1.c: Likewise. * gcc.dg/torture/stackalign/global-1.c: Likewise. * gcc.dg/torture/stackalign/inline-1.c: Likewise. * gcc.dg/torture/stackalign/inline-2.c: Likewise. * gcc.dg/torture/stackalign/nested-1.c: Likewise. * gcc.dg/torture/stackalign/nested-2.c: Likewise. * gcc.dg/torture/stackalign/nested-3.c: Likewise. * gcc.dg/torture/stackalign/nested-4.c: Likewise. * gcc.dg/torture/stackalign/nested-5.c: Likewise. * gcc.dg/torture/stackalign/nested-6.c: Likewise. * gcc.dg/torture/stackalign/non-local-goto-1.c: Likewise. * gcc.dg/torture/stackalign/non-local-goto-2.c: Likewise. * gcc.dg/torture/stackalign/non-local-goto-3.c: Likewise. * gcc.dg/torture/stackalign/non-local-goto-4.c: Likewise. * gcc.dg/torture/stackalign/non-local-goto-5.c: Likewise. * gcc.dg/torture/stackalign/pr16660-1.c: Likewise. * gcc.dg/torture/stackalign/pr16660-2.c: Likewise. * gcc.dg/torture/stackalign/pr16660-3.c: Likewise. * gcc.dg/torture/stackalign/regparm-1.c: Likewise. * gcc.dg/torture/stackalign/ret-struct-1.c: Likewise. * gcc.dg/torture/stackalign/setjmp-1.c: Likewise. * gcc.dg/torture/stackalign/setjmp-2.c: Likewise. * gcc.dg/torture/stackalign/setjmp-3.c: Likewise. * gcc.dg/torture/stackalign/setjmp-4.c: Likewise. * gcc.dg/torture/stackalign/sibcall-1.c: Likewise. * gcc.dg/torture/stackalign/stackalign.exp: Likewise. * gcc.dg/torture/stackalign/struct-1.c: Likewise. * gcc.dg/torture/stackalign/vararg-1.c: Likewise. * gcc.dg/torture/stackalign/vararg-2.c: Likewise. * gcc.target/i386/align-main-1.c: Likewise. * gcc.target/i386/align-main-2.c: Likewise. * gcc.target/i386/pr32000-2.c: Likewise. * gcc.target/i386/stackalign/asm-1.c: Likewise. * gcc.target/i386/stackalign/return-1.c: Likewise. * gcc.target/i386/stackalign/return-2.c: Likewise. * gcc.target/i386/stackalign/return-3.c: Likewise. * gcc.target/i386/stackalign/return-4.c: Likewise. * gcc.target/i386/stackalign/return-5.c: Likewise. * gcc.target/i386/stackalign/return-6.c: Likewise. * gcc.target/i386/stackalign/stackalign.exp: Likewise. * g++.dg/torture/stackalign/check.h: Likewise. * g++.dg/torture/stackalign/eh-alloca-1.C: Likewise. * g++.dg/torture/stackalign/eh-fastcall-1.C: Likewise. * g++.dg/torture/stackalign/eh-global-1.C: Likewise. * g++.dg/torture/stackalign/eh-inline-1.C: Likewise. * g++.dg/torture/stackalign/eh-inline-2.C: Likewise. * g++.dg/torture/stackalign/eh-vararg-1.C: Likewise. * g++.dg/torture/stackalign/eh-vararg-2.C: Likewise. * g++.dg/torture/stackalign/stackalign.exp: Likewise. * g++.dg/torture/stackalign/stdcall-1.C: Likewise. * g++.dg/torture/stackalign/test-unwind.h: Likewise. * g++.dg/torture/stackalign/throw-1.C: Likewise. * g++.dg/torture/stackalign/throw-2.C: Likewise. * g++.dg/torture/stackalign/throw-3.C: Likewise. * g++.dg/torture/stackalign/throw-4.C: Likewise. * g++.dg/torture/stackalign/unwind-0.C: Likewise. * g++.dg/torture/stackalign/unwind-1.C: Likewise. * g++.dg/torture/stackalign/unwind-2.C: Likewise. * g++.dg/torture/stackalign/unwind-3.C: Likewise. * g++.dg/torture/stackalign/unwind-4.C: Likewise. * g++.dg/torture/stackalign/unwind-5.C: Likewise. * g++.dg/torture/stackalign/unwind-6.C: Likewise. * gcc.target/i386/20060512-1.c: Add -mpreferred-stack-boundary=4. (main): Move "popl" after check. * gcc.target/i386/20060512-3.c: Likewise. * gcc.target/i386/20060512-2.c: Add -mpreferred-stack-boundary=4. Remove dg-error. * gcc.target/i386/20060512-4.c: Add -mpreferred-stack-boundary=4. Remove dg-warning. * lib/target-supports.exp (check_effective_target_unaligned_stack): Always return 0. (check_effective_target_automatic_stack_alignment): New. Co-Authored-By: Joey Ye <joey.ye@intel.com> From-SVN: r138336
2008-07-30 21:24:02 +02:00
# Return 1 if the target supports automatic stack alignment.
proc check_effective_target_automatic_stack_alignment { } {
if { [istarget i?86*-*-*]
|| [istarget x86_64-*-*] } then {
return 1
} else {
return 0
}
}
vector-1b_main.c: New. 2008-08-28 Xuepeng Guo <xuepeng.guo@intel.com> Joey Ye <joey.ye@intel.com> H.J. Lu <hongjiu.lu@intel.com> * gcc.dg/compat/vector-1b_main.c: New. * gcc.dg/compat/vector-1b_x.c: Likewise. * gcc.dg/compat/vector-1b_y.c: Likewise. * gcc.dg/compat/vector-2b_main.c: Likewise. * gcc.dg/compat/vector-2b_x.c: Likewise. * gcc.dg/compat/vector-2b_y.c: Likewise. * gcc.target/i386/aes-avx-check.h: Likewise. * gcc.target/i386/avx-1.c: Likewise. * gcc.target/i386/avx-2.c: Likewise. * gcc.target/i386/avx-3.c: Likewise. * gcc.target/i386/avx-check.h: Likewise. * gcc.target/i386/avx-set1-epi32-1.c: Likewise. * gcc.target/i386/avx-set1-pd-256-1.c: Likewise. * gcc.target/i386/avx-set1-ps-256-1.c: Likewise. * gcc.target/i386/avx-set-v16hi-1.c: Likewise. * gcc.target/i386/avx-set-v16hi-2.c: Likewise. * gcc.target/i386/avx-set-v16hi-3.c: Likewise. * gcc.target/i386/avx-set-v16hi-4.c: Likewise. * gcc.target/i386/avx-set-v16hi-5.c: Likewise. * gcc.target/i386/avx-set-v32qi-1.c: Likewise. * gcc.target/i386/avx-set-v32qi-2.c: Likewise. * gcc.target/i386/avx-set-v32qi-3.c: Likewise. * gcc.target/i386/avx-set-v32qi-4.c: Likewise. * gcc.target/i386/avx-set-v32qi-5.c: Likewise. * gcc.target/i386/avx-set-v4df-1.c: Likewise. * gcc.target/i386/avx-set-v4df-2.c: Likewise. * gcc.target/i386/avx-set-v4df-3.c: Likewise. * gcc.target/i386/avx-set-v4df-4.c: Likewise. * gcc.target/i386/avx-set-v4df-5.c: Likewise. * gcc.target/i386/avx-set-v4di-1.c: Likewise. * gcc.target/i386/avx-set-v4di-2.c: Likewise. * gcc.target/i386/avx-set-v4di-3.c: Likewise. * gcc.target/i386/avx-set-v4di-4.c: Likewise. * gcc.target/i386/avx-set-v4di-5.c: Likewise. * gcc.target/i386/avx-set-v8sf-1.c: Likewise. * gcc.target/i386/avx-set-v8sf-2.c: Likewise. * gcc.target/i386/avx-set-v8sf-3.c: Likewise. * gcc.target/i386/avx-set-v8sf-4.c: Likewise. * gcc.target/i386/avx-set-v8sf-5.c: Likewise. * gcc.target/i386/avx-set-v8si-1.c: Likewise. * gcc.target/i386/avx-set-v8si-2.c: Likewise. * gcc.target/i386/avx-set-v8si-3.c: Likewise. * gcc.target/i386/avx-set-v8si-4.c: Likewise. * gcc.target/i386/avx-set-v8si-5.c: Likewise. * gcc.target/i386/avx-setzero-pd-256-1.c: Likewise. * gcc.target/i386/avx-setzero-ps-256-1.c: Likewise. * gcc.target/i386/avx-setzero-si256-1.c: Likewise. * gcc.target/i386/avx-vaddpd-1.c: Likewise. * gcc.target/i386/avx-vaddpd-256-1.c: Likewise. * gcc.target/i386/avx-vaddps-1.c: Likewise. * gcc.target/i386/avx-vaddps-256-1.c: Likewise. * gcc.target/i386/avx-vaddsd-1.c: Likewise. * gcc.target/i386/avx-vaddss-1.c: Likewise. * gcc.target/i386/avx-vaddsubpd-1.c: Likewise. * gcc.target/i386/avx-vaddsubpd-256-1.c: Likewise. * gcc.target/i386/avx-vaddsubps-1.c: Likewise. * gcc.target/i386/avx-vaddsubps-256-1.c: Likewise. * gcc.target/i386/avx-vaesdec-1.c: Likewise. * gcc.target/i386/avx-vaesdeclast-1.c: Likewise. * gcc.target/i386/avx-vaesenc-1.c: Likewise. * gcc.target/i386/avx-vaesenclast-1.c: Likewise. * gcc.target/i386/avx-vaesimc-1.c: Likewise. * gcc.target/i386/avx-vaeskeygenassist-1.c: Likewise. * gcc.target/i386/avx-vandnpd-1.c: Likewise. * gcc.target/i386/avx-vandnpd-256-1.c: Likewise. * gcc.target/i386/avx-vandnps-1.c: Likewise. * gcc.target/i386/avx-vandnps-256-1.c: Likewise. * gcc.target/i386/avx-vandpd-1.c: Likewise. * gcc.target/i386/avx-vandpd-256-1.c: Likewise. * gcc.target/i386/avx-vandps-1.c: Likewise. * gcc.target/i386/avx-vandps-256-1.c: Likewise. * gcc.target/i386/avx-vblendpd-1.c: Likewise. * gcc.target/i386/avx-vblendpd-256-1.c: Likewise. * gcc.target/i386/avx-vblendps-256-1.c: Likewise. * gcc.target/i386/avx-vblendvpd-256-1.c: Likewise. * gcc.target/i386/avx-vblendvps-256-1.c: Likewise. * gcc.target/i386/avx-vbroadcastf128-256-1.c: Likewise. * gcc.target/i386/avx-vbroadcastf128-256-2.c: Likewise. * gcc.target/i386/avx-vbroadcastsd-1.c: Likewise. * gcc.target/i386/avx-vbroadcastss-1.c: Likewise. * gcc.target/i386/avx-vbroadcastss-2.c: Likewise. * gcc.target/i386/avx-vcmppd-1.c: Likewise. * gcc.target/i386/avx-vcmppd-256-1.c: Likewise. * gcc.target/i386/avx-vcmpps-1.c: Likewise. * gcc.target/i386/avx-vcmpps-256-1.c: Likewise. * gcc.target/i386/avx-vcmpsd-1.c: Likewise. * gcc.target/i386/avx-vcmpss-1.c: Likewise. * gcc.target/i386/avx-vcomisd-1.c: Likewise. * gcc.target/i386/avx-vcomisd-2.c: Likewise. * gcc.target/i386/avx-vcomisd-3.c: Likewise. * gcc.target/i386/avx-vcomisd-4.c: Likewise. * gcc.target/i386/avx-vcomisd-5.c: Likewise. * gcc.target/i386/avx-vcomisd-6.c: Likewise. * gcc.target/i386/avx-vcomiss-1.c: Likewise. * gcc.target/i386/avx-vcomiss-2.c: Likewise. * gcc.target/i386/avx-vcomiss-3.c: Likewise. * gcc.target/i386/avx-vcomiss-4.c: Likewise. * gcc.target/i386/avx-vcomiss-5.c: Likewise. * gcc.target/i386/avx-vcomiss-6.c: Likewise. * gcc.target/i386/avx-vcvtdq2pd-1.c: Likewise. * gcc.target/i386/avx-vcvtdq2pd-256-1.c: Likewise. * gcc.target/i386/avx-vcvtdq2ps-1.c: Likewise. * gcc.target/i386/avx-vcvtpd2dq-1.c: Likewise. * gcc.target/i386/avx-vcvtpd2dq-256-1.c: Likewise. * gcc.target/i386/avx-vcvtpd2ps-1.c: Likewise. * gcc.target/i386/avx-vcvtpd2ps-256-1.c: Likewise. * gcc.target/i386/avx-vcvtps2dq-1.c: Likewise. * gcc.target/i386/avx-vcvtps2dq-256-1.c: Likewise. * gcc.target/i386/avx-vcvtps2pd-1.c: Likewise. * gcc.target/i386/avx-vcvtps2pd-256-1.c: Likewise. * gcc.target/i386/avx-vcvtsd2si-1.c: Likewise. * gcc.target/i386/avx-vcvtsd2si-2.c: Likewise. * gcc.target/i386/avx-vcvtsd2ss-1.c: Likewise. * gcc.target/i386/avx-vcvtsi2sd-1.c: Likewise. * gcc.target/i386/avx-vcvtsi2sd-2.c: Likewise. * gcc.target/i386/avx-vcvtsi2ss-1.c: Likewise. * gcc.target/i386/avx-vcvtsi2ss-2.c: Likewise. * gcc.target/i386/avx-vcvtss2sd-1.c: Likewise. * gcc.target/i386/avx-vcvtss2si-1.c: Likewise. * gcc.target/i386/avx-vcvtss2si-2.c: Likewise. * gcc.target/i386/avx-vcvttpd2dq-1.c: Likewise. * gcc.target/i386/avx-vcvttpd2dq-256-1.c: Likewise. * gcc.target/i386/avx-vcvttps2dq-1.c: Likewise. * gcc.target/i386/avx-vcvttps2dq-256-1.c: Likewise. * gcc.target/i386/avx-vcvttsd2si-1.c: Likewise. * gcc.target/i386/avx-vcvttsd2si-2.c: Likewise. * gcc.target/i386/avx-vcvttss2si-1.c: Likewise. * gcc.target/i386/avx-vcvttss2si-2.c: Likewise. * gcc.target/i386/avx-vdivpd-1.c: Likewise. * gcc.target/i386/avx-vdivpd-256-1.c: Likewise. * gcc.target/i386/avx-vdivps-1.c: Likewise. * gcc.target/i386/avx-vdivps-256-1.c: Likewise. * gcc.target/i386/avx-vdivsd-1.c: Likewise. * gcc.target/i386/avx-vdivss-1.c: Likewise. * gcc.target/i386/avx-vdppd-1.c: Likewise. * gcc.target/i386/avx-vdppd-2.c: Likewise. * gcc.target/i386/avx-vdpps-1.c: Likewise. * gcc.target/i386/avx-vdpps-2.c: Likewise. * gcc.target/i386/avx-vextractf128-256-1.c: Likewise. * gcc.target/i386/avx-vextractf128-256-2.c: Likewise. * gcc.target/i386/avx-vextractps-1.c: Likewise. * gcc.target/i386/avx-vhaddpd-1.c: Likewise. * gcc.target/i386/avx-vhaddpd-256-1.c: Likewise. * gcc.target/i386/avx-vhaddps-1.c: Likewise. * gcc.target/i386/avx-vhaddps-256-1.c: Likewise. * gcc.target/i386/avx-vhsubpd-1.c: Likewise. * gcc.target/i386/avx-vhsubpd-256-1.c: Likewise. * gcc.target/i386/avx-vhsubps-1.c: Likewise. * gcc.target/i386/avx-vhsubps-256-1.c: Likewise. * gcc.target/i386/avx-vinsertf128-256-1.c: Likewise. * gcc.target/i386/avx-vinsertf128-256-2.c: Likewise. * gcc.target/i386/avx-vinsertf128-256-3.c: Likewise. * gcc.target/i386/avx-vinsertps-1.c: Likewise. * gcc.target/i386/avx-vinsertps-2.c: Likewise. * gcc.target/i386/avx-vlddqu-1.c: Likewise. * gcc.target/i386/avx-vlddqu-256-1.c: Likewise. * gcc.target/i386/avx-vmaskmovpd-256-1.c: Likewise. * gcc.target/i386/avx-vmaskmovpd-256-2.c: Likewise. * gcc.target/i386/avx-vmaskmovps-256-1.c: Likewise. * gcc.target/i386/avx-vmaskmovps-256-2.c: Likewise. * gcc.target/i386/avx-vmaxpd-1.c: Likewise. * gcc.target/i386/avx-vmaxpd-256-1.c: Likewise. * gcc.target/i386/avx-vmaxps-1.c: Likewise. * gcc.target/i386/avx-vmaxps-256-1.c: Likewise. * gcc.target/i386/avx-vmaxsd-1.c: Likewise. * gcc.target/i386/avx-vmaxss-1.c: Likewise. * gcc.target/i386/avx-vminpd-1.c: Likewise. * gcc.target/i386/avx-vminpd-256-1.c: Likewise. * gcc.target/i386/avx-vminps-1.c: Likewise. * gcc.target/i386/avx-vminps-256-1.c: Likewise. * gcc.target/i386/avx-vminsd-1.c: Likewise. * gcc.target/i386/avx-vminss-1.c: Likewise. * gcc.target/i386/avx-vmovapd-1.c: Likewise. * gcc.target/i386/avx-vmovapd-256-1.c: Likewise. * gcc.target/i386/avx-vmovapd-256-2.c: Likewise. * gcc.target/i386/avx-vmovapd-2.c: Likewise. * gcc.target/i386/avx-vmovaps-1.c: Likewise. * gcc.target/i386/avx-vmovaps-256-1.c: Likewise. * gcc.target/i386/avx-vmovaps-256-2.c: Likewise. * gcc.target/i386/avx-vmovaps-2.c: Likewise. * gcc.target/i386/avx-vmovd-1.c: Likewise. * gcc.target/i386/avx-vmovd-2.c: Likewise. * gcc.target/i386/avx-vmovddup-1.c: Likewise. * gcc.target/i386/avx-vmovddup-256-1.c: Likewise. * gcc.target/i386/avx-vmovdqa-1.c: Likewise. * gcc.target/i386/avx-vmovdqa-256-1.c: Likewise. * gcc.target/i386/avx-vmovdqa-256-2.c: Likewise. * gcc.target/i386/avx-vmovdqa-2.c: Likewise. * gcc.target/i386/avx-vmovdqu-1.c: Likewise. * gcc.target/i386/avx-vmovdqu-256-1.c: Likewise. * gcc.target/i386/avx-vmovdqu-256-2.c: Likewise. * gcc.target/i386/avx-vmovdqu-2.c: Likewise. * gcc.target/i386/avx-vmovhlps-1.c: Likewise. * gcc.target/i386/avx-vmovhpd-1.c: Likewise. * gcc.target/i386/avx-vmovhpd-2.c: Likewise. * gcc.target/i386/avx-vmovhps-1.c: Likewise. * gcc.target/i386/avx-vmovhps-2.c: Likewise. * gcc.target/i386/avx-vmovlhps-1.c: Likewise. * gcc.target/i386/avx-vmovlpd-1.c: Likewise. * gcc.target/i386/avx-vmovlpd-2.c: Likewise. * gcc.target/i386/avx-vmovmskpd-1.c: Likewise. * gcc.target/i386/avx-vmovmskpd-256-1.c: Likewise. * gcc.target/i386/avx-vmovmskps-1.c: Likewise. * gcc.target/i386/avx-vmovmskps-256-1.c: Likewise. * gcc.target/i386/avx-vmovntdq-1.c: Likewise. * gcc.target/i386/avx-vmovntdqa-1.c: Likewise. * gcc.target/i386/avx-vmovntpd-1.c: Likewise. * gcc.target/i386/avx-vmovntps-1.c: Likewise. * gcc.target/i386/avx-vmovq-1.c: Likewise. * gcc.target/i386/avx-vmovq-2.c: Likewise. * gcc.target/i386/avx-vmovq-3.c: Likewise. * gcc.target/i386/avx-vmovsd-1.c: Likewise. * gcc.target/i386/avx-vmovsd-2.c: Likewise. * gcc.target/i386/avx-vmovshdup-1.c: Likewise. * gcc.target/i386/avx-vmovshdup-256-1.c: Likewise. * gcc.target/i386/avx-vmovsldup-1.c: Likewise. * gcc.target/i386/avx-vmovsldup-256-1.c: Likewise. * gcc.target/i386/avx-vmovss-1.c: Likewise. * gcc.target/i386/avx-vmovss-2.c: Likewise. * gcc.target/i386/avx-vmovss-3.c: Likewise. * gcc.target/i386/avx-vmovupd-1.c: Likewise. * gcc.target/i386/avx-vmovupd-256-1.c: Likewise. * gcc.target/i386/avx-vmovupd-256-2.c: Likewise. * gcc.target/i386/avx-vmovupd-2.c: Likewise. * gcc.target/i386/avx-vmovups-1.c: Likewise. * gcc.target/i386/avx-vmovups-256-1.c: Likewise. * gcc.target/i386/avx-vmovups-256-2.c: Likewise. * gcc.target/i386/avx-vmovups-2.c: Likewise. * gcc.target/i386/avx-vmpsadbw-1.c: Likewise. * gcc.target/i386/avx-vmulpd-1.c: Likewise. * gcc.target/i386/avx-vmulpd-256-1.c: Likewise. * gcc.target/i386/avx-vmulps-1.c: Likewise. * gcc.target/i386/avx-vmulps-256-1.c: Likewise. * gcc.target/i386/avx-vmulsd-1.c: Likewise. * gcc.target/i386/avx-vmulss-1.c: Likewise. * gcc.target/i386/avx-vorpd-1.c: Likewise. * gcc.target/i386/avx-vorpd-256-1.c: Likewise. * gcc.target/i386/avx-vorps-1.c: Likewise. * gcc.target/i386/avx-vorps-256-1.c: Likewise. * gcc.target/i386/avx-vpabsb-1.c: Likewise. * gcc.target/i386/avx-vpabsd-1.c: Likewise. * gcc.target/i386/avx-vpabsw-1.c: Likewise. * gcc.target/i386/avx-vpackssdw-1.c: Likewise. * gcc.target/i386/avx-vpacksswb-1.c: Likewise. * gcc.target/i386/avx-vpackusdw-1.c: Likewise. * gcc.target/i386/avx-vpackuswb-1.c: Likewise. * gcc.target/i386/avx-vpaddb-1.c: Likewise. * gcc.target/i386/avx-vpaddd-1.c: Likewise. * gcc.target/i386/avx-vpaddq-1.c: Likewise. * gcc.target/i386/avx-vpaddsb-1.c: Likewise. * gcc.target/i386/avx-vpaddsw-1.c: Likewise. * gcc.target/i386/avx-vpaddusb-1.c: Likewise. * gcc.target/i386/avx-vpaddusw-1.c: Likewise. * gcc.target/i386/avx-vpaddw-1.c: Likewise. * gcc.target/i386/avx-vpalignr-1.c: Likewise. * gcc.target/i386/avx-vpand-1.c: Likewise. * gcc.target/i386/avx-vpandn-1.c: Likewise. * gcc.target/i386/avx-vpavgb-1.c: Likewise. * gcc.target/i386/avx-vpavgw-1.c: Likewise. * gcc.target/i386/avx-vpblendvb-1.c: Likewise. * gcc.target/i386/avx-vpblendw-1.c: Likewise. * gcc.target/i386/avx-vpcmpeqb-1.c: Likewise. * gcc.target/i386/avx-vpcmpeqd-1.c: Likewise. * gcc.target/i386/avx-vpcmpeqq-1.c: Likewise. * gcc.target/i386/avx-vpcmpeqw-1.c: Likewise. * gcc.target/i386/avx-vpcmpestri-1.c: Likewise. * gcc.target/i386/avx-vpcmpestri-2.c: Likewise. * gcc.target/i386/avx-vpcmpestrm-1.c: Likewise. * gcc.target/i386/avx-vpcmpestrm-2.c: Likewise. * gcc.target/i386/avx-vpcmpgtb-1.c: Likewise. * gcc.target/i386/avx-vpcmpgtd-1.c: Likewise. * gcc.target/i386/avx-vpcmpgtq-1.c: Likewise. * gcc.target/i386/avx-vpcmpgtw-1.c: Likewise. * gcc.target/i386/avx-vpcmpistri-1.c: Likewise. * gcc.target/i386/avx-vpcmpistri-2.c: Likewise. * gcc.target/i386/avx-vpcmpistrm-1.c: Likewise. * gcc.target/i386/avx-vpcmpistrm-2.c: Likewise. * gcc.target/i386/avx-vperm2f128-256-1.c: Likewise. * gcc.target/i386/avx-vperm2f128-256-2.c: Likewise. * gcc.target/i386/avx-vperm2f128-256-3.c: Likewise. * gcc.target/i386/avx-vpermil2pd-1.c: Likewise. * gcc.target/i386/avx-vpermil2pd-256-1.c: Likewise. * gcc.target/i386/avx-vpermil2ps-1.c: Likewise. * gcc.target/i386/avx-vpermil2ps-256-1.c: Likewise. * gcc.target/i386/avx-vpermilpd-1.c: Likewise. * gcc.target/i386/avx-vpermilpd-256-1.c: Likewise. * gcc.target/i386/avx-vpermilpd-256-2.c: Likewise. * gcc.target/i386/avx-vpermilpd-2.c: Likewise. * gcc.target/i386/avx-vpermilps-1.c: Likewise. * gcc.target/i386/avx-vpermilps-256-1.c: Likewise. * gcc.target/i386/avx-vpermilps-256-2.c: Likewise. * gcc.target/i386/avx-vpermilps-2.c: Likewise. * gcc.target/i386/avx-vpextrb-1.c: Likewise. * gcc.target/i386/avx-vpextrd-1.c: Likewise. * gcc.target/i386/avx-vpextrq-1.c: Likewise. * gcc.target/i386/avx-vpextrw-1.c: Likewise. * gcc.target/i386/avx-vphaddd-1.c: Likewise. * gcc.target/i386/avx-vphaddsw-1.c: Likewise. * gcc.target/i386/avx-vphaddw-1.c: Likewise. * gcc.target/i386/avx-vphminposuw-1.c: Likewise. * gcc.target/i386/avx-vphsubd-1.c: Likewise. * gcc.target/i386/avx-vphsubsw-1.c: Likewise. * gcc.target/i386/avx-vphsubw-1.c: Likewise. * gcc.target/i386/avx-vpinsrb-1.c: Likewise. * gcc.target/i386/avx-vpinsrd-1.c: Likewise. * gcc.target/i386/avx-vpinsrq-1.c: Likewise. * gcc.target/i386/avx-vpmaddubsw-1.c: Likewise. * gcc.target/i386/avx-vpmaxsb-1.c: Likewise. * gcc.target/i386/avx-vpmaxsd-1.c: Likewise. * gcc.target/i386/avx-vpmaxsw-1.c: Likewise. * gcc.target/i386/avx-vpmaxub-1.c: Likewise. * gcc.target/i386/avx-vpmaxud-1.c: Likewise. * gcc.target/i386/avx-vpmaxuw-1.c: Likewise. * gcc.target/i386/avx-vpminsb-1.c: Likewise. * gcc.target/i386/avx-vpminsd-1.c: Likewise. * gcc.target/i386/avx-vpminsw-1.c: Likewise. * gcc.target/i386/avx-vpminub-1.c: Likewise. * gcc.target/i386/avx-vpminud-1.c: Likewise. * gcc.target/i386/avx-vpminuw-1.c: Likewise. * gcc.target/i386/avx-vpmovmskb-1.c: Likewise. * gcc.target/i386/avx-vpmovsxbd-1.c: Likewise. * gcc.target/i386/avx-vpmovsxbq-1.c: Likewise. * gcc.target/i386/avx-vpmovsxbw-1.c: Likewise. * gcc.target/i386/avx-vpmovsxdq-1.c: Likewise. * gcc.target/i386/avx-vpmovsxwd-1.c: Likewise. * gcc.target/i386/avx-vpmovsxwq-1.c: Likewise. * gcc.target/i386/avx-vpmovzxbd-1.c: Likewise. * gcc.target/i386/avx-vpmovzxbq-1.c: Likewise. * gcc.target/i386/avx-vpmovzxbw-1.c: Likewise. * gcc.target/i386/avx-vpmovzxdq-1.c: Likewise. * gcc.target/i386/avx-vpmovzxwd-1.c: Likewise. * gcc.target/i386/avx-vpmovzxwq-1.c: Likewise. * gcc.target/i386/avx-vpmuldq-1.c: Likewise. * gcc.target/i386/avx-vpmulhrsw-1.c: Likewise. * gcc.target/i386/avx-vpmulhuw-1.c: Likewise. * gcc.target/i386/avx-vpmulhw-1.c: Likewise. * gcc.target/i386/avx-vpmulld-1.c: Likewise. * gcc.target/i386/avx-vpmullw-1.c: Likewise. * gcc.target/i386/avx-vpmuludq-1.c: Likewise. * gcc.target/i386/avx-vpor-1.c: Likewise. * gcc.target/i386/avx-vpsadbw-1.c: Likewise. * gcc.target/i386/avx-vpshufb-1.c: Likewise. * gcc.target/i386/avx-vpshufd-1.c: Likewise. * gcc.target/i386/avx-vpshufhw-1.c: Likewise. * gcc.target/i386/avx-vpshuflw-1.c: Likewise. * gcc.target/i386/avx-vpsignb-1.c: Likewise. * gcc.target/i386/avx-vpsignd-1.c: Likewise. * gcc.target/i386/avx-vpsignw-1.c: Likewise. * gcc.target/i386/avx-vpslld-1.c: Likewise. * gcc.target/i386/avx-vpslld-2.c: Likewise. * gcc.target/i386/avx-vpslldq-1.c: Likewise. * gcc.target/i386/avx-vpsllq-1.c: Likewise. * gcc.target/i386/avx-vpsllq-2.c: Likewise. * gcc.target/i386/avx-vpsllw-1.c: Likewise. * gcc.target/i386/avx-vpsllw-2.c: Likewise. * gcc.target/i386/avx-vpsrad-1.c: Likewise. * gcc.target/i386/avx-vpsrad-2.c: Likewise. * gcc.target/i386/avx-vpsraw-1.c: Likewise. * gcc.target/i386/avx-vpsraw-2.c: Likewise. * gcc.target/i386/avx-vpsrld-1.c: Likewise. * gcc.target/i386/avx-vpsrld-2.c: Likewise. * gcc.target/i386/avx-vpsrldq-1.c: Likewise. * gcc.target/i386/avx-vpsrlq-1.c: Likewise. * gcc.target/i386/avx-vpsrlq-2.c: Likewise. * gcc.target/i386/avx-vpsrlw-1.c: Likewise. * gcc.target/i386/avx-vpsrlw-2.c: Likewise. * gcc.target/i386/avx-vpsubb-1.c: Likewise. * gcc.target/i386/avx-vpsubd-1.c: Likewise. * gcc.target/i386/avx-vpsubq-1.c: Likewise. * gcc.target/i386/avx-vpsubsb-1.c: Likewise. * gcc.target/i386/avx-vpsubsw-1.c: Likewise. * gcc.target/i386/avx-vpsubw-1.c: Likewise. * gcc.target/i386/avx-vptest-1.c: Likewise. * gcc.target/i386/avx-vptest-256-1.c: Likewise. * gcc.target/i386/avx-vptest-256-2.c: Likewise. * gcc.target/i386/avx-vptest-256-3.c: Likewise. * gcc.target/i386/avx-vptest-2.c: Likewise. * gcc.target/i386/avx-vptest-3.c: Likewise. * gcc.target/i386/avx-vpunpckhbw-1.c: Likewise. * gcc.target/i386/avx-vpunpckhdq-1.c: Likewise. * gcc.target/i386/avx-vpunpckhqdq-1.c: Likewise. * gcc.target/i386/avx-vpunpckhwd-1.c: Likewise. * gcc.target/i386/avx-vpunpcklbw-1.c: Likewise. * gcc.target/i386/avx-vpunpckldq-1.c: Likewise. * gcc.target/i386/avx-vpunpcklqdq-1.c: Likewise. * gcc.target/i386/avx-vpunpcklwd-1.c: Likewise. * gcc.target/i386/avx-vpxor-1.c: Likewise. * gcc.target/i386/avx-vrcpps-1.c: Likewise. * gcc.target/i386/avx-vrcpps-256-1.c: Likewise. * gcc.target/i386/avx-vroundpd-1.c: Likewise. * gcc.target/i386/avx-vroundpd-256-1.c: Likewise. * gcc.target/i386/avx-vroundpd-256-2.c: Likewise. * gcc.target/i386/avx-vroundpd-256-3.c: Likewise. * gcc.target/i386/avx-vroundpd-2.c: Likewise. * gcc.target/i386/avx-vroundpd-3.c: Likewise. * gcc.target/i386/avx-vroundps-256-1.c: Likewise. * gcc.target/i386/avx-vrsqrtps-1.c: Likewise. * gcc.target/i386/avx-vrsqrtps-256-1.c: Likewise. * gcc.target/i386/avx-vshufpd-1.c: Likewise. * gcc.target/i386/avx-vshufpd-256-1.c: Likewise. * gcc.target/i386/avx-vshufps-1.c: Likewise. * gcc.target/i386/avx-vshufps-256-1.c: Likewise. * gcc.target/i386/avx-vsqrtpd-1.c: Likewise. * gcc.target/i386/avx-vsqrtpd-256-1.c: Likewise. * gcc.target/i386/avx-vsqrtps-1.c: Likewise. * gcc.target/i386/avx-vsqrtps-256-1.c: Likewise. * gcc.target/i386/avx-vsubpd-1.c: Likewise. * gcc.target/i386/avx-vsubpd-256-1.c: Likewise. * gcc.target/i386/avx-vsubps-1.c: Likewise. * gcc.target/i386/avx-vsubps-256-1.c: Likewise. * gcc.target/i386/avx-vsubsd-1.c: Likewise. * gcc.target/i386/avx-vsubss-1.c: Likewise. * gcc.target/i386/avx-vtestpd-1.c: Likewise. * gcc.target/i386/avx-vtestpd-256-1.c: Likewise. * gcc.target/i386/avx-vtestpd-256-2.c: Likewise. * gcc.target/i386/avx-vtestpd-256-3.c: Likewise. * gcc.target/i386/avx-vtestpd-2.c: Likewise. * gcc.target/i386/avx-vtestpd-3.c: Likewise. * gcc.target/i386/avx-vtestps-1.c: Likewise. * gcc.target/i386/avx-vtestps-256-1.c: Likewise. * gcc.target/i386/avx-vtestps-256-2.c: Likewise. * gcc.target/i386/avx-vtestps-256-3.c: Likewise. * gcc.target/i386/avx-vtestps-2.c: Likewise. * gcc.target/i386/avx-vtestps-3.c: Likewise. * gcc.target/i386/avx-vucomisd-1.c: Likewise. * gcc.target/i386/avx-vucomisd-2.c: Likewise. * gcc.target/i386/avx-vucomisd-3.c: Likewise. * gcc.target/i386/avx-vucomisd-4.c: Likewise. * gcc.target/i386/avx-vucomisd-5.c: Likewise. * gcc.target/i386/avx-vucomisd-6.c: Likewise. * gcc.target/i386/avx-vucomiss-1.c: Likewise. * gcc.target/i386/avx-vucomiss-2.c: Likewise. * gcc.target/i386/avx-vucomiss-3.c: Likewise. * gcc.target/i386/avx-vucomiss-4.c: Likewise. * gcc.target/i386/avx-vucomiss-5.c: Likewise. * gcc.target/i386/avx-vucomiss-6.c: Likewise. * gcc.target/i386/avx-vunpckhpd-1.c: Likewise. * gcc.target/i386/avx-vunpckhpd-256-1.c: Likewise. * gcc.target/i386/avx-vunpckhps-1.c: Likewise. * gcc.target/i386/avx-vunpckhps-256-1.c: Likewise. * gcc.target/i386/avx-vunpcklpd-1.c: Likewise. * gcc.target/i386/avx-vunpcklpd-256-1.c: Likewise. * gcc.target/i386/avx-vunpcklps-1.c: Likewise. * gcc.target/i386/avx-vunpcklps-256-1.c: Likewise. * gcc.target/i386/avx-vxorpd-1.c: Likewise. * gcc.target/i386/avx-vxorpd-256-1.c: Likewise. * gcc.target/i386/avx-vxorps-1.c: Likewise. * gcc.target/i386/avx-vxorps-256-1.c: Likewise. * gcc.target/i386/avx-vzeroall-1.c: Likewise. * gcc.target/i386/avx-vzeroall-2.c: Likewise. * gcc.target/i386/avx-vzeroupper-1.c: Likewise. * gcc.target/i386/avx-vzeroupper-2.c: Likewise. * gcc.target/i386/m256-1.c: Likewise. * gcc.target/i386/m256-2.c: Likewise. * gcc.target/i386/m256-check.h: Likewise. * gcc.target/i386/sse2-addpd-1.c: Likewise. * gcc.target/i386/sse2-addsd-1.c: Likewise. * gcc.target/i386/sse2-andnpd-1.c: Likewise. * gcc.target/i386/sse2-andpd-1.c: Likewise. * gcc.target/i386/sse2-comisd-1.c: Likewise. * gcc.target/i386/sse2-comisd-2.c: Likewise. * gcc.target/i386/sse2-comisd-3.c: Likewise. * gcc.target/i386/sse2-comisd-4.c: Likewise. * gcc.target/i386/sse2-comisd-5.c: Likewise. * gcc.target/i386/sse2-comisd-6.c: Likewise. * gcc.target/i386/sse2-cvtdq2pd-1.c: Likewise. * gcc.target/i386/sse2-cvtdq2ps-1.c: Likewise. * gcc.target/i386/sse2-cvtpd2dq-1.c: Likewise. * gcc.target/i386/sse2-cvtpd2ps-1.c: Likewise. * gcc.target/i386/sse2-cvtps2dq-1.c: Likewise. * gcc.target/i386/sse2-cvtps2pd-1.c: Likewise. * gcc.target/i386/sse2-cvtsd2si-1.c: Likewise. * gcc.target/i386/sse2-cvtsd2si-2.c: Likewise. * gcc.target/i386/sse2-cvtsd2ss-1.c: Likewise. * gcc.target/i386/sse2-cvtsi2sd-1.c: Likewise. * gcc.target/i386/sse2-cvtsi2sd-2.c: Likewise. * gcc.target/i386/sse2-cvtss2sd-1.c: Likewise. * gcc.target/i386/sse2-cvttpd2dq-1.c: Likewise. * gcc.target/i386/sse2-cvttps2dq-1.c: Likewise. * gcc.target/i386/sse2-cvttsd2si-1.c: Likewise. * gcc.target/i386/sse2-cvttsd2si-2.c: Likewise. * gcc.target/i386/sse2-divpd-1.c: Likewise. * gcc.target/i386/sse2-divsd-1.c: Likewise. * gcc.target/i386/sse2-maxpd-1.c: Likewise. * gcc.target/i386/sse2-maxsd-1.c: Likewise. * gcc.target/i386/sse2-minpd-1.c: Likewise. * gcc.target/i386/sse2-minsd-1.c: Likewise. * gcc.target/i386/sse2-movapd-1.c: Likewise. * gcc.target/i386/sse2-movapd-2.c: Likewise. * gcc.target/i386/sse2-movd-1.c: Likewise. * gcc.target/i386/sse2-movd-2.c: Likewise. * gcc.target/i386/sse2-movdqa-1.c: Likewise. * gcc.target/i386/sse2-movdqa-2.c: Likewise. * gcc.target/i386/sse2-movdqu-1.c: Likewise. * gcc.target/i386/sse2-movdqu-2.c: Likewise. * gcc.target/i386/sse2-movhpd-1.c: Likewise. * gcc.target/i386/sse2-movhpd-2.c: Likewise. * gcc.target/i386/sse2-movlpd-1.c: Likewise. * gcc.target/i386/sse2-movlpd-2.c: Likewise. * gcc.target/i386/sse2-movmskpd-1.c: Likewise. * gcc.target/i386/sse2-movntdq-1.c: Likewise. * gcc.target/i386/sse2-movntpd-1.c: Likewise. * gcc.target/i386/sse2-movq-1.c: Likewise. * gcc.target/i386/sse2-movq-2.c: Likewise. * gcc.target/i386/sse2-movq-3.c: Likewise. * gcc.target/i386/sse2-movsd-1.c: Likewise. * gcc.target/i386/sse2-movsd-2.c: Likewise. * gcc.target/i386/sse2-movupd-1.c: Likewise. * gcc.target/i386/sse2-movupd-2.c: Likewise. * gcc.target/i386/sse2-mulpd-1.c: Likewise. * gcc.target/i386/sse2-mulsd-1.c: Likewise. * gcc.target/i386/sse2-orpd-1.c: Likewise. * gcc.target/i386/sse2-packssdw-1.c: Likewise. * gcc.target/i386/sse2-packsswb-1.c: Likewise. * gcc.target/i386/sse2-packuswb-1.c: Likewise. * gcc.target/i386/sse2-paddb-1.c: Likewise. * gcc.target/i386/sse2-paddd-1.c: Likewise. * gcc.target/i386/sse2-paddq-1.c: Likewise. * gcc.target/i386/sse2-paddsb-1.c: Likewise. * gcc.target/i386/sse2-paddsw-1.c: Likewise. * gcc.target/i386/sse2-paddusb-1.c: Likewise. * gcc.target/i386/sse2-paddusw-1.c: Likewise. * gcc.target/i386/sse2-paddw-1.c: Likewise. * gcc.target/i386/sse2-pand-1.c: Likewise. * gcc.target/i386/sse2-pandn-1.c: Likewise. * gcc.target/i386/sse2-pavgb-1.c: Likewise. * gcc.target/i386/sse2-pavgw-1.c: Likewise. * gcc.target/i386/sse2-pcmpeqb-1.c: Likewise. * gcc.target/i386/sse2-pcmpeqd-1.c: Likewise. * gcc.target/i386/sse2-pcmpeqw-1.c: Likewise. * gcc.target/i386/sse2-pcmpgtb-1.c: Likewise. * gcc.target/i386/sse2-pcmpgtd-1.c: Likewise. * gcc.target/i386/sse2-pcmpgtw-1.c: Likewise. * gcc.target/i386/sse2-pmaddwd-1.c: Likewise. * gcc.target/i386/sse2-pmaxsw-1.c: Likewise. * gcc.target/i386/sse2-pmaxub-1.c: Likewise. * gcc.target/i386/sse2-pminsw-1.c: Likewise. * gcc.target/i386/sse2-pminub-1.c: Likewise. * gcc.target/i386/sse2-pmovmskb-1.c: Likewise. * gcc.target/i386/sse2-pmulhuw-1.c: Likewise. * gcc.target/i386/sse2-pmulhw-1.c: Likewise. * gcc.target/i386/sse2-pmullw-1.c: Likewise. * gcc.target/i386/sse2-pmuludq-1.c: Likewise. * gcc.target/i386/sse2-por-1.c: Likewise. * gcc.target/i386/sse2-psadbw-1.c: Likewise. * gcc.target/i386/sse2-pshufd-1.c: Likewise. * gcc.target/i386/sse2-pshufhw-1.c: Likewise. * gcc.target/i386/sse2-pshuflw-1.c: Likewise. * gcc.target/i386/sse2-pslld-1.c: Likewise. * gcc.target/i386/sse2-pslld-2.c: Likewise. * gcc.target/i386/sse2-pslldq-1.c: Likewise. * gcc.target/i386/sse2-psllq-1.c: Likewise. * gcc.target/i386/sse2-psllq-2.c: Likewise. * gcc.target/i386/sse2-psllw-1.c: Likewise. * gcc.target/i386/sse2-psllw-2.c: Likewise. * gcc.target/i386/sse2-psrad-1.c: Likewise. * gcc.target/i386/sse2-psrad-2.c: Likewise. * gcc.target/i386/sse2-psraw-1.c: Likewise. * gcc.target/i386/sse2-psraw-2.c: Likewise. * gcc.target/i386/sse2-psrld-1.c: Likewise. * gcc.target/i386/sse2-psrld-2.c: Likewise. * gcc.target/i386/sse2-psrldq-1.c: Likewise. * gcc.target/i386/sse2-psrlq-1.c: Likewise. * gcc.target/i386/sse2-psrlq-2.c: Likewise. * gcc.target/i386/sse2-psrlw-1.c: Likewise. * gcc.target/i386/sse2-psrlw-2.c: Likewise. * gcc.target/i386/sse2-psubb-1.c: Likewise. * gcc.target/i386/sse2-psubd-1.c: Likewise. * gcc.target/i386/sse2-psubq-1.c: Likewise. * gcc.target/i386/sse2-psubsb-1.c: Likewise. * gcc.target/i386/sse2-psubsw-1.c: Likewise. * gcc.target/i386/sse2-psubw-1.c: Likewise. * gcc.target/i386/sse2-punpckhbw-1.c: Likewise. * gcc.target/i386/sse2-punpckhdq-1.c: Likewise. * gcc.target/i386/sse2-punpckhqdq-1.c: Likewise. * gcc.target/i386/sse2-punpckhwd-1.c: Likewise. * gcc.target/i386/sse2-punpcklbw-1.c: Likewise. * gcc.target/i386/sse2-punpckldq-1.c: Likewise. * gcc.target/i386/sse2-punpcklqdq-1.c: Likewise. * gcc.target/i386/sse2-punpcklwd-1.c: Likewise. * gcc.target/i386/sse2-pxor-1.c: Likewise. * gcc.target/i386/sse2-shufpd-1.c: Likewise. * gcc.target/i386/sse2-shufps-1.c: Likewise. * gcc.target/i386/sse2-sqrtpd-1.c: Likewise. * gcc.target/i386/sse2-subpd-1.c: Likewise. * gcc.target/i386/sse2-subsd-1.c: Likewise. * gcc.target/i386/sse2-ucomisd-1.c: Likewise. * gcc.target/i386/sse2-ucomisd-2.c: Likewise. * gcc.target/i386/sse2-ucomisd-3.c: Likewise. * gcc.target/i386/sse2-ucomisd-4.c: Likewise. * gcc.target/i386/sse2-ucomisd-5.c: Likewise. * gcc.target/i386/sse2-ucomisd-6.c: Likewise. * gcc.target/i386/sse2-unpckhpd-1.c: Likewise. * gcc.target/i386/sse2-unpcklpd-1.c: Likewise. * gcc.target/i386/sse2-xorpd-1.c: Likewise. * gcc.target/i386/sse-addps-1.c: Likewise. * gcc.target/i386/sse-addss-1.c: Likewise. * gcc.target/i386/sse-andnps-1.c: Likewise. * gcc.target/i386/sse-andps-1.c: Likewise. * gcc.target/i386/sse-comiss-1.c: Likewise. * gcc.target/i386/sse-comiss-2.c: Likewise. * gcc.target/i386/sse-comiss-3.c: Likewise. * gcc.target/i386/sse-comiss-4.c: Likewise. * gcc.target/i386/sse-comiss-5.c: Likewise. * gcc.target/i386/sse-comiss-6.c: Likewise. * gcc.target/i386/sse-cvtsi2ss-1.c: Likewise. * gcc.target/i386/sse-cvtsi2ss-2.c: Likewise. * gcc.target/i386/sse-cvtss2si-1.c: Likewise. * gcc.target/i386/sse-cvtss2si-2.c: Likewise. * gcc.target/i386/sse-cvttss2si-1.c: Likewise. * gcc.target/i386/sse-cvttss2si-2.c: Likewise. * gcc.target/i386/sse-divps-1.c: Likewise. * gcc.target/i386/sse-divss-1.c: Likewise. * gcc.target/i386/sse-maxps-1.c: Likewise. * gcc.target/i386/sse-maxss-1.c: Likewise. * gcc.target/i386/sse-minps-1.c: Likewise. * gcc.target/i386/sse-minss-1.c: Likewise. * gcc.target/i386/sse-movaps-1.c: Likewise. * gcc.target/i386/sse-movaps-2.c: Likewise. * gcc.target/i386/sse-movhlps-1.c: Likewise. * gcc.target/i386/sse-movhps-1.c: Likewise. * gcc.target/i386/sse-movhps-2.c: Likewise. * gcc.target/i386/sse-movlhps-1.c: Likewise. * gcc.target/i386/sse-movmskps-1.c: Likewise. * gcc.target/i386/sse-movntps-1.c: Likewise. * gcc.target/i386/sse-movss-1.c: Likewise. * gcc.target/i386/sse-movss-2.c: Likewise. * gcc.target/i386/sse-movss-3.c: Likewise. * gcc.target/i386/sse-movups-1.c: Likewise. * gcc.target/i386/sse-movups-2.c: Likewise. * gcc.target/i386/sse-mulps-1.c: Likewise. * gcc.target/i386/sse-mulss-1.c: Likewise. * gcc.target/i386/sse-orps-1.c: Likewise. * gcc.target/i386/sse-rcpps-1.c: Likewise. * gcc.target/i386/sse-rsqrtps-1.c: Likewise. * gcc.target/i386/sse-sqrtps-1.c: Likewise. * gcc.target/i386/sse-subps-1.c: Likewise. * gcc.target/i386/sse-subss-1.c: Likewise. * gcc.target/i386/sse-ucomiss-1.c: Likewise. * gcc.target/i386/sse-ucomiss-2.c: Likewise. * gcc.target/i386/sse-ucomiss-3.c: Likewise. * gcc.target/i386/sse-ucomiss-4.c: Likewise. * gcc.target/i386/sse-ucomiss-5.c: Likewise. * gcc.target/i386/sse-ucomiss-6.c: Likewise. * gcc.target/i386/sse-unpckhps-1.c: Likewise. * gcc.target/i386/sse-unpcklps-1.c: Likewise. * gcc.target/i386/sse-xorps-1.c: Likewise. * gcc.target/i386/vararg-10.c: Likewise. * gcc.target/i386/vararg-3.c: Likewise. * gcc.target/i386/vararg-4.c: Likewise. * gcc.target/i386/vararg-5.c: Likewise. * gcc.target/i386/vararg-6.c: Likewise. * gcc.target/i386/vararg-7.c: Likewise. * gcc.target/i386/vararg-8.c: Likewise. * gcc.target/i386/vararg-9.c: Likewise. * g++.dg/other/i386-5.C: Likewise. * g++.dg/other/i386-6.C: Likewise. * gcc.target/i386/aesdec.c (CHECK_H): New. (TEST): New. Include CHECK_H instead of "XXX-check.h" and run TEST instead of XXX_test. * gcc.target/i386/aesdeclast.c: Likewise. * gcc.target/i386/aesenc.c: Likewise. * gcc.target/i386/aesenclast.c: Likewise. * gcc.target/i386/aesimc.c: Likewise. * gcc.target/i386/aeskeygenassist.c: Likewise. * gcc.target/i386/sse3-addsubpd.c: Likewise. * gcc.target/i386/sse3-addsubps.c: Likewise. * gcc.target/i386/sse3-haddpd.c: Likewise. * gcc.target/i386/sse3-haddps.c: Likewise. * gcc.target/i386/sse3-hsubpd.c: Likewise. * gcc.target/i386/sse3-hsubps.c: Likewise. * gcc.target/i386/sse3-lddqu.c: Likewise. * gcc.target/i386/sse3-movddup.c: Likewise. * gcc.target/i386/sse3-movshdup.c: Likewise. * gcc.target/i386/sse3-movsldup.c: Likewise. * gcc.target/i386/sse4_1-blendpd.c: Likewise. * gcc.target/i386/sse4_1-blendps.c: Likewise. * gcc.target/i386/sse4_1-dppd-1.c: Likewise. * gcc.target/i386/sse4_1-dppd-2.c: Likewise. * gcc.target/i386/sse4_1-dpps-1.c: Likewise. * gcc.target/i386/sse4_1-dpps-2.c: Likewise. * gcc.target/i386/sse4_1-extractps.c: Likewise. * gcc.target/i386/sse4_1-insertps-1.c: Likewise. * gcc.target/i386/sse4_1-insertps-2.c: Likewise. * gcc.target/i386/sse4_1-movntdqa.c: Likewise. * gcc.target/i386/sse4_1-mpsadbw.c: Likewise. * gcc.target/i386/sse4_1-packusdw.c: Likewise. * gcc.target/i386/sse4_1-pblendvb.c: Likewise. * gcc.target/i386/sse4_1-pblendw.c: Likewise. * gcc.target/i386/sse4_1-pcmpeqq.c: Likewise. * gcc.target/i386/sse4_1-pextrb.c: Likewise. * gcc.target/i386/sse4_1-pextrd.c: Likewise. * gcc.target/i386/sse4_1-pextrq.c: Likewise. * gcc.target/i386/sse4_1-pextrw.c: Likewise. * gcc.target/i386/sse4_1-phminposuw.c: Likewise. * gcc.target/i386/sse4_1-pinsrb.c: Likewise. * gcc.target/i386/sse4_1-pinsrd.c: Likewise. * gcc.target/i386/sse4_1-pinsrq.c: Likewise. * gcc.target/i386/sse4_1-pmaxsb.c: Likewise. * gcc.target/i386/sse4_1-pmaxsd.c: Likewise. * gcc.target/i386/sse4_1-pmaxud.c: Likewise. * gcc.target/i386/sse4_1-pmaxuw.c: Likewise. * gcc.target/i386/sse4_1-pminsb.c: Likewise. * gcc.target/i386/sse4_1-pminsd.c: Likewise. * gcc.target/i386/sse4_1-pminud.c: Likewise. * gcc.target/i386/sse4_1-pminuw.c: Likewise. * gcc.target/i386/sse4_1-pmovsxbd.c: Likewise. * gcc.target/i386/sse4_1-pmovsxbq.c: Likewise. * gcc.target/i386/sse4_1-pmovsxbw.c: Likewise. * gcc.target/i386/sse4_1-pmovsxdq.c: Likewise. * gcc.target/i386/sse4_1-pmovsxwd.c: Likewise. * gcc.target/i386/sse4_1-pmovsxwq.c: Likewise. * gcc.target/i386/sse4_1-pmovzxbd.c: Likewise. * gcc.target/i386/sse4_1-pmovzxbq.c: Likewise. * gcc.target/i386/sse4_1-pmovzxbw.c: Likewise. * gcc.target/i386/sse4_1-pmovzxdq.c: Likewise. * gcc.target/i386/sse4_1-pmovzxwd.c: Likewise. * gcc.target/i386/sse4_1-pmovzxwq.c: Likewise. * gcc.target/i386/sse4_1-pmuldq.c: Likewise. * gcc.target/i386/sse4_1-pmulld.c: Likewise. * gcc.target/i386/sse4_1-ptest-1.c: Likewise. * gcc.target/i386/sse4_1-ptest-2.c: Likewise. * gcc.target/i386/sse4_1-ptest-3.c: Likewise. * gcc.target/i386/sse4_1-roundpd-1.c: Likewise. * gcc.target/i386/sse4_1-roundpd-2.c: Likewise. * gcc.target/i386/sse4_1-roundpd-3.c: Likewise. * gcc.target/i386/sse4_2-pcmpestri-1.c: Likewise. * gcc.target/i386/sse4_2-pcmpestri-2.c: Likewise. * gcc.target/i386/sse4_2-pcmpestrm-1.c: Likewise. * gcc.target/i386/sse4_2-pcmpestrm-2.c: Likewise. * gcc.target/i386/sse4_2-pcmpgtq.c: Likewise. * gcc.target/i386/sse4_2-pcmpistri-1.c: Likewise. * gcc.target/i386/sse4_2-pcmpistri-2.c: Likewise. * gcc.target/i386/sse4_2-pcmpistrm-1.c: Likewise. * gcc.target/i386/sse4_2-pcmpistrm-2.c: Likewise. * gcc.target/i386/ssse3-pabsb.c: Likewise. Don't run MMX tests for AVX. * gcc.target/i386/ssse3-pabsd.c: Likewise. * gcc.target/i386/ssse3-pabsw.c: Likewise. * gcc.target/i386/ssse3-palignr.c: Likewise. * gcc.target/i386/ssse3-phaddd.c: Likewise. * gcc.target/i386/ssse3-phaddsw.c: Likewise. * gcc.target/i386/ssse3-phaddw.c: Likewise. * gcc.target/i386/ssse3-phsubd.c: Likewise. * gcc.target/i386/ssse3-phsubsw.c: Likewise. * gcc.target/i386/ssse3-phsubw.c: Likewise. * gcc.target/i386/ssse3-pmaddubsw.c: Likewise. * gcc.target/i386/ssse3-pmulhrsw.c: Likewise. * gcc.target/i386/ssse3-pshufb.c: Likewise. * gcc.target/i386/ssse3-psignb.c: Likewise. * gcc.target/i386/ssse3-psignd.c: Likewise. * gcc.target/i386/ssse3-psignw.c: Likewise. * gcc.target/i386/i386.exp (check_effective_target_vaes): New. * gcc.target/i386/m128-check.h: Include <xmmintrin.h>. Include <emmintrin.h> for SSE2. (union128i_b): Defined only for SSE2. (union128i_w): Likewise. (union128i_d): Likewise. (union128i_q): Likewise. (union128d): Likewise. (check_union128i_b): Likewise. (check_union128i_w): Likewise. (check_union128i_d): Likewise. (check_union128i_q): Likewise. (check_union128d): Likewise. (union128i_ub): New. (union128i_uw): Likewise. (check_union128i_ub): Likewise. (check_union128i_uw): Likewise. (ESP_FLOAT): Likewise. (ESP_DOUBLE): Likewise. (CHECK_ARRAY): Likewise. (checkVd): Likewise. (checkVf): Likewise. (ieee754_float): Likewise. (ieee754_double): Likewise. * gcc.target/i386/sse-check.h: Include "m128-check.h". * gcc.target/x86_64/abi/abi-x86_64.exp: Replace asm-support.s with asm-support.S. * gcc.target/x86_64/abi/asm-support.s: Renamed to ... * gcc.target/x86_64/abi/asm-support.S: This. Add ".sse_check none" if __AVX__ is defined. * lib/target-supports.exp (check_effective_target_avx): New. Co-Authored-By: H.J. Lu <hongjiu.lu@intel.com> Co-Authored-By: Joey Ye <joey.ye@intel.com> From-SVN: r139730
2008-08-28 21:36:58 +02:00
# Return 1 if avx instructions can be compiled.
proc check_effective_target_avx { } {
return [check_no_compiler_messages avx object {
void _mm256_zeroall (void)
{
__builtin_ia32_vzeroall ();
}
} "-O2 -mavx" ]
}
# Return 1 if C wchar_t type is compatible with char16_t.
proc check_effective_target_wchar_t_char16_t_compatible { } {
return [check_no_compiler_messages wchar_t_char16_t object {
__WCHAR_TYPE__ wc;
__CHAR16_TYPE__ *p16 = &wc;
char t[(((__CHAR16_TYPE__) -1) < 0 == ((__WCHAR_TYPE__) -1) < 0) ? 1 : -1];
}]
}
# Return 1 if C wchar_t type is compatible with char32_t.
proc check_effective_target_wchar_t_char32_t_compatible { } {
return [check_no_compiler_messages wchar_t_char32_t object {
__WCHAR_TYPE__ wc;
__CHAR32_TYPE__ *p32 = &wc;
char t[(((__CHAR32_TYPE__) -1) < 0 == ((__WCHAR_TYPE__) -1) < 0) ? 1 : -1];
}]
}
# Return 1 if pow10 function exists.
proc check_effective_target_pow10 { } {
return [check_runtime pow10 {
#include <math.h>
int main () {
double x;
x = pow10 (1);
return 0;
}
} "-lm" ]
}
# Return 1 if current options generate DFP instructions, 0 otherwise.
proc check_effective_target_hard_dfp {} {
return [check_no_messages_and_pattern hard_dfp "!adddd3" assembly {
_Decimal64 x, y, z;
void foo (void) { z = x + y; }
}]
}
# Return 1 if string.h and wchar.h headers provide C++ requires overloads
# for strchr etc. functions.
proc check_effective_target_correct_iso_cpp_string_wchar_protos { } {
return [check_no_compiler_messages correct_iso_cpp_string_wchar_protos assembly {
#include <string.h>
#include <wchar.h>
#if !defined(__cplusplus) \
|| !defined(__CORRECT_ISO_CPP_STRING_H_PROTO) \
|| !defined(__CORRECT_ISO_CPP_WCHAR_H_PROTO)
ISO C++ correct string.h and wchar.h protos not supported.
#else
int i;
#endif
}]
}
# Return 1 if the MPC library is integrated with GCC, 0 otherwise.
proc check_effective_target_mpc { } {
return [check_no_compiler_messages mpc executable {
extern void link_error(void);
int main ()
{
if (__builtin_csin(0) != 0)
link_error();
}
}]
}