aboutsummaryrefslogtreecommitdiff
path: root/gcc/config.in
AgeCommit message (Collapse)AuthorFilesLines
2020-12-24C++ : Add the -stdlib= option.Iain Sandoe1-0/+6
This option allows the user to specifiy alternate C++ runtime libraries, for example when a platform uses libc++ as the installed C++ runtime. We introduce the command line option: -stdlib= which is the user-facing mechanism to select the C++ runtime to be used when compiling and linking code. This is the same option spelling as that used by clang to allow the use of libstdc++. The availability (and thus function) of the option are a configure-time choice using the configuration control: --with-gxx-libcxx-include-dir= Specification of the path for the libc++ headers, enables the -stdlib= option (using the path as given), default values are set when the path is unconfigured. If --with-gxx-libcxx-include-dir is given together with --with-sysroot=, then we test to see if the include path starts with the sysroot and, if so, record the sysroot-relative component as the local path. At runtime, we prepend the sysroot that is actually active. At link time, we use the C++ runtime in force and (if that is libc++) also append the libc++abi ABI library. As for other cases, if a target sets the name pointer for the ABI library to NULL the G++ driver will omit it from the link line. gcc/ChangeLog: * configure.ac: Add gxx-libcxx-include-dir handled in the same way as the regular cxx header directory. * Makefile.in: Regenerated. * config.in: Likewise. * configure: Likewise. * cppdefault.c: Pick up libc++ headers if the option is enabled. * cppdefault.h (struct default_include): Amend comments to reflect the extended use of the cplusplus field. * incpath.c (add_standard_paths): Allow for multiple c++ header include path variants. * doc/invoke.texi: Document the -stdlib= option. gcc/c-family/ChangeLog: * c.opt: Add -stdlib= option and enumerations for libstdc++ and libc++. gcc/cp/ChangeLog: * g++spec.c (LIBCXX, LIBCXX_PROFILE, LIBCXX_STATIC): New. (LIBCXXABI, LIBCXXABI_PROFILE, LIBCXXABI_STATIC): New. (enum stdcxxlib_kind): New. (lang_specific_driver): Allow selection amongst multiple c++ runtime libraries.
2020-12-02Use the section flag 'o' for __patchable_function_entriesH.J. Lu1-0/+6
This commit in GNU binutils 2.35: https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=commit;h=b7d072167715829eed0622616f6ae0182900de3e added the section flag 'o' to .section directive: .section __patchable_function_entries,"awo",@progbits,foo which specifies the symbol name which the section references. Assembler creates a unique __patchable_function_entries section with the section, where foo is defined, as its linked-to section. Linker keeps a section if its linked-to section is kept during garbage collection. This patch checks assembler support for the section flag 'o' and uses it to implement __patchable_function_entries section. Since Solaris may use GNU assembler with Solairs ld. Even if GNU assembler supports the section flag 'o', it doesn't mean that Solairs ld supports it. This feature is disabled for Solairs targets. gcc/ PR middle-end/93195 PR middle-end/93197 * configure.ac (HAVE_GAS_SECTION_LINK_ORDER): New. Define 1 if the assembler supports the section flag 'o' for specifying section with link-order. * output.h (SECTION_LINK_ORDER): New. Defined to 0x8000000. (SECTION_MACH_DEP): Changed from 0x8000000 to 0x10000000. * targhooks.c (default_print_patchable_function_entry): Pass SECTION_LINK_ORDER to switch_to_section if the section flag 'o' works. Pass current_function_decl to switch_to_section. * varasm.c (default_elf_asm_named_section): Use 'o' flag for SECTION_LINK_ORDER if assembler supports it. * config.in: Regenerated. * configure: Likewise. * doc/sourcebuild.texi: Document o_flag_in_section. gcc/testsuite/ PR middle-end/93195 * g++.dg/pr93195a.C: New test. * g++.dg/pr93195b.C: Likewise. * lib/target-supports.exp (check_effective_target_o_flag_in_section): New proc.
2020-12-01Use SHF_GNU_RETAIN to preserve symbol definitionsH.J. Lu1-0/+7
In assemly code, the section flag 'R' sets the SHF_GNU_RETAIN flag to indicate that the section must be preserved by the linker. Add SECTION_RETAIN to indicate a section should be retained by the linker and set SECTION_RETAIN on section for the preserved symbol if assembler supports SHF_GNU_RETAIN. All retained symbols are placed in separate sections with .section .data.rel.local.preserved_symbol,"awR" preserved_symbol: ... .section .data.rel.local,"aw" not_preserved_symbol: ... to avoid .section .data.rel.local,"awR" preserved_symbol: ... not_preserved_symbol: ... which places not_preserved_symbol definition in the SHF_GNU_RETAIN section. gcc/ 2020-12-01 H.J. Lu <hjl.tools@gmail.com> * configure.ac (HAVE_GAS_SHF_GNU_RETAIN): New. Define 1 if the assembler supports marking sections with SHF_GNU_RETAIN flag. * output.h (SECTION_RETAIN): New. Defined as 0x4000000. (SECTION_MACH_DEP): Changed from 0x4000000 to 0x8000000. (default_unique_section): Add a bool argument. * varasm.c (get_section): Set SECTION_RETAIN for the preserved symbol with HAVE_GAS_SHF_GNU_RETAIN. (resolve_unique_section): Used named section for the preserved symbol if assembler supports SHF_GNU_RETAIN. (get_variable_section): Handle the preserved common symbol with HAVE_GAS_SHF_GNU_RETAIN. (default_elf_asm_named_section): Require the full declaration and use the 'R' flag for SECTION_RETAIN. * config.in: Regenerated. * configure: Likewise. * doc/sourcebuild.texi: Document R_flag_in_section. gcc/testsuite/ 2020-12-01 H.J. Lu <hjl.tools@gmail.com> Jozef Lawrynowicz <jozef.l@mittosystems.com> * c-c++-common/attr-used.c: Check the 'R' flag. * c-c++-common/attr-used-2.c: Likewise. * c-c++-common/attr-used-3.c: New test. * c-c++-common/attr-used-4.c: Likewise. * gcc.c-torture/compile/attr-used-retain-1.c: Likewise. * gcc.c-torture/compile/attr-used-retain-2.c: Likewise. * lib/target-supports.exp (check_effective_target_R_flag_in_section): New proc.
2020-12-01IBM Z: Configure excess precision for float at compile-timeMarius Hillenbrand1-0/+4
Historically, float_t has been defined as double on s390 and gcc would emit double precision insns for evaluating float expressions when in standard-compliant mode. Configure that behavior at compile-time as prep for changes in glibc: When glibc ties float_t to double, keep the old behavior; when glibc derives float_t from FLT_EVAL_METHOD (as on most other archs), revert to the default behavior (i.e., FLT_EVAL_METHOD_PROMOTE_TO_FLOAT). Provide a configure option --enable-s390-excess-float-precision to override the check. gcc/ChangeLog: 2020-12-01 Marius Hillenbrand <mhillen@linux.ibm.com> * configure.ac: Add configure option --enable-s390-excess-float-precision and check to derive default from glibc. * config/s390/s390.c: Guard s390_excess_precision with an ifdef for ENABLE_S390_EXCESS_FLOAT_PRECISION. * doc/install.texi: Document --enable-s390-excess-float-precision. * configure: Regenerate. * config.in: Regenerate.
2020-11-19config: Add tests for modules-desired featuresNathan Sidwell1-12/+48
this adds configure tests for features that modules can take advantage of -- and if they are not present has reduced or fallback functionality. gcc/ * configure.ac: Add tests for fstatat, sighandler_t, O_CLOEXEC, unix-domain and ipv6 sockets. * config.in: Rebuilt. * configure: Rebuilt.
2020-11-18RISC-V: Support version controling for ISA standard extensionsKito Cheng1-0/+12
- New option -misa-spec support: -misa-spec=[2.2|20190608|20191213] and corresponding configuration option --with-isa-spec. - Current default ISA spec set to 2.2, but we intend to bump this to 20191213 or later in next release. gcc/ChangeLog: * common/config/riscv/riscv-common.c (riscv_ext_version): New. (riscv_ext_version_table): Ditto. (get_default_version): Ditto. (riscv_subset_t::implied_p): New field. (riscv_subset_t::riscv_subset_t): Init implied_p. (riscv_subset_list::add): New. (riscv_subset_list::handle_implied_ext): Pass riscv_subset_t instead of separated argument. (riscv_subset_list::to_string): Handle zifencei and zicsr, and omit version if version is unknown. (riscv_subset_list::parsing_subset_version): New argument `ext`, remove default_major_version and default_minor_version, get default version info via get_default_version. (riscv_subset_list::parse_std_ext): Update argument for parsing_subset_version calls. Handle 2.2 ISA spec, always enable zicsr and zifencei, they are included in baseline ISA in that time. (riscv_subset_list::parse_multiletter_ext): Update argument for `parsing_subset_version` and `add` calls. (riscv_subset_list::parse): Adjust argument for riscv_subset_list::handle_implied_ext call. * config.gcc (riscv*-*-*): Handle --with-isa-spec=. * config.in (HAVE_AS_MISA_SPEC): New. (HAVE_AS_MARCH_ZIFENCEI): Ditto. * config/riscv/riscv-opts.h (riscv_isa_spec_class): New. (riscv_isa_spec): Ditto. * config/riscv/riscv.h (HAVE_AS_MISA_SPEC): New. (ASM_SPEC): Pass -misa-spec if gas supported. * config/riscv/riscv.opt (riscv_isa_spec_class) New. * configure.ac (HAVE_AS_MARCH_ZIFENCEI): New test. (HAVE_AS_MISA_SPEC): Ditto. * configure: Regen. gcc/testsuite/ChangeLog: * gcc.target/riscv/arch-9.c: New. * gcc.target/riscv/arch-10.c: Ditto. * gcc.target/riscv/arch-11.c: Ditto. * gcc.target/riscv/attribute-6.c: Remove, we don't support G with version anymore. * gcc.target/riscv/attribute-8.c: Reorder arch string to fit canonical ordering. * gcc.target/riscv/attribute-9.c: We don't emit version for unknown extensions now. * gcc.target/riscv/attribute-11.c: Add -misa-spec=2.2 flags. * gcc.target/riscv/attribute-12.c: Ditto. * gcc.target/riscv/attribute-13.c: Ditto. * gcc.target/riscv/attribute-14.c: Ditto. * gcc.target/riscv/attribute-15.c: New. * gcc.target/riscv/attribute-16.c: Ditto. * gcc.target/riscv/attribute-17.c: Ditto.
2020-10-24Update check for working assembler --gdwarf-4 optionH.J. Lu1-3/+3
Rename HAVE_AS_WORKING_DWARF_4_FLAG to HAVE_AS_WORKING_DWARF_N_FLAG Don't set HAVE_AS_WORKING_DWARF_N_FLAG if --gdwarf-5/--gdwarf-4 generate an extra assembly input file in debug info from compiler generated .debug_line or fail with the APP marker: https://sourceware.org/bugzilla/show_bug.cgi?id=25878 https://sourceware.org/bugzilla/show_bug.cgi?id=26740 https://sourceware.org/bugzilla/show_bug.cgi?id=26778 Also replace success with dwarf4_success in the 32-bit --gdwarf-4 check. PR bootstrap/97451 * configure.ac (HAVE_AS_WORKING_DWARF_4_FLAG): Renamed to ... (HAVE_AS_WORKING_DWARF_N_FLAG): This. Don't define if there is an extra assembly input file in debug info. Replace success with dwarf4_success in the 32-bit --gdwarf-4 check. * dwarf2out.c (asm_outputs_debug_line_str): Check HAVE_AS_WORKING_DWARF_N_FLAG instead of HAVE_AS_WORKING_DWARF_4_FLAG. * gcc.c (ASM_DEBUG_SPEC): Likewise. (ASM_DEBUG_OPTION_SPEC): Likewise. * config.in: Regenerated. * configure: Likewise.
2020-10-07debug: Pass --gdwarf-N to assembler if fixed gas is detected during configureJakub Jelinek1-0/+13
> > As for the test assembly, I'd say we should take > > #define F void foo (void) {} > > F > > compile it with > > gcc -S -O2 -g1 -dA -gno-as-loc-support -fno-merge-debug-strings > > remove .cfi_* directives, remove the ret instruction, change @function > > and @progbits to %function and %progbits, change .uleb128 to just .byte, > > I think all the values should be small enough, maybe change .value to > > .2byte and .long to .4byte (whatever is most portable across different > > arches and gas versions), simplify (shorten) strings and adjust > > sizes, and do something with the .quad directives, that is dependent on > > the address size, perhaps just take those attributes out and adjust > > .debug_abbrev? Finally, remove all comments (emit them in the first case > > just to better understand the debug info). > > I'm afraid it is hard to avoid the .quad or .8byte. > Here is a 64-bit address version that assembles fine by both x86_64 and > aarch64 as. > Unfortunately doesn't fail with broken gas versions with -gdwarf-2 without > the nop, so we'll need at least a nop in there. > Fortunately gcc/configure.ac already determines the right nop insn for the > target, in $insn. > So I guess what we want next is have the 32-bit version of this with .4byte > instead of .8byte and just let's try to assemble both versions, first > without -gdwarf-2 and the one that succeeds assemble again with -gdwarf-2 > and check for the duplicate .debug_line sections error. Ok, here it is in patch form. I've briefly tested it, with the older binutils I have around (no --gdwarf-N support), with latest gas (--gdwarf-N that can be passed to as even when compiling C/C++ etc. code and emitting .debug_line) and latest gas with Mark's fix reverted (--gdwarf-N support, but can only pass it to as when assembling user .s/.S files, not when compiling C/C++ etc.). 2020-10-07 Jakub Jelinek <jakub@redhat.com> * configure.ac (HAVE_AS_GDWARF_5_DEBUG_FLAG, HAVE_AS_WORKING_DWARF_4_FLAG): New tests. * gcc.c (ASM_DEBUG_DWARF_OPTION): Define. (ASM_DEBUG_SPEC): Use ASM_DEBUG_DWARF_OPTION instead of "--gdwarf2". Use %{cond:opt1;:opt2} style. (ASM_DEBUG_OPTION_DWARF_OPT): Define. (ASM_DEBUG_OPTION_SPEC): Define. (asm_debug_option): New variable. (asm_options): Add "%(asm_debug_option)". (static_specs): Add asm_debug_option entry. (static_spec_functions): Add dwarf-version-gt. (debug_level_greater_than_spec_func): New function. * config/darwin.h (ASM_DEBUG_OPTION_SPEC): Define. * config/darwin9.h (ASM_DEBUG_OPTION_SPEC): Redefine. * config.in: Regenerated. * configure: Regenerated.
2020-09-21Fix fallout from Support new mallinfo2 function.Jakub Jelinek1-1/+2
2020-09-21 Jakub Jelinek <jakub@redhat.com> * configure.ac: Use mallinfo mallinfo2 as first operand of gcc_AC_CHECK_DECLS rather than [mallinfo, mallinfo2]. * configure: Regenerated. * config.in: Regenerated.
2020-09-21Support new mallinfo2 function.Martin Liska1-2/+14
gcc/ChangeLog: * config.in: Regenerate. * configure: Likewise. * configure.ac: Detect for mallinfo2. * ggc-common.c (defined): Use it. * system.h: Handle also HAVE_MALLINFO2.
2020-08-03Removal of HSA offloading from gcc and libgompMartin Jambor1-6/+0
This patch removes the generation of HSAIL from the compiler, the HSA offloading plugin from libgomp and the associated testsuite tests and infrastructure bits from the respective testsuites. Apart from removal of the obvious files, I removed bits that I found by searching for HSA related terms and by re-tracing my steps and looking at the patches that introduced HSA in the first place. I did not remove everything these patches brought in, for example: - the mechanism to pass offload-target specific info from the application to the offloading plugin - but the same mechanism is also used to communicate number of teams and the thread limit to all offload targets. - run_func hook in gomp_device_descr stays too, although now it is not used. If some future offload target would like the ability to refuse to offload some functions, it can use it. It is easy to remove as a follow-up if it is considered clutter, though. - configure options --with-hsa-runtime=PATH, -with-hsa-runtime-include=PATH and --with-hsa-runtime-lib=PATH rmeain because GCN uses them too. - Surprisingly, GOMP_TARGET_ARG_HSA_KERNEL_ATTRIBUTES (a constant from gomp-constants.h) appears in the source of the amdgcn libgomp plugin, although I tend to think that code path is not ever used and this patch certainly removes it from the compiler. Nevertheless, it seems it has potential value beyond HSAIL and so I've kept it, it can of course always be easily removed in the future of GCN folk abandon it too. - I assume constants OFFLOAD_TARGET_TYPE_HSA and GOMP_DEVICE_HSA need to stay indefinitely too just so that no future offload target picks that number. - I have kept dg-require-effective-target offload_device_nonshared_as requirement of thests which have it. It is quite probable I missed some small HSA artifacts but those should be easy to remove later as we find them. include/ChangeLog: 2020-07-24 Martin Jambor <mjambor@suse.cz> * gomp-constants.h (GOMP_VERSION_HSA): Remove. gcc/ChangeLog: 2020-07-24 Martin Jambor <mjambor@suse.cz> * hsa-brig-format.h: Moved to brig/brigfrontend. * hsa-brig.c: Removed. * hsa-builtins.def: Likewise. * hsa-common.c: Likewise. * hsa-common.h: Likewise. * hsa-dump.c: Likewise. * hsa-gen.c: Likewise. * hsa-regalloc.c: Likewise. * ipa-hsa.c: Likewise. * omp-grid.c: Likewise. * omp-grid.h: Likewise. * Makefile.in (BUILTINS_DEF): Remove hsa-builtins.def. (OBJS): Remove hsa-common.o, hsa-gen.o, hsa-regalloc.o, hsa-brig.o, hsa-dump.o, ipa-hsa.c and omp-grid.o. (GTFILES): Removed hsa-common.c and omp-expand.c. * builtins.def: Remove processing of hsa-builtins.def. (DEF_HSA_BUILTIN): Remove. * common.opt (flag_disable_hsa): Remove. (-Whsa): Ignore. * config.in (ENABLE_HSA): Removed. * configure.ac: Removed handling configuration for hsa offloading. (ENABLE_HSA): Removed. * configure: Regenerated. * doc/install.texi (--enable-offload-targets): Remove hsa from the example. (--with-hsa-runtime): Reword to reference any HSA run-time, not specifically HSA offloading. * doc/invoke.texi (Option Summary): Remove -Whsa. (Warning Options): Likewise. (Optimize Options): Remove hsa-gen-debug-stores. * doc/passes.texi (Regular IPA passes): Remove section on IPA HSA pass. * gimple-low.c (lower_stmt): Remove GIMPLE_OMP_GRID_BODY case. * gimple-pretty-print.c (dump_gimple_omp_for): Likewise. (dump_gimple_omp_block): Likewise. (pp_gimple_stmt_1): Likewise. * gimple-walk.c (walk_gimple_stmt): Likewise. * gimple.c (gimple_build_omp_grid_body): Removed function. (gimple_copy): Remove GIMPLE_OMP_GRID_BODY case. * gimple.def (GIMPLE_OMP_GRID_BODY): Removed. * gimple.h (gf_mask): Removed GF_OMP_PARALLEL_GRID_PHONY, OMP_FOR_KIND_GRID_LOOP, GF_OMP_FOR_GRID_PHONY, GF_OMP_FOR_GRID_INTRA_GROUP, GF_OMP_FOR_GRID_GROUP_ITER and GF_OMP_TEAMS_GRID_PHONY. Renumbered GF_OMP_FOR_KIND_SIMD and GF_OMP_TEAMS_HOST. (gimple_build_omp_grid_body): Removed declaration. (gimple_has_substatements): Remove GIMPLE_OMP_GRID_BODY case. (gimple_omp_for_grid_phony): Removed. (gimple_omp_for_set_grid_phony): Likewise. (gimple_omp_for_grid_intra_group): Likewise. (gimple_omp_for_grid_intra_group): Likewise. (gimple_omp_for_grid_group_iter): Likewise. (gimple_omp_for_set_grid_group_iter): Likewise. (gimple_omp_parallel_grid_phony): Likewise. (gimple_omp_parallel_set_grid_phony): Likewise. (gimple_omp_teams_grid_phony): Likewise. (gimple_omp_teams_set_grid_phony): Likewise. (CASE_GIMPLE_OMP): Remove GIMPLE_OMP_GRID_BODY case. * lto-section-in.c (lto_section_name): Removed hsa. * lto-streamer.h (lto_section_type): Removed LTO_section_ipa_hsa. * lto-wrapper.c (compile_images_for_offload_targets): Remove special handling of hsa. * omp-expand.c: Do not include hsa-common.h and gt-omp-expand.h. (parallel_needs_hsa_kernel_p): Removed. (grid_launch_attributes_trees): Likewise. (grid_launch_attributes_trees): Likewise. (grid_create_kernel_launch_attr_types): Likewise. (grid_insert_store_range_dim): Likewise. (grid_get_kernel_launch_attributes): Likewise. (get_target_arguments): Remove code passing HSA grid sizes. (grid_expand_omp_for_loop): Remove. (grid_arg_decl_map): Likewise. (grid_remap_kernel_arg_accesses): Likewise. (grid_expand_target_grid_body): Likewise. (expand_omp): Remove call to grid_expand_target_grid_body. (omp_make_gimple_edges): Remove GIMPLE_OMP_GRID_BODY case. * omp-general.c: Do not include hsa-common.h. (omp_maybe_offloaded): Do not check for HSA offloading. (omp_context_selector_matches): Likewise. * omp-low.c: Do not include hsa-common.h and omp-grid.h. (build_outer_var_ref): Remove handling of GIMPLE_OMP_GRID_BODY. (scan_sharing_clauses): Remove handling of OMP_CLAUSE__GRIDDIM_. (scan_omp_parallel): Remove handling of the phoney variant. (check_omp_nesting_restrictions): Remove handling of GIMPLE_OMP_GRID_BODY and GF_OMP_FOR_KIND_GRID_LOOP. (scan_omp_1_stmt): Remove handling of GIMPLE_OMP_GRID_BODY. (lower_omp_for_lastprivate): Remove handling of gridified loops. (lower_omp_for): Remove phony loop handling. (lower_omp_taskreg): Remove phony construct handling. (lower_omp_teams): Likewise. (lower_omp_grid_body): Removed. (lower_omp_1): Remove GIMPLE_OMP_GRID_BODY case. (execute_lower_omp): Do not call omp_grid_gridify_all_targets. * opts.c (common_handle_option): Do not handle hsa when processing OPT_foffload_. * params.opt (hsa-gen-debug-stores): Remove. * passes.def: Remove pass_ipa_hsa and pass_gen_hsail. * timevar.def: Remove TV_IPA_HSA. * toplev.c: Do not include hsa-common.h. (compile_file): Do not call hsa_output_brig. * tree-core.h (enum omp_clause_code): Remove OMP_CLAUSE__GRIDDIM_. (tree_omp_clause): Remove union field dimension. * tree-nested.c (convert_nonlocal_omp_clauses): Remove the OMP_CLAUSE__GRIDDIM_ case. (convert_local_omp_clauses): Likewise. * tree-pass.h (make_pass_gen_hsail): Remove declaration. (make_pass_ipa_hsa): Likewise. * tree-pretty-print.c (dump_omp_clause): Remove GIMPLE_OMP_GRID_BODY case. * tree.c (omp_clause_num_ops): Remove the element corresponding to OMP_CLAUSE__GRIDDIM_. (omp_clause_code_name): Likewise. (walk_tree_1): Remove GIMPLE_OMP_GRID_BODY case. * tree.h (OMP_CLAUSE__GRIDDIM__DIMENSION): Remove. (OMP_CLAUSE__GRIDDIM__SIZE): Likewise. (OMP_CLAUSE__GRIDDIM__GROUP): Likewise. gcc/fortran/ChangeLog: 2020-07-24 Martin Jambor <mjambor@suse.cz> * f95-lang.c (gfc_init_builtin_functions): Remove processing of hsa-builtins.def. gcc/brig/ChangeLog: 2020-07-24 Martin Jambor <mjambor@suse.cz> * brigfrontend/brig-util.h (hsa_type_packed_p): Declared. * brigfrontend/brig-util.cc (hsa_type_packed_p): Moved here from removed gcc/hsa-common.c. libgomp/ChangeLog: 2020-07-24 Martin Jambor <mjambor@suse.cz> * plugin/Makefrag.am: Remove configuration of HSA plugin. * aclocal.m4: Regenerated. * Makefile.in: Regenerated. * config.h.in: Regenerated. * configure: Regenerated. * plugin/configfrag.ac: Likewise. * plugin/hsa_ext_finalize.h: Removed. * plugin/plugin-hsa.c: Likewise. * testsuite/Makefile.in: Regenerated. * testsuite/lib/libgomp.exp (offload_target_to_openacc_device_type): Remove hsa case. (check_effective_target_hsa_offloading_selected_nocache): Removed (check_effective_target_hsa_offloading_selected): Likewise. (libgomp_init): Do not add -Wno-hsa to additional_flags. * testsuite/libgomp.hsa.c/alloca-1.c: Removed test. * testsuite/libgomp.hsa.c/bitfield-1.c: Likewise. * testsuite/libgomp.hsa.c/bits-insns.c: Likewise. * testsuite/libgomp.hsa.c/builtins-1.c: Likewise. * testsuite/libgomp.hsa.c/c.exp: Likewise. * testsuite/libgomp.hsa.c/complex-1.c: Likewise. * testsuite/libgomp.hsa.c/complex-align-2.c: Likewise. * testsuite/libgomp.hsa.c/formal-actual-args-1.c: Likewise. * testsuite/libgomp.hsa.c/function-call-1.c: Likewise. * testsuite/libgomp.hsa.c/get-level-1.c: Likewise. * testsuite/libgomp.hsa.c/gridify-1.c: Likewise. * testsuite/libgomp.hsa.c/gridify-2.c: Likewise. * testsuite/libgomp.hsa.c/gridify-3.c: Likewise. * testsuite/libgomp.hsa.c/gridify-4.c: Likewise. * testsuite/libgomp.hsa.c/memory-operations-1.c: Likewise. * testsuite/libgomp.hsa.c/pr69568.c: Likewise. * testsuite/libgomp.hsa.c/pr82416.c: Likewise. * testsuite/libgomp.hsa.c/rotate-1.c: Likewise. * testsuite/libgomp.hsa.c/staticvar.c: Likewise. * testsuite/libgomp.hsa.c/switch-1.c: Likewise. * testsuite/libgomp.hsa.c/switch-branch-1.c: Likewise. * testsuite/libgomp.hsa.c/switch-sbr-2.c: Likewise. * testsuite/libgomp.hsa.c/tiling-1.c: Likewise. * testsuite/libgomp.hsa.c/tiling-2.c: Likewise. gcc/testsuite/ChangeLog: 2020-07-24 Martin Jambor <mjambor@suse.cz> * lib/target-supports.exp (check_effective_target_offload_hsa): Removed. * c-c++-common/gomp/gridify-1.c: Removed test. * c-c++-common/gomp/gridify-2.c: Likewise. * c-c++-common/gomp/gridify-3.c: Likewise. * c-c++-common/gomp/hsa-indirect-call-1.c: Likewise. * gfortran.dg/gomp/gridify-1.f90: Likewise. * gcc.dg/gomp/gomp.exp: Do not pass -Wno-hsa to tests. * g++.dg/gomp/gomp.exp: Likewise. * gfortran.dg/gomp/gomp.exp: Likewise.
2020-06-16S/390: Emit vector alignment hints for z13 if AS accepts themStefan Schulze Frielinghaus1-0/+7
Since 87cb9423add vector alignment hints are emitted for target z13, too. This patch changes this behaviour in the sense that alignment hints are only emitted for target z13 if the assembler accepts them. gcc/ChangeLog: * config.in: Regenerate. * config/s390/s390.c (print_operand): Emit vector alignment hints for target z13, if AS accepts them. For other targets the logic stays the same. * config/s390/s390.h (TARGET_VECTOR_LOADSTORE_ALIGNMENT_HINTS): Define macro. * configure: Regenerate. * configure.ac: Check HAVE_AS_VECTOR_LOADSTORE_ALIGNMENT_HINTS_ON_Z13.
2020-04-30--with-{documentation,changes}-root-url tweaksJakub Jelinek1-0/+12
> , CHANGES_URL ("gcc-10/changes.html#empty_base"); > > where the macro would just use preprocessor string concatenation? Ok, the following patch implements it (doesn't introduce a separate macro and just uses CHANGES_ROOT_URL "gcc-10/changes.html#empty_base"), in addition adds the documentation Joseph requested. 2020-04-30 Jakub Jelinek <jakub@redhat.com> * configure.ac (--with-documentation-root-url, --with-changes-root-url): Diagnose URL not ending with /, use AC_DEFINE_UNQUOTED instead of AC_SUBST. * opts.h (get_changes_url): Remove. * opts.c (get_changes_url): Remove. * Makefile.in (CFLAGS-opts.o): Don't add -DDOCUMENTATION_ROOT_URL or -DCHANGES_ROOT_URL. * doc/install.texi (--with-documentation-root-url, --with-changes-root-url): Document. * config/arm/arm.c (aapcs_vfp_is_call_or_return_candidate): Don't call get_changes_url and free, change url variable type to const char * and set it to CHANGES_ROOT_URL "gcc-10/changes.html#empty_base". * config/s390/s390.c (s390_function_arg_vector, s390_function_arg_float): Likewise. * config/aarch64/aarch64.c (aarch64_vfp_is_call_or_return_candidate): Likewise. * config/rs6000/rs6000-call.c (rs6000_discover_homogeneous_aggregate): Likewise. * config.in: Regenerate. * configure: Regenerate.
2020-02-15PR 87488: Add --with-diagnostics-urls configuration optionBernd Edlinger1-0/+6
2020-02-15 David Malcolm <dmalcolm@redhat.com> Bernd Edlinger <bernd.edlinger@hotmail.de> PR 87488 PR other/93168 * config.in (DIAGNOSTICS_URLS_DEFAULT): New define. * configure.ac (--with-diagnostics-urls): New configuration option, based on --with-diagnostics-color. (DIAGNOSTICS_URLS_DEFAULT): New define. * config.h: Regenerate. * configure: Regenerate. * diagnostic.c (diagnostic_urls_init): Handle -1 for DIAGNOSTICS_URLS_DEFAULT from configure-time --with-diagnostics-urls=auto-if-env by querying for a GCC_URLS and TERM_URLS environment variable. * diagnostic-url.h (diagnostic_url_format): New enum type. (diagnostic_urls_enabled_p): rename to... (determine_url_format): ... this, and change return type. * diagnostic-color.c (parse_env_vars_for_urls): New helper function. (auto_enable_urls): Disable URLs on xfce4-terminal, gnome-terminal, the linux console, and mingw. (diagnostic_urls_enabled_p): rename to... (determine_url_format): ... this, and adjust. * pretty-print.h (pretty_printer::show_urls): rename to... (pretty_printer::url_format): ... this, and change to enum. * pretty-print.c (pretty_printer::pretty_printer, pp_begin_url, pp_end_url, test_urls): Adjust. * doc/install.texi (--with-diagnostics-urls): Document the new configuration option. (--with-diagnostics-color): Document the existing interaction with GCC_COLORS better. * doc/invoke.texi (-fdiagnostics-urls): Add GCC_URLS and TERM_URLS vindex reference. Update description of defaults based on the above. (-fdiagnostics-color): Update description of how -fdiagnostics-color interacts with GCC_COLORS.
2020-01-31nios2: Support for GOT-relative DW_EH_PE_datarel encoding.Sandra Loosemore1-0/+6
On nios2-linux-gnu, there has been a long-standing bug in C++ exception handling that sometimes resulted in link errors like ../nios2-linux-gnu/bin/ld: FDE encoding in /tmp/cccfpQ2l.o(.eh_frame) prevents .eh_frame_hdr table being created when building some shared libraries or PIE executables. The root of the problem is that GCC was incorrectly emitting an absolute encoding in EH tables for PIC. This patch changes it to use either DW_EH_PE_indirect (for global) or DW_EH_PE_datarel (for local), and fixes libgcc so it can find the address of the GOT as the base address for DW_EH_PE_datarel. Complicating matters somewhat, GAS was missing support for %gotoff(symbol) relocation syntax. I have just pushed a fix for that, but I've added a configure check to test for presence of the binutils support and fall back to the current absolute encoding (which works most of the time) if it is not available. Once the fix makes it into an official binutils release it might be appropriate to make this error out instead. Since this is a wrong-code bug and affects only nios2 target, I think this is appropriate for Stage 4. I regression-tested on both nios2-linux-gnu and nios2-elf, with and without the binutils support present, before committing this. 2020-01-31 Sandra Loosemore <sandra@codesourcery.com> gcc/ * configure.ac [nios2-*-*]: Check HAVE_AS_NIOS2_GOTOFF_RELOCATION. * config.in: Regenerated. * configure: Regenerated. * config/nios2/nios2.h (ASM_PREFERRED_EH_DATA_FORMAT): Fix handling for PIC when HAVE_AS_NIOS2_GOTOFF_RELOCATION. (ASM_MAYBE_OUTPUT_ENCODED_ADDR_RTX): New. gcc/testsuite/ * g++.target/nios2/hello-pie.C: New. * g++.target/nios2/nios2.exp: New. libgcc/ * config.host [nios2-*-linux*] (tmake_file, tm_file): Adjust. * config/nios2-elf-lib.h: New. * unwind-dw2-fde-dip.c (_Unwind_IteratePhdrCallback): Use existing code for finding GOT base for nios2.
2020-01-30Regenerate configure for 54b3d52Dragan Mladjenovic1-0/+6
Commit 54b3d52 ("Emit .note.GNU-stack for hard-float linux targets.") was missing generated files. Add them now. gcc/ChangeLog: 2020-01-30 Dragan Mladjenovic <dmladjenovic@wavecomp.com> * config.in: Regenerated. * configure: Regenerated.
2020-01-14Initial commit of analyzerDavid Malcolm1-0/+6
This patch adds a static analysis pass to the middle-end, focusing for this release on C code, and malloc/free issues in particular. See: https://gcc.gnu.org/wiki/DavidMalcolm/StaticAnalyzer gcc/ChangeLog: * Makefile.in (lang_opt_files): Add analyzer.opt. (ANALYZER_OBJS): New. (OBJS): Add digraph.o, graphviz.o, ordered-hash-map-tests.o, tristate.o and ANALYZER_OBJS. (TEXI_GCCINT_FILES): Add analyzer.texi. * common.opt (-fanalyzer): New driver option. * config.in: Regenerate. * configure: Regenerate. * configure.ac (--disable-analyzer, ENABLE_ANALYZER): New option. (gccdepdir): Also create depdir for "analyzer" subdir. * digraph.cc: New file. * digraph.h: New file. * doc/analyzer.texi: New file. * doc/gccint.texi ("Static Analyzer") New menu item. (analyzer.texi): Include it. * doc/invoke.texi ("Static Analyzer Options"): New list and new section. ("Warning Options"): Add static analysis warnings to the list. (-Wno-analyzer-double-fclose): New option. (-Wno-analyzer-double-free): New option. (-Wno-analyzer-exposure-through-output-file): New option. (-Wno-analyzer-file-leak): New option. (-Wno-analyzer-free-of-non-heap): New option. (-Wno-analyzer-malloc-leak): New option. (-Wno-analyzer-possible-null-argument): New option. (-Wno-analyzer-possible-null-dereference): New option. (-Wno-analyzer-null-argument): New option. (-Wno-analyzer-null-dereference): New option. (-Wno-analyzer-stale-setjmp-buffer): New option. (-Wno-analyzer-tainted-array-index): New option. (-Wno-analyzer-use-after-free): New option. (-Wno-analyzer-use-of-pointer-in-stale-stack-frame): New option. (-Wno-analyzer-use-of-uninitialized-value): New option. (-Wanalyzer-too-complex): New option. (-fanalyzer-call-summaries): New warning. (-fanalyzer-checker=): New warning. (-fanalyzer-fine-grained): New warning. (-fno-analyzer-state-merge): New warning. (-fno-analyzer-state-purge): New warning. (-fanalyzer-transitivity): New warning. (-fanalyzer-verbose-edges): New warning. (-fanalyzer-verbose-state-changes): New warning. (-fanalyzer-verbosity=): New warning. (-fdump-analyzer): New warning. (-fdump-analyzer-callgraph): New warning. (-fdump-analyzer-exploded-graph): New warning. (-fdump-analyzer-exploded-nodes): New warning. (-fdump-analyzer-exploded-nodes-2): New warning. (-fdump-analyzer-exploded-nodes-3): New warning. (-fdump-analyzer-supergraph): New warning. * doc/sourcebuild.texi (dg-require-dot): New. (dg-check-dot): New. * gdbinit.in (break-on-saved-diagnostic): New command. * graphviz.cc: New file. * graphviz.h: New file. * ordered-hash-map-tests.cc: New file. * ordered-hash-map.h: New file. * passes.def (pass_analyzer): Add before pass_ipa_whole_program_visibility. * selftest-run-tests.c (selftest::run_tests): Call selftest::ordered_hash_map_tests_cc_tests. * selftest.h (selftest::ordered_hash_map_tests_cc_tests): New decl. * shortest-paths.h: New file. * timevar.def (TV_ANALYZER): New timevar. (TV_ANALYZER_SUPERGRAPH): Likewise. (TV_ANALYZER_STATE_PURGE): Likewise. (TV_ANALYZER_PLAN): Likewise. (TV_ANALYZER_SCC): Likewise. (TV_ANALYZER_WORKLIST): Likewise. (TV_ANALYZER_DUMP): Likewise. (TV_ANALYZER_DIAGNOSTICS): Likewise. (TV_ANALYZER_SHORTEST_PATHS): Likewise. * tree-pass.h (make_pass_analyzer): New decl. * tristate.cc: New file. * tristate.h: New file. gcc/analyzer/ChangeLog: * ChangeLog: New file. * analyzer-selftests.cc: New file. * analyzer-selftests.h: New file. * analyzer.opt: New file. * analysis-plan.cc: New file. * analysis-plan.h: New file. * analyzer-logging.cc: New file. * analyzer-logging.h: New file. * analyzer-pass.cc: New file. * analyzer.cc: New file. * analyzer.h: New file. * call-string.cc: New file. * call-string.h: New file. * checker-path.cc: New file. * checker-path.h: New file. * constraint-manager.cc: New file. * constraint-manager.h: New file. * diagnostic-manager.cc: New file. * diagnostic-manager.h: New file. * engine.cc: New file. * engine.h: New file. * exploded-graph.h: New file. * pending-diagnostic.cc: New file. * pending-diagnostic.h: New file. * program-point.cc: New file. * program-point.h: New file. * program-state.cc: New file. * program-state.h: New file. * region-model.cc: New file. * region-model.h: New file. * sm-file.cc: New file. * sm-malloc.cc: New file. * sm-malloc.dot: New file. * sm-pattern-test.cc: New file. * sm-sensitive.cc: New file. * sm-signal.cc: New file. * sm-taint.cc: New file. * sm.cc: New file. * sm.h: New file. * state-purge.cc: New file. * state-purge.h: New file. * supergraph.cc: New file. * supergraph.h: New file. gcc/testsuite/ChangeLog: * gcc.dg/analyzer/CVE-2005-1689-minimal.c: New test. * gcc.dg/analyzer/abort.c: New test. * gcc.dg/analyzer/alloca-leak.c: New test. * gcc.dg/analyzer/analyzer-decls.h: New header. * gcc.dg/analyzer/analyzer-verbosity-0.c: New test. * gcc.dg/analyzer/analyzer-verbosity-1.c: New test. * gcc.dg/analyzer/analyzer-verbosity-2.c: New test. * gcc.dg/analyzer/analyzer.exp: New suite. * gcc.dg/analyzer/attribute-nonnull.c: New test. * gcc.dg/analyzer/call-summaries-1.c: New test. * gcc.dg/analyzer/conditionals-2.c: New test. * gcc.dg/analyzer/conditionals-3.c: New test. * gcc.dg/analyzer/conditionals-notrans.c: New test. * gcc.dg/analyzer/conditionals-trans.c: New test. * gcc.dg/analyzer/data-model-1.c: New test. * gcc.dg/analyzer/data-model-2.c: New test. * gcc.dg/analyzer/data-model-3.c: New test. * gcc.dg/analyzer/data-model-4.c: New test. * gcc.dg/analyzer/data-model-5.c: New test. * gcc.dg/analyzer/data-model-5b.c: New test. * gcc.dg/analyzer/data-model-5c.c: New test. * gcc.dg/analyzer/data-model-5d.c: New test. * gcc.dg/analyzer/data-model-6.c: New test. * gcc.dg/analyzer/data-model-7.c: New test. * gcc.dg/analyzer/data-model-8.c: New test. * gcc.dg/analyzer/data-model-9.c: New test. * gcc.dg/analyzer/data-model-11.c: New test. * gcc.dg/analyzer/data-model-12.c: New test. * gcc.dg/analyzer/data-model-13.c: New test. * gcc.dg/analyzer/data-model-14.c: New test. * gcc.dg/analyzer/data-model-15.c: New test. * gcc.dg/analyzer/data-model-16.c: New test. * gcc.dg/analyzer/data-model-17.c: New test. * gcc.dg/analyzer/data-model-18.c: New test. * gcc.dg/analyzer/data-model-19.c: New test. * gcc.dg/analyzer/data-model-path-1.c: New test. * gcc.dg/analyzer/disabling.c: New test. * gcc.dg/analyzer/dot-output.c: New test. * gcc.dg/analyzer/double-free-lto-1-a.c: New test. * gcc.dg/analyzer/double-free-lto-1-b.c: New test. * gcc.dg/analyzer/double-free-lto-1.h: New header. * gcc.dg/analyzer/equivalence.c: New test. * gcc.dg/analyzer/explode-1.c: New test. * gcc.dg/analyzer/explode-2.c: New test. * gcc.dg/analyzer/factorial.c: New test. * gcc.dg/analyzer/fibonacci.c: New test. * gcc.dg/analyzer/fields.c: New test. * gcc.dg/analyzer/file-1.c: New test. * gcc.dg/analyzer/file-2.c: New test. * gcc.dg/analyzer/function-ptr-1.c: New test. * gcc.dg/analyzer/function-ptr-2.c: New test. * gcc.dg/analyzer/function-ptr-3.c: New test. * gcc.dg/analyzer/gzio-2.c: New test. * gcc.dg/analyzer/gzio-3.c: New test. * gcc.dg/analyzer/gzio-3a.c: New test. * gcc.dg/analyzer/gzio.c: New test. * gcc.dg/analyzer/infinite-recursion.c: New test. * gcc.dg/analyzer/loop-2.c: New test. * gcc.dg/analyzer/loop-2a.c: New test. * gcc.dg/analyzer/loop-3.c: New test. * gcc.dg/analyzer/loop-4.c: New test. * gcc.dg/analyzer/loop.c: New test. * gcc.dg/analyzer/malloc-1.c: New test. * gcc.dg/analyzer/malloc-2.c: New test. * gcc.dg/analyzer/malloc-3.c: New test. * gcc.dg/analyzer/malloc-callbacks.c: New test. * gcc.dg/analyzer/malloc-dce.c: New test. * gcc.dg/analyzer/malloc-dedupe-1.c: New test. * gcc.dg/analyzer/malloc-ipa-1.c: New test. * gcc.dg/analyzer/malloc-ipa-10.c: New test. * gcc.dg/analyzer/malloc-ipa-11.c: New test. * gcc.dg/analyzer/malloc-ipa-12.c: New test. * gcc.dg/analyzer/malloc-ipa-13.c: New test. * gcc.dg/analyzer/malloc-ipa-2.c: New test. * gcc.dg/analyzer/malloc-ipa-3.c: New test. * gcc.dg/analyzer/malloc-ipa-4.c: New test. * gcc.dg/analyzer/malloc-ipa-5.c: New test. * gcc.dg/analyzer/malloc-ipa-6.c: New test. * gcc.dg/analyzer/malloc-ipa-7.c: New test. * gcc.dg/analyzer/malloc-ipa-8-double-free.c: New test. * gcc.dg/analyzer/malloc-ipa-8-lto-a.c: New test. * gcc.dg/analyzer/malloc-ipa-8-lto-b.c: New test. * gcc.dg/analyzer/malloc-ipa-8-lto-c.c: New test. * gcc.dg/analyzer/malloc-ipa-8-lto.h: New test. * gcc.dg/analyzer/malloc-ipa-8-unchecked.c: New test. * gcc.dg/analyzer/malloc-ipa-9.c: New test. * gcc.dg/analyzer/malloc-macro-inline-events.c: New test. * gcc.dg/analyzer/malloc-macro-separate-events.c: New test. * gcc.dg/analyzer/malloc-macro.h: New header. * gcc.dg/analyzer/malloc-many-paths-1.c: New test. * gcc.dg/analyzer/malloc-many-paths-2.c: New test. * gcc.dg/analyzer/malloc-many-paths-3.c: New test. * gcc.dg/analyzer/malloc-paths-1.c: New test. * gcc.dg/analyzer/malloc-paths-10.c: New test. * gcc.dg/analyzer/malloc-paths-2.c: New test. * gcc.dg/analyzer/malloc-paths-3.c: New test. * gcc.dg/analyzer/malloc-paths-4.c: New test. * gcc.dg/analyzer/malloc-paths-5.c: New test. * gcc.dg/analyzer/malloc-paths-6.c: New test. * gcc.dg/analyzer/malloc-paths-7.c: New test. * gcc.dg/analyzer/malloc-paths-8.c: New test. * gcc.dg/analyzer/malloc-paths-9.c: New test. * gcc.dg/analyzer/malloc-vs-local-1a.c: New test. * gcc.dg/analyzer/malloc-vs-local-1b.c: New test. * gcc.dg/analyzer/malloc-vs-local-2.c: New test. * gcc.dg/analyzer/malloc-vs-local-3.c: New test. * gcc.dg/analyzer/malloc-vs-local-4.c: New test. * gcc.dg/analyzer/operations.c: New test. * gcc.dg/analyzer/params-2.c: New test. * gcc.dg/analyzer/params.c: New test. * gcc.dg/analyzer/paths-1.c: New test. * gcc.dg/analyzer/paths-1a.c: New test. * gcc.dg/analyzer/paths-2.c: New test. * gcc.dg/analyzer/paths-3.c: New test. * gcc.dg/analyzer/paths-4.c: New test. * gcc.dg/analyzer/paths-5.c: New test. * gcc.dg/analyzer/paths-6.c: New test. * gcc.dg/analyzer/paths-7.c: New test. * gcc.dg/analyzer/pattern-test-1.c: New test. * gcc.dg/analyzer/pattern-test-2.c: New test. * gcc.dg/analyzer/pointer-merging.c: New test. * gcc.dg/analyzer/pr61861.c: New test. * gcc.dg/analyzer/pragma-1.c: New test. * gcc.dg/analyzer/scope-1.c: New test. * gcc.dg/analyzer/sensitive-1.c: New test. * gcc.dg/analyzer/setjmp-1.c: New test. * gcc.dg/analyzer/setjmp-2.c: New test. * gcc.dg/analyzer/setjmp-3.c: New test. * gcc.dg/analyzer/setjmp-4.c: New test. * gcc.dg/analyzer/setjmp-5.c: New test. * gcc.dg/analyzer/setjmp-6.c: New test. * gcc.dg/analyzer/setjmp-7.c: New test. * gcc.dg/analyzer/setjmp-7a.c: New test. * gcc.dg/analyzer/setjmp-8.c: New test. * gcc.dg/analyzer/setjmp-9.c: New test. * gcc.dg/analyzer/signal-1.c: New test. * gcc.dg/analyzer/signal-2.c: New test. * gcc.dg/analyzer/signal-3.c: New test. * gcc.dg/analyzer/signal-4a.c: New test. * gcc.dg/analyzer/signal-4b.c: New test. * gcc.dg/analyzer/strcmp-1.c: New test. * gcc.dg/analyzer/switch.c: New test. * gcc.dg/analyzer/taint-1.c: New test. * gcc.dg/analyzer/zlib-1.c: New test. * gcc.dg/analyzer/zlib-2.c: New test. * gcc.dg/analyzer/zlib-3.c: New test. * gcc.dg/analyzer/zlib-4.c: New test. * gcc.dg/analyzer/zlib-5.c: New test. * gcc.dg/analyzer/zlib-6.c: New test. * lib/gcc-defs.exp (dg-check-dot): New procedure. * lib/target-supports.exp (check_dot_available): New procedure. (check_effective_target_analyzer): New. * lib/target-supports-dg.exp (dg-require-dot): New procedure.
2019-11-12[RS6000] Remove TARGET_TLS_MARKERS and require binutils 2.20Alan Modra1-6/+0
This patch removes !TARGET_TLS_MARKERS support. -mtls-markers (and -mno-tls-markers) disappear as valid options too, because I figure they haven't been used too much except by people testing the compiler. * config/rs6000/rs6000.opt (mtls-markers): Delete. * config/rs6000/rs6000.h (TARGET_TLS_MARKERS): Don't define. (IS_NOMARK_TLSGETADDR): Likewise. * config/rs6000/rs6000-protos.h (rs6000_output_tlsargs): Delete. * config/rs6000/rs6000.c (rs6000_output_tlsargs): Delete. (rs6000_legitimize_tls_address): Remove !TARGET_TLS_MARKERS code. (rs6000_call_template_1): Delete TARGET_TLS_MARKERS test and allow other UNSPECs besides UNSPEC_TLSGD and UNSPEC_TLSLD. (rs6000_indirect_call_template_1): Likewise. (rs6000_pltseq_template): Likewise. (rs6000_opt_vars): Remove "tls-markers" entry. * config/rs6000/rs6000.md (tls_gd<bits>): Replace TARGET_TLS_MARKERS with TARGET_ELF. (tls_gd_high<bits>, tls_gd_low<bits>): Likewise. (tls_ld<bits>, tls_ld_high<bits>, tls_ld_low<bits>): Likewise. (pltseq_plt_pcrel<mode>): Likewise. (call_value_local32): Remove IS_NOMARK_TLSGETADDR predicate test. (call_value_local64): Likewise. (call_value_indirect_nonlocal_sysv<mode>): Remove IS_NOMARK_TLSGETADDR output and length attribute sub-expression. (call_value_nonlocal_sysv<mode>), (call_value_nonlocal_sysv_secure<mode>), (call_value_local_aix<mode>, call_value_nonlocal_aix<mode>), (call_value_indirect_aix<mode>, call_value_indirect_elfv2<mode>), (call_value_indirect_pcrel<mode>): Likewise. * doc/install.texi (powerpc-*-*): Require binutils-2.20. * configure.ac (HAVE_AS_TLS_MARKERS): Delete test. * configure: Regenerate. * config.in: Regenerate. From-SVN: r278075
2019-11-04MSP430: Add -mtiny-printf optionJozef Lawrynowicz1-0/+7
2019-11-04 Jozef Lawrynowicz <jozef.l@mittosystems.com> gcc/ * config.in: Regenerate. * config/msp430/msp430.c (msp430_option_override): Emit an error if -mtiny-printf is used without GCC being configured with --enable-newlib-nano-formatted-io. * config/msp430/msp430.h (LINK_SPEC): Pass "--wrap puts --wrap printf" when -mtiny-printf is used. * config/msp430/msp430.opt: Document -mtiny-printf. * configure: Regenerate. * configure.ac: Enable --enable-newlib-nano-formatted-io flag. Define HAVE_NEWLIB_NANO_FORMATTED_IO if --enable-newlib-nano-formatted-io is passed. * doc/invoke.texi: Document -mtiny-printf. gcc/testsuite/ * gcc.target/msp430/tiny-printf.c: New test. From-SVN: r277774
2019-11-03config.in: Regenerate.Jan Hubicka1-0/+13
* config.in: Regenerate. * configure: Regenerate. * configure.ac: Check for mallinfo. * ggc-common.c: Include malloc.h if available; include options.h (report_heap_memory_use): New functoin. * ggc-page.c (ggc_grow): Do not print "start". * ggc.h (report_heap_memory_use): Declare. * pases.c (execute_one_pass): Report memory after IPA passes. (ipa_read_summaries_1): Likewise. (ipa_read_optimization_summaries_1): Likewise. * lto/lto-common.c (read_cgraph_and_symbols): Improve -Q reporting. * lto.c (lto_wpa_write_files): Likewise. From-SVN: r277753
2019-10-07MSP430: Don't generate 430X insns when handling data in the lower memory regionJozef Lawrynowicz1-0/+6
gcc/ChangeLog: 2019-10-07 Jozef Lawrynowicz <jozef.l@mittosystems.com> * config.in: Regenerate. * config/msp430/constraints.md: Fix docstring for "Ys" constraint. Add new "Yx" constraint. * config/msp430/driver-msp430.c (msp430_propagate_region_opt): New spec function. * config/msp430/msp430-protos.h (msp430_op_not_in_high_mem): New prototype. * config/msp430/msp430.c (msp430_option_override): Allow the lower code/data region to be selected in the small memory model. (msp430_section_attr): Don't warn if the "section" and "lower" attributes are used together. (msp430_handle_generic_attribute): Likewise. (msp430_var_in_low_mem): New function. (TARGET_ENCODE_SECTION_INFO): Define. (msp430_encode_section_info): New function. (gen_prefix): Return early in the small memory model. Require TARGET_USE_LOWER_REGION_PREFIX to be set before adding the ".lower" prefix if -m{code,data}-region=lower have been passed. (msp430_output_aligned_decl_common): Emit common symbols when -mdata-region=lower is passed unless TARGET_USE_LOWER_REGION_PREFIX is set. (TARGET_ASM_FILE_END): Define. (msp430_file_end): New function. (msp430_do_not_relax_short_jumps): Allow relaxation when function will be in the lower region. (msp430_op_not_in_high_mem): New function. (msp430_print_operand): Check "msp430_op_not_in_high_mem" for the 'X' operand selector. Clarify comment for 'x' operand selector. * config/msp430/msp430.h (LINK_SPEC): Propagate -m{code,data}-region to the linker via spec function msp430_propagate_region_opt. (msp430_propagate_region_opt): New prototype. (EXTRA_SPEC_FUNCTIONS): Add msp430_propagate_region_opt. (SYMBOL_FLAG_LOW_MEM): Define. * config/msp430/msp430.md (addsipsi3): Add missing "%X" operand selector. (zero_extendqihi2): Fix operand number used by "%X" selector. (zero_extendqisi2): Likewise. (zero_extendhisi2): Likewise. (movqi): Use "Yx" constraint in place of "%X" operand selector. (movhi): Likewise. (addqi3): Likewise. (addhi3): Likewise. (addsi3): Likewise. (addhi3_cy): Likewise. (addchi4_cy): Likewise. (subqi3): Likewise. (subhi3): Likewise. (subsi3): Likewise. (bic<mode>3): Likewise. (and<mode>3): Likewise. (ior<mode>3): Likewise. (xor<mode>3): Likewise. (slli_1): Add missing "%X" operand selector. (slll_1): Likewise. (slll_2): Likewise. (srai_1): Likewise. (sral_1): Likewise. (sral_2): Likewise. (srli_1): Likewise. (srll_1): Likewise. (cbranchqi4_real): Use "Yx" constraint in place of "%X" operand selector. (cbranchhi4_real): Likewise. (cbranchqi4_reversed): Likewise. (cbranchhi4_reversed): Likewise. (*bitbranch<mode>4): Likewise. (*bitbranch<mode>4_z): Remove unnecessary "%x" operand selector. * config/msp430/msp430.opt (mcode-region=): Set default to MSP430_REGION_LOWER. Improve docstring. (mdata-region=): Likewise. (muse-lower-region-prefix): New option. * config/msp430/t-msp430 (MULTILIB_OPTIONS): Add mdata-region=none multilib. (MULTILIB_MATCHES): Set mdata-region={upper,either} to match mdata-region=none multilib. MULTILIB_EXCEPTIONS: Remove. MULTILIB_REQUIRED: Define. * configure: Regenerate. * configure.ac: Define HAVE_AS_GNU_ATTRIBUTE and HAVE_AS_MSPABI_ATTRIBUTE if GAS version >= 2.33.50. * doc/extend.texi: Clarify comment for {upper,lower,either} function attributes. Add separate description for "lower" variable attribute. gcc/testsuite/ChangeLog: 2019-10-07 Jozef Lawrynowicz <jozef.l@mittosystems.com> * gcc.target/msp430/430x-insns.c: New test. * gcc.target/msp430/data-attributes-2.c: Remove dg-warning directives for conflicts between the "section" and "lower" attributes. * gcc.target/msp430/msp430.exp (check_effective_target_msp430_region_not_lower): New. (check_effective_target_msp430_region_lower): New. * gcc.target/msp430/object-attributes-430.c: New test. * gcc.target/msp430/object-attributes-default.c: New test. * gcc.target/msp430/object-attributes-mlarge-any-region.c: New test. * gcc.target/msp430/object-attributes-mlarge.c: New test. From-SVN: r276665
2019-07-03Add zstd support for LTO bytecode compression.Martin Liska1-0/+6
2019-07-03 Martin Liska <mliska@suse.cz> * Makefile.in: Define ZSTD_LIB. * common.opt: Adjust compression level to support also zstd levels. * config.in: Regenerate. * configure: Likewise. * configure.ac: Add --with-zstd and --with-zstd-include options and detect ZSTD. * doc/install.texi: Mention zstd dependency. * gcc.c: Print supported LTO compression algorithms. * lto-compress.c (lto_normalized_zstd_level): Likewise. (lto_compression_zstd): Likewise. (lto_uncompression_zstd): Likewise. (lto_end_compression): Dispatch in between zlib and zstd. (lto_compression_zlib): Mark with ATTRIBUTE_UNUSED. (lto_uncompression_zlib): Make it static. * lto-compress.h (lto_end_uncompression): Fix GNU coding style. * lto-section-in.c (lto_get_section_data): Pass info about used compression. * lto-streamer-out.c: By default use zstd when possible. * timevar.def (TV_IPA_LTO_DECOMPRESS): Rename to decompression (TV_IPA_LTO_COMPRESS): Likewise for compression. From-SVN: r272996
2019-03-01RISC-V: Generalize -march support, add ELF attribute support.Kito Cheng1-0/+6
Kito Cheng <kito.cheng@gmail.com> Monk Chiang <sh.chiang04@gmail.com> gcc/ * common/config/riscv/riscv-common.c: Include sstream. (riscv_subset_list::to_string): New. (riscv_arch_str): Likewise. * config.gcc (riscv*-*-*): Handle --with-riscv-attribute= * config.in: Regen. * config/riscv/riscv-protos.h (riscv_arch_str): New. * config/riscv/riscv.c (INCLUDE_STRING): Defined. (riscv_emit_attribute): New. (riscv_file_start): Emit attribute if needed. (riscv_option_override): Init riscv_emit_attribute_p. * config/riscv/riscv.opt (mriscv-attribute): New option. * configure.ac (riscv*-*-*): Check binutils is supporting ELF * configure: Regen. * doc/install.texi: Document --with-riscv-attribute. * doc/invoke.texi: Document -mriscv-attribute. * common/config/riscv/riscv-common.c: Include config/riscv/riscv-protos.h. (INCLUDE_STRING): Defined. (RISCV_DONT_CARE_VERSION): Defined. (riscv_subset_t): Declare. (riscv_subset_t::riscv_subset_t): New. (riscv_subset_list): Declare. (riscv_subset_list::riscv_subset_list): New. (riscv_subset_list::~riscv_subset_list): Likewise. (riscv_subset_list::parsing_subset_version): Likewise. (riscv_subset_list::parse_std_ext): Likewise. (riscv_subset_list::parse_sv_or_non_std_ext): Likewise. (riscv_subset_list::add): Likewise. (riscv_subset_list::lookup): Likewise. (riscv_subset_list::xlen): Likewise. (riscv_subset_list::parse): Likewise. (riscv_supported_std_ext): Likewise. (current_subset_list): Likewise. (riscv_parse_arch_string): Using riscv_subset_list::parse to parse. gcc/testsuite/ * gcc.target/riscv/attribute-1.c: New. * gcc.target/riscv/attribute-2.c: Likewise. * gcc.target/riscv/attribute-3.c: Likewise. * gcc.target/riscv/attribute-4.c: Likewise. * gcc.target/riscv/attribute-5.c: Likewise. * gcc.target/riscv/attribute-6.c: Likewise. * gcc.target/riscv/attribute-7.c: Likewise. * gcc.target/riscv/attribute-8.c: Likewise. * gcc.target/riscv/attribute-9.c: Likewise. * gcc.target/riscv/arch-1.c: New. * gcc.target/riscv/arch-2.c: Likewise. * gcc.target/riscv/arch-3.c: Likewise. * gcc.target/riscv/arch-4.c: Likewise. Co-Authored-By: Monk Chiang <sh.chiang04@gmail.com> From-SVN: r269337
2018-11-29[RS6000] inline plt call sequencesAlan Modra1-0/+6
Finally, the point of the previous patches in this series, support for inline PLT calls, keyed off -fno-plt. This emits code using new relocations that tie all insns in the sequence together, so that the linker can edit the sequence back to a direct call should the call target turn out to be local. An example of ELFv2 code to call puts is as follows: .reloc .,R_PPC64_PLTSEQ,puts std 2,24(1) .reloc .,R_PPC64_PLT16_HA,puts addis 12,2,0 .reloc .,R_PPC64_PLT16_LO_DS,puts ld 12,0(12) .reloc .,R_PPC64_PLTSEQ,puts mtctr 12 .reloc .,R_PPC64_PLTCALL,puts bctrl ld 2,24(1) "addis 12,2,puts@plt@ha" and "ld 12,puts@plt@l(12)" are also supported by the assembler. gcc instead uses the explicit R_PPC64_PLT16_HA and R_PPC64_PLT16_LO_DS relocs because when the call is to __tls_get_addr an extra reloc is emitted at every place where one is shown above, to specify the __tls_get_addr arg. The linker expects the extra reloc to come first. .reloc enforces that ordering. The patch also changes code emitted for longcalls if the assembler supports the new marker relocs, so that these too can be edited. One side effect of longcalls using PLT16 relocs is that they can now be resolved lazily by ld.so. I don't support lazy inline PLT calls for ELFv1, because ELFv1 would need barriers to reliably load both the function address and toc pointer from the PLT. ELFv1 -fno-plt uses the longcall sequence instead, which isn't edited by GNU ld. * config.in (HAVE_AS_PLTSEQ): Add. * config/rs6000/predicates.md (indirect_call_operand): New. * config/rs6000/rs6000-protos.h (rs6000_pltseq_template), (rs6000_sibcall_sysv): Declare. * config/rs6000/rs6000.c (init_cumulative_args): Set cookie CALL_LONG for -fno-plt. (print_operand <T, z, 0>): Handle UNSPEC_PLTSEQ. (rs6000_indirect_call_template_1): Emit .reloc directives for UNSPEC_PLTSEQ calls. (rs6000_pltseq_template): New function. (rs6000_longcall_ref): Add arg parameter. Use PLT16 insns if relocs supported by assembler. Move SYMBOL_REF test to callers. (rs6000_call_aix): Adjust rs6000_longcall_ref call. Package insns in UNSPEC_PLTSEQ, preserving original func_desc. (rs6000_call_sysv): Likewise. (rs6000_sibcall_sysv): New function. * config/rs6000/rs6000.h (HAVE_AS_PLTSEQ): Provide default. * config/rs6000/rs6000.md (UNSPEC_PLTSEQ, UNSPEC_PLT16_HA, UNSPEC_PLT16_LO): New. (pltseq_tocsave, pltseq_plt16_ha, pltseq_plt16_lo, pltseq_mtctr): New. (call_indirect_nonlocal_sysv): Don't differentiate zero from non-zero cookie in constraints. Test explicitly for flags in length attr. Handle unspec operand 1. (call_value_indirect_nonlocal_sysv): Likewise. (call_indirect_aix, call_value_indirect_aix): Handle unspec operand 1. (call_indirect_elfv2, call_value_indirect_elfv2): Likewise. (sibcall, sibcall_value): Use rs6000_sibcall_sysv. (sibcall_indirect_nonlocal_sysv): New pattern. (sibcall_value_indirect_nonlocal_sysv): Likewise. (sibcall_nonlocal_sysv, sibcall_value_nonlocal_sysv): Remove indirect call alternatives. * configure.ac: Check for gas plt sequence marker support. * configure: Regenerate. From-SVN: r266605
2018-11-21S/390: Support vector load/store alignment hintsAndreas Krebbel1-0/+7
The IBM z14 POP adds an optional alignment operand to the vl, vst, vlm, and vstm instruction (vector loads and stores). Vectors residing on 8 or 16 byte boundaries might get loaded or stored faster on some models given the instruction uses the proper hint operand. A wrong hint will hurt performance though. The attached testcase align-1 currently fails due to: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88085 gcc/ChangeLog: 2018-11-21 Andreas Krebbel <krebbel@linux.ibm.com> * configure.ac: Add check for Binutils to determine whether vector load/store alignments hints are being supported. * config.in: Regenerate. * configure: Regenerate. * config/s390/s390.c (print_operand): Support new output modifier A. * config/s390/s390.md ("movti"): Append alignment hint output using the new output modifier 'A'. * config/s390/vector.md ("mov<mode>", "*vec_tf_to_v1tf") ("*vec_ti_to_v1ti"): Likewise. gcc/testsuite/ChangeLog: 2018-11-21 Andreas Krebbel <krebbel@linux.ibm.com> * gcc.target/s390/vector/align-1.c: New test. * gcc.target/s390/vector/align-2.c: New test. From-SVN: r266336
2018-11-02Remove SPARC HAVE_AS_REGISTER_PSEUDO_OPRainer Orth1-6/+0
* configure.ac (gcc_cv_as_sparc_register_op): Remove. * configure: Regenerate. * config.in: Regenerate. * config/sparc/sparc.c (sparc_output_scratch_registers): Remove HAVE_AS_REGISTER_PSEUDO_OP guard. * config/sparc/sparc.h (ASM_ARCH64_SPEC): Remove !HAVE_AS_REGISTER_PSEUDO_OP support. (ASM_DECLARE_REGISTER_GLOBAL): Remove HAVE_AS_REGISTER_PSEUDO_OP guard. From-SVN: r265743
2018-10-31Update GCC to autoconf 2.69, automake 1.15.1 (PR bootstrap/82856).Joseph Myers1-0/+5
This patch updates GCC to use autoconf 2.69 and automake 1.15.1. (That's not the latest automake version, but it's the one used by binutils-gdb, with which consistency is desirable, and in any case seems a useful incremental update that should make a future update to 1.16.1 easier.) The changes are generally similar to the binutils-gdb ones, and are copied from there where shared files and directories are involved (there are some further changes to such shared directories, however, which I'd expect to apply to binutils-gdb once this patch is in GCC). Largely, obsolete AC_PREREQ calls are removed, while many AC_LANG_SOURCE calls are added to avoid warnings from aclocal and autoconf. Multilib support is no longer included in core automake, meaning that multilib.am needs copying from automake's contrib directory into the GCC source tree. Autoconf 2.69 has Go support, so local copies of that support are removed. I hope the D support will soon be submitted to upstream autoconf so the local copy of that can be removed in a future update. Changes to how automake generates runtest calls mean quotes are removed from RUNTEST definitions in five lib*/testsuite/Makefile.am files (libatomic, libgomp, libitm, libphobos, libvtv; some others have RUNTEST definitions without quotes, which are still OK); libgo and libphobos also get -Wno-override added to AM_INIT_AUTOMAKE so those overrides of RUNTEST do not generate automake warnings. Note that the regeneration did not include regeneration of fixincludes/config.h.in (attempting such regeneration resulted in all the USED_FOR_TARGET conditionals disappearing; and I don't see anything in the fixincludes/ directory that would result in such conditionals being generated, unlike in the gcc/ directory). Also note that libvtv/testsuite/other-tests/Makefile.in was not regenerated; that directory is not listed as a subdirectory for which Makefile.in gets regenerated by calling "automake" in libvtv/, so I'm not sure how it's meant to be regenerated. While I mostly fixed warnings should running aclocal / automake / autoconf, there were various such warnings from automake in the libgfortran, libgo, libgomp, liboffloadmic, libsanitizer, libphobos directories that I did not fix, preferring to leave those to the relevant subsystem maintainers. Specifically, most of those warnings were of the following form (example from libgfortran): Makefile.am:48: warning: source file 'caf/single.c' is in a subdirectory, Makefile.am:48: but option 'subdir-objects' is disabled automake: warning: possible forward-incompatibility. automake: At least a source file is in a subdirectory, but the 'subdir-objects' automake: automake option hasn't been enabled. For now, the corresponding output automake: object file(s) will be placed in the top-level directory. However, automake: this behaviour will change in future Automake versions: they will automake: unconditionally cause object files to be placed in the same subdirectory automake: of the corresponding sources. automake: You are advised to start using 'subdir-objects' option throughout your automake: project, to avoid future incompatibilities. I think it's best for the relevant maintainers to add subdir-objects and do any other associated Makefile.am changes needed. In some cases the paths in the warnings involved ../; I don't know if that adds any extra complications to the use of subdir-objects. I've tested this with native, cross and Canadian cross builds. The risk of any OS-specific issues should I hope be rather lower than if a libtool upgrade were included (we *should* do such an upgrade at some point, but it's more complicated - it involves identifying all our local libtool changes to see if any aren't included in the upstream version we update to, and reverting an upstream libtool patch that's inappropriate for use in GCC); I think it would be better to get this update into GCC so that people can test in different configurations and we can fix any issues found, rather than to try to get more and more testing done before it goes in. top level: 2018-10-31 Joseph Myers <joseph@codesourcery.com> PR bootstrap/82856 * multilib.am: New file. From automake. Merge from binutils-gdb: 2018-06-19 Simon Marchi <simon.marchi@ericsson.com> * libtool.m4: Use AC_LANG_SOURCE. * configure.ac: Remove AC_PREREQ, use AC_LANG_SOURCE. * ar-lib: New file. * test-driver: New file. * configure: Re-generate. config: 2018-10-31 Joseph Myers <joseph@codesourcery.com> PR bootstrap/82856 * math.m4, tls.m4: Use AC_LANG_SOURCE. Merge from binutils-gdb: 2018-06-19 Simon Marchi <simon.marchi@ericsson.com> * override.m4 (_GCC_AUTOCONF_VERSION): Bump from 2.64 to 2.69. fixincludes: 2018-10-31 Joseph Myers <joseph@codesourcery.com> PR bootstrap/82856 * configure.ac: Remove AC_PREREQ. * aclocal.m4, configure: Regenerate. gcc: 2018-10-31 Joseph Myers <joseph@codesourcery.com> PR bootstrap/82856 * configure.ac: Remove AC_PREREQ. Use AC_LANG_SOURCE. Use single line for second argument of AC_DEFINE_UNQUOTED. * doc/install.texi (Tools/packages necessary for modifying GCC): Update to autoconf 2.69 and automake 1.15.1. * aclocal.m4, config.in, configure: Regenerate. gnattools: 2018-10-31 Joseph Myers <joseph@codesourcery.com> PR bootstrap/82856 * configure.ac: Remove AC_PREREQ. * configure: Regenerate. gotools: 2018-10-31 Joseph Myers <joseph@codesourcery.com> PR bootstrap/82856 * config/go.m4: Remove file. * Makefile.am (ACLOCAL_AMFLAGS): Do not use -I ./config. * configure.ac: Remove AC_PREREQ. Do not include config/go.m4. * Makefile.in, aclocal.m4, configure: Regenerate. intl: 2018-10-31 Joseph Myers <joseph@codesourcery.com> PR bootstrap/82856 Merge from binutils-gdb: 2018-06-19 Simon Marchi <simon.marchi@ericsson.com> * configure.ac: Add AC_USE_SYSTEM_EXTENSIONS, remove AC_PREREQ. * configure: Re-generate. * config.h.in: Re-generate. * aclocal.m4: Re-generate. libada: 2018-10-31 Joseph Myers <joseph@codesourcery.com> PR bootstrap/82856 * configure.ac: Remove AC_PREREQ. * configure: Regenerate. libatomic: 2018-10-31 Joseph Myers <joseph@codesourcery.com> PR bootstrap/82856 * Makefile.am: Include multilib.am. * acinclude.m4: Use AC_LANG_SOURCE. * configure.ac: Remove AC_PREREQ. * testsuite/Makefile.am (RUNTEST): Remove quotes. * Makefile.in, aclocal.m4, configure, testsuite/Makefile.in: Regenerate. libbacktrace: 2018-10-31 Joseph Myers <joseph@codesourcery.com> PR bootstrap/82856 * Makefile.am: Include multilib.am. * configure.ac: Remove AC_PREREQ. Use AC_LANG_SOURCE. * Makefile.in, aclocal.m4, config.h.in, configure: Regenerate. libcc1: 2018-10-31 Joseph Myers <joseph@codesourcery.com> PR bootstrap/82856 * configure.ac: Remove AC_PREREQ. * Makefile.in, aclocal.m4, configure: Regenerate. libcpp: 2018-10-31 Joseph Myers <joseph@codesourcery.com> PR bootstrap/82856 * configure.ac: Remove AC_PREREQ. Use AC_LANG_SOURCE. * aclocal.m4, config.in, configure: Regenerate. libdecnumber: 2018-10-31 Joseph Myers <joseph@codesourcery.com> PR bootstrap/82856 Merge from binutils-gdb: 2018-06-19 Simon Marchi <simon.marchi@ericsson.com> * configure.ac: Remove AC_PREREQ. * configure: Re-generate. * aclocal.m4. libffi: 2018-10-31 Joseph Myers <joseph@codesourcery.com> PR bootstrap/82856 * Makefile.am: Include multilib.am. (AUTOMAKE_OPTIONS): Add info-in-builddir. (CLEANFILES): Remove doc/libffi.info. * configure.ac: Remove AC_PREREQ. * Makefile.in, aclocal.m4, configure, fficonfig.h.in, include/Makefile.in, man/Makefile.in, testsuite/Makefile.in: Regenerate. libgcc: 2018-10-31 Joseph Myers <joseph@codesourcery.com> PR bootstrap/82856 * configure.ac: Remove AC_PREREQ. Use AC_LANG_SOURCE. * configure: Regenerate. libgfortran: 2018-10-31 Joseph Myers <joseph@codesourcery.com> PR bootstrap/82856 * Makefile.am: Include multilib.am. * configure.ac: Remove AC_PREREQ. * Makefile.in, aclocal.m4, config.h.in, configure: Regenerate. libgo [logically part of this change but omitted from the commit]: 2018-10-31 Joseph Myers <joseph@codesourcery.com> PR bootstrap/82856 * Makefile.am: Include multilib.am. * config/go.m4: Remove file. * config/libtool.m4: Use AC_LANG_SOURCE. * configure.ac: Remove AC_PREREQ. Use AC_LANG_SOURCE. Use -Wno-override in AM_INIT_AUTOMAKE call. * Makefile.in, aclocal.m4, configure, testsuite/Makefile.in: Regenerate. libgomp: 2018-10-31 Joseph Myers <joseph@codesourcery.com> PR bootstrap/82856 * Makefile.am: Include multilib.am (AUTOMAKE_OPTIONS): Add info-in-builddir. (CLEANFILES): Remove libgomp.info. * configure.ac: Remove AC_PREREQ. * testsuite/Makefile.am (RUNTEST): Remove quotes. * Makefile.in, aclocal.m4, configure, testsuite/Makefile.in: Regenerate. libhsail-rt: 2018-10-31 Joseph Myers <joseph@codesourcery.com> PR bootstrap/82856 * configure.ac: Remove AC_PREREQ. * Makefile.in, aclocal.m4, configure: Regenerate. libiberty: 2018-10-31 Joseph Myers <joseph@codesourcery.com> PR bootstrap/82856 Merge from binutils-gdb: 2018-06-19 Simon Marchi <simon.marchi@ericsson.com> * configure.ac: Remove AC_PREREQ. * configure: Re-generate. * config.in: Re-generate. libitm: 2018-10-31 Joseph Myers <joseph@codesourcery.com> PR bootstrap/82856 * Makefile.am: Include multilib.am. (AUTOMAKE_OPTIONS): Add info-in-builddir. (CLEANFILES): Remove libitm.info. * configure.ac: Remove AC_PREREQ. * testsuite/Makefile.am (RUNTEST): Remove quotes. * Makefile.in, aclocal.m4, configure, testsuite/Makefile.in: Regenerate. libobjc: 2018-10-31 Joseph Myers <joseph@codesourcery.com> PR bootstrap/82856 * configure.ac: Remove AC_PREREQ. * aclocal.m4, config.h.in, configure: Regenerate. liboffloadmic: 2018-10-31 Joseph Myers <joseph@codesourcery.com> PR bootstrap/82856 * Makefile.am: Include multilib.am. * configure.ac: Remove AC_PREREQ. * plugin/Makefile.am: Include multilib.am. * plugin/configure.ac: Remove AC_PREREQ. * Makefile.in, aclocal.m4, configure, plugin/Makefile.in, plugin/aclocal.m4, plugin/configure: Regenerate. libphobos: 2018-10-31 Joseph Myers <joseph@codesourcery.com> PR bootstrap/82856 * Makefile.am: Include multilib.am. * configure.ac: Remove AC_PREREQ. Use -Wno-override in AM_INIT_AUTOMAKE call. * m4/autoconf.m4: Add extra argument to AC_LANG_DEFINE call. * m4/druntime/os.m4: Use AC_LANG_SOURCE. * testsuite/Makefile.am (RUNTEST): Remove quotes. * Makefile.in, aclocal.m4, configure, libdruntime/Makefile.in, src/Makefile.in, testsuite/Makefile.in: Regenerate. libquadmath: 2018-10-31 Joseph Myers <joseph@codesourcery.com> PR bootstrap/82856 * Makefile.am: Include multilib.am. (AUTOMAKE_OPTIONS): Remove 1.8. Add info-in-builddir. (all-local): Define outside conditional code. (CLEANFILES): Remove libquadmath.info. * configure.ac: Remove AC_PREREQ. * Makefile.in, aclocal.m4, config.h.in, configure: Regenerate. libsanitizer: 2018-10-31 Joseph Myers <joseph@codesourcery.com> PR bootstrap/82856 * Makefile.am: Include multilib.am. * configure.ac: Remove AC_PREREQ. Use AC_LANG_SOURCE. * Makefile.in, aclocal.m4, asan/Makefile.in, configure, interception/Makefile.in, libbacktrace/Makefile.in, lsan/Makefile.in, sanitizer_common/Makefile.in, tsan/Makefile.in, ubsan/Makefile.in: Regenerate. libssp: 2018-10-31 Joseph Myers <joseph@codesourcery.com> PR bootstrap/82856 * Makefile.am: Include multilib.am. (AUTOMAKE_OPTIONS): Remove 1.9.5. * configure.ac: Remove AC_PREREQ. Quote argument to AC_RUN_IFELSE. * Makefile.in, aclocal.m4, configure: Regenerate. libstdc++-v3: 2018-10-31 Joseph Myers <joseph@codesourcery.com> PR bootstrap/82856 * Makefile.am: Include multilib.am. * configure.ac: Remove AC_PREREQ. * Makefile.in, aclocal.m4, configure, doc/Makefile.in, include/Makefile.in, libsupc++/Makefile.in, po/Makefile.in, python/Makefile.in, src/Makefile.in, src/c++11/Makefile.in, src/c++17/Makefile.in, src/c++98/Makefile.in, src/filesystem/Makefile.in, testsuite/Makefile.in: Regenerate. libvtv: 2018-10-31 Joseph Myers <joseph@codesourcery.com> PR bootstrap/82856 * Makefile.am: Include multilib.am. * configure.ac: Remove AC_PREREQ. * testsuite/Makefile.am (RUNTEST): Remove quotes. * Makefile.in, aclocal.m4, configure, testsuite/Makefile.in: Regenerate. lto-plugin: 2018-10-31 Joseph Myers <joseph@codesourcery.com> PR bootstrap/82856 * configure.ac: Remove AC_PREREQ. Use AC_LANG_SOURCE. * Makefile.in, aclocal.m4, config.h.in, configure: Regenerate. zlib: 2018-10-31 Joseph Myers <joseph@codesourcery.com> PR bootstrap/82856 * Makefile.am: Include multilib.am. Merge from binutils-gdb: 2018-06-19 Simon Marchi <simon.marchi@ericsson.com> * configure.ac: Modernize AC_INIT call, remove AC_PREREQ. * Makefile.am (AUTOMAKE_OPTIONS): Remove 1.8, cygnus, add foreign. * Makefile.in: Re-generate. * aclocal.m4: Re-generate. * configure: Re-generate. From-SVN: r265695
2018-10-24Disable string merging with alignment > 1 before Solaris 11.4/SPARCRainer Orth1-9/+9
* configure.ac (gcc_cv_ld_aligned_shf_merge): New test. * configure: Regenerate. * config.in: Regenerate. * varasm.c (mergeable_string_section): Use readonly_data_section if linker doesn't support SHF_MERGE with alignment > 8. (mergeable_constant_section): Likewise. From-SVN: r265456
2018-10-12introduce --enable-large-address-awareAlexandre Oliva1-0/+12
Add a configure knob for mingw32 and 64 toolchains to default passing --large-address-aware to the linker, when creating 32-bit binaries. -Wl,--disable-large-address-aware can still reverse its effects. for gcc/ChangeLog * configure.ac: Introduce --enable-large-address-aware to define MINGW_DEFAULT_LARGE_ADDR_AWARE. * doc/install.texi: Document it. * configure, config.in: Rebuilt. * config/i386/mingw32.h (LINK_SPEC_LARGE_ADDR_AWARE): Define, based on MINGW_DEFAULT_LARGE_ADDR_AWARE. (LINK_SPEC): Insert it. * config/i386/mingw-264.h: Likewise. From-SVN: r265130
2018-10-01Allow setting of stack-clash via configure options.Tamar Christina1-0/+7
This patch defines a configure option to allow the setting of the default guard size via configure flags when building the target. The new flag is: * --with-stack-clash-protection-guard-size=<num> The patch defines a new macro DEFAULT_STK_CLASH_GUARD_SIZE which targets need to use explicitly is they want to support this configure flag and values that users may have set. gcc/ PR target/86486 * configure.ac: Add stack-clash-protection-guard-size. * doc/install.texi: Document it. * config.in (DEFAULT_STK_CLASH_GUARD_SIZE): New. * params.def: Update comment for guard-size. (PARAM_STACK_CLASH_PROTECTION_GUARD_SIZE, PARAM_STACK_CLASH_PROTECTION_PROBE_INTERVAL): Update description. * configure: Regenerate. From-SVN: r264752
2018-09-29rs6000: Delete HAVE_AS_DCISegher Boessenkool1-6/+0
Every supported assembler supports these instructions. Committing. * config.in: Delete HAVE_AS_DCI. * config/powerpcspe/powerpcspe.h: Treat HAVE_AS_DCI as always true. * config/rs6000/rs6000.h: Ditto. * configure.ac: Delete HAVE_AS_DCI. * configure: Regenerate. From-SVN: r264703
2018-09-28rs6000: Delete HAVE_AS_LWSYNC and TARGET_LWSYNC_INSTRUCTIONSegher Boessenkool1-6/+0
All supported assemblers know lwsync, so we never need to generate this instruction using the .long escape hatch. * config.in (HAVE_AS_LWSYNC): Delete. * config/powerpcspe/powerpcspe.h (TARGET_LWSYNC_INSTRUCTION): Delete. * config/powerpcspe/sync.md (*lwsync): Always generate lwsync, never do it as a .long . * config/rs6000/rs6000.h (TARGET_LWSYNC_INSTRUCTION): Delete. * config/rs6000/sync.md (*lwsync): Always generate lwsync, never do it as a .long . * configure.ac: Delete HAVE_AS_LWSYNC. * configure: Regenerate. From-SVN: r264702
2018-09-27rs6000: Delete many HAVE_AS_* (PR87149)Segher Boessenkool1-48/+0
This deletes most HAVE_AS_* that determine if the assembler supports some ISA level (and also HAVE_AS_MFPGPR and HAVE_AS_DFP). These are not useful: we will only generate an instruction that requires some newer ISA if the user specifically asked for it (with -mcpu=, say). If the assembler cannot handle that, it is fine if it gives an error. They also hurt: it increases the number of possible situations that all need handling and all need testing. We do not handle all cases, and obviously do not test all either. This patch removes: HAVE_AS_POPCNTB (power5, 2.02) HAVE_AS_FPRND (power5+, 2.04) HAVE_AS_CMPB (power6, 2.05) HAVE_AS_POPCNTD (power7, 2.06) HAVE_AS_POWER8 (power8, 2.07) HAVE_AS_POWER9 (power9, 3.0) HAVE_AS_DFP (power6, 2.05, server) HAVE_AS_MFPGPR (power6x but not later, not arch) PR target/87149 * config.in (HAVE_AS_CMPB, HAVE_AS_DFP, HAVE_AS_FPRND, HAVE_AS_MFPGPR, HAVE_AS_POPCNTB, HAVE_AS_POPCNTD, HAVE_AS_POWER8, HAVE_AS_POWER9): Delete, always treat as true. * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal): Ditto. Simplify remaining code. * config/powerpcspe/powerpcspe.h: Ditto. * config/rs6000/rs6000.c (rs6000_option_override_internal): Ditto. Simplify remaining code. (rs6000_expand_builtin): Ditto. * config/rs6000/rs6000.h: Ditto. * configure.ac: Ditto. * configure: Regenerate. From-SVN: r264675
2018-09-20[PR87013] check for .loc is_stmt support in the assemblerAlexandre Oliva1-0/+6
Back when we had the logic to output is_stmt but never exercised it, it didn't matter that we didn't test for assembler support for it. But there are still assemblers out there that do not support it, so now that we enable the formerly latent is_stmt logic, we'd better make sure the assembler can deal with it. for gcc/ChangeLog PR bootstrap/87013 * configure.ac: Check for .loc is_stmt support. * configure, config.in: Rebuilt. * dwarf2out.c (dwarf2out_source_line): Skip is_stmt if not supported. From-SVN: r264449
2018-05-25Support SHF_EXCLUDE on non-x86 and with Solaris asRainer Orth1-1/+1
* configure.ac (gcc_cv_as_section_has_e): Move to common section. Rename to... (gcc_cv_as_section_exclude): ... this. Try Solaris as #exclude syntax. * configure: Regenerate. * config.in: Regenerate. * config/i386/i386.c (i386_solaris_elf_named_section): Handle SECTION_EXCLUDE. * config/sparc/sparc.c (sparc_solaris_elf_asm_named_section) [HAVE_GAS_SECTION_EXCLUDE]: Handle SECTION_EXCLUDE. * varasm.c (default_elf_asm_named_section): Don't check if HAVE_GAS_SECTION_EXCLUDE is defined. From-SVN: r260708
2018-02-09[LVU] Introduce location viewsAlexandre Oliva1-0/+6
This patch introduces an option to enable the generation of location views along with location lists. The exact format depends on the DWARF version: it can be a separate attribute (DW_AT_GNU_locviews) or (DW_LLE_view_pair) entries in DWARF5+ loclists. Line number tables are also affected. If the assembler is found, at compiler build time, to support .loc views, we use them and assembler-computed view labels, otherwise we output compiler-generated line number programs with conservatively-computed view labels. In either case, we output view information next to line number changes when verbose assembly output is requested. This patch requires an LVU patch that modifies the exported API of final_scan_insn. It also expects the entire SFN patchset to be installed first, although SFN is not a requirement for LVU. for include/ChangeLog * dwarf2.def (DW_AT_GNU_locviews): New. * dwarf2.h (enum dwarf_location_list_entry_type): Add DW_LLE_GNU_view_pair. (DW_LLE_view_pair): Define. for gcc/ChangeLog * common.opt (gvariable-location-views): New. (gvariable-location-views=incompat5): New. * config.in: Rebuilt. * configure: Rebuilt. * configure.ac: Test assembler for view support. * dwarf2asm.c (dw2_asm_output_symname_uleb128): New. * dwarf2asm.h (dw2_asm_output_symname_uleb128): Declare. * dwarf2out.c (var_loc_view): New typedef. (struct dw_loc_list_struct): Add vl_symbol, vbegin, vend. (dwarf2out_locviews_in_attribute): New. (dwarf2out_locviews_in_loclist): New. (dw_val_equal_p): Compare val_view_list of dw_val_class_view_lists. (enum dw_line_info_opcode): Add LI_adv_address. (struct dw_line_info_table): Add view. (RESET_NEXT_VIEW, RESETTING_VIEW_P): New macros. (DWARF2_ASM_VIEW_DEBUG_INFO): Define default. (zero_view_p): New variable. (ZERO_VIEW_P): New macro. (output_asm_line_debug_info): New. (struct var_loc_node): Add view. (add_AT_view_list, AT_loc_list): New. (add_var_loc_to_decl): Add view param. Test it against last. (new_loc_list): Add view params. Record them. (AT_loc_list_ptr): Handle loc and view lists. (view_list_to_loc_list_val_node): New. (print_dw_val): Handle dw_val_class_view_list. (size_of_die): Likewise. (value_format): Likewise. (loc_list_has_views): New. (gen_llsym): Set vl_symbol too. (maybe_gen_llsym, skip_loc_list_entry): New. (dwarf2out_maybe_output_loclist_view_pair): New. (output_loc_list): Output view list or entries too. (output_view_list_offset): New. (output_die): Handle dw_val_class_view_list. (output_dwarf_version): New. (output_compilation_unit_header): Use it. (output_skeleton_debug_sections): Likewise. (output_rnglists, output_line_info): Likewise. (output_pubnames, output_aranges): Update version comments. (output_one_line_info_table): Output view numbers in asm comments. (dw_loc_list): Determine current endview, pass it to new_loc_list. Call maybe_gen_llsym. (loc_list_from_tree_1): Adjust. (add_AT_location_description): Create view list attribute if needed, check it's absent otherwise. (convert_cfa_to_fb_loc_list): Adjust. (maybe_emit_file): Call output_asm_line_debug_info for test. (dwarf2out_var_location): Reset views as needed. Precompute add_var_loc_to_decl args. Call get_attr_min_length only if we have the attribute. Set view. (new_line_info_table): Reset next view. (set_cur_line_info_table): Call output_asm_line_debug_info for test. (dwarf2out_source_line): Likewise. Output view resets and labels to the assembler, or select appropriate line info opcodes. (prune_unused_types_walk_attribs): Handle dw_val_class_view_list. (optimize_string_length): Catch it. Adjust. (resolve_addr): Copy vl_symbol along with ll_symbol. Handle dw_val_class_view_list, and remove it if no longer needed. (hash_loc_list): Hash view numbers. (loc_list_hasher::equal): Compare them. (optimize_location_lists): Check whether a view list symbol is needed, and whether the locview attribute is present, and whether they match. Remove the locview attribute if no longer needed. (index_location_lists): Call skip_loc_list_entry for test. (dwarf2out_finish): Call output_asm_line_debug_info for test. Use output_dwarf_version. * dwarf2out.h (enum dw_val_class): Add dw_val_class_view_list. (struct dw_val_node): Add val_view_list. * final.c (SEEN_NEXT_VIEW): New. (set_next_view_needed): New. (clear_next_view_needed): New. (maybe_output_next_view): New. (final_start_function): Rename to... (final_start_function_1): ... this. Take pointer to FIRST, add SEEN parameter. Emit param bindings in the initial view. (final_start_function): Reintroduce SEEN-less interface. (final): Rename to... (final_1): ... this. Take SEEN parameter. Output final pending next view at the end. (final): Reintroduce seen-less interface. (final_scan_insn): Output pending next view before switching sections or ending a block. Mark the next view as needed when outputting variable locations. Notify debug backend of section changes, and of location view changes. (rest_of_handle_final): Adjust. * toplev.c (process_options): Autodetect value for debug variable location views option. Warn on incompat5 without -gdwarf-5. * doc/invoke.texi (gvariable-location-views): New. (gvariable-location-views=incompat5): New. (gno-variable-location-views): New. From-SVN: r257510
2018-01-26Configure USE_HIDDEN_LINKONCE on Solaris/x86Rainer Orth1-0/+6
gcc/testsuite: * gcc.target/i386/mcount_pic.c: Only xfail get_pc_thunk scan on Solaris 10. * gcc.target/i386/pr63620.c: Likewise. gcc: * config/i386/sol2.h (USE_HIDDEN_LINKONCE): Remove. * configure.ac (hidden_linkonce): New test. * configure: Regenerate. * config.in: Regenerate. From-SVN: r257076
2017-10-26Use -xbrace_comment=no with recent Solaris/x86 asRainer Orth1-0/+6
* configure.ac (gcc_cv_as_ix86_xbrace_comment): Check if assembler supports -xbrace_comment option. * configure: Regenerate. * config.in: Regenerate. * config/i386/sol2.h (ASM_XBRACE_COMMENT_SPEC): Define. (ASM_CPU_SPEC): Use it. From-SVN: r254103
2017-07-10Better ISR prologues by supporting GASes __gcc_isr pseudo insn.Georg-Johann Lay1-0/+8
gcc/ Better ISR prologues by supporting GASes __gcc_isr pseudo insn. PR target/20296 PR target/81268 * configure.ac [target=avr]: Add GAS check for -mgcc-isr. (HAVE_AS_AVR_MGCCISR_OPTION): If so, AC_DEFINE it. * config.in: Regenerate. * configure: Regenerate. * doc/extend.texi (AVR Function Attributes) <no_gccisr>: Document it. * doc/invoke.texi (AVR Options) <-mgas-isr-prologues>: Document it. * config/avr/avr.opt (-mgas-isr-prologues): New option and... (TARGET_GASISR_PROLOGUES): ...target mask. * common/config/avr/avr-common.c (avr_option_optimization_table) [OPT_LEVELS_1_PLUS_NOT_DEBUG]: Set -mgas-isr-prologues. * config/avr/avr-passes.def (avr_pass_pre_proep): Add INSERT_PASS_BEFORE for it. * config/avr/avr-protos.h (make_avr_pass_pre_proep): New proto. * config/avr/avr.c (avr_option_override) [!HAVE_AS_AVR_MGCCISR_OPTION]: Unset TARGET_GASISR_PROLOGUES. (avr_no_gccisr_function_p, avr_hregs_split_reg): New static functions. (avr_attribute_table) <no_gccisr>: Add new function attribute. (avr_set_current_function) <is_no_gccisr>: Init machine field. (avr_pass_data_pre_proep, avr_pass_pre_proep): New pass data and rtl_opt_pass. (make_avr_pass_pre_proep): New function. (emit_push_sfr) <treg>: Add argument to function and use it instead of TMP_REG. (avr_expand_prologue) [machine->gasisr.maybe]: Emit gasisr insn and set machine->gasisr.yes. (avr_expand_epilogue) [machine->gasisr.yes]: Similar. (avr_asm_function_end_prologue) [machine->gasisr.yes]: Add __gcc_isr.n_pushed to .L__stack_usage. (TARGET_ASM_FINAL_POSTSCAN_INSN): Define to... (avr_asm_final_postscan_insn): ...this new static function. * config/avr/avr.h (machine_function) <is_no_gccisr, use_L__stack_usage>: New fields. <gasisr, gasisr.yes, gasisr.maybe, gasisr.regno>: New fields. * config/avr/avr.md (UNSPECV_GASISR): Add unspecv enum. (GASISR_Prologue, GASISR_Epilogue, GASISR_Done): New define_constants. (gasisr, *gasisr): New expander and insn. * config/avr/gen-avr-mmcu-specs.c (print_mcu) [HAVE_AS_AVR_MGCCISR_OPTION]: Print asm_gccisr spec. * config/avr/specs.h (ASM_SPEC) <asm_gccisr>: Add sub spec. From-SVN: r250093
2017-07-07Support for the SPARC M8 cpu.Jose E. Marchesi1-0/+4
This patch serie adds support for the SPARC M8 processor to GCC. The SPARC M8 processor implements the Oracle SPARC Architecture 2017. - bmask* instructions are put in their own instruction type. It makes little sense to have them in the same category than array instructions. - Similarly, VIS compare instructions are put in their own instruction type. This is to better accommodate subtypes, which are not quite the same than the subtypes of `visl' instructions. - The introduction of a new `subtype' insn attribute in sparc.md avoids the need for adjusting the instruction scheduler DFAs for previous cpu models every time a new cpu is introduced. - The full set of SPARC instructions used in sparc.md, and their position in the type/subtype hierarchy, is documented in a comment. This eases the modification of the DFA schedulers, and the addition of new cpus. - The M7 DFA scheduler is reworked: + To use the new type/subtype hierarchy. + The v3pipe insn attribute is no longer needed. + More accurate latencies for instructions. + The C4 core pipeline is documented in a comment in niagara7.md. - Support for -mcpu=m8 (we are thus suggesting to abandon the niagaraN denomination for M8 and later processors.) - Support for a new VIS level, VIS4B, covering the new VIS instructions introduced in OSA2017 and implemented in the M8. Also built-ins. - A M8 DFA scheduler: + Also based on the new type/subtype hierarchy. + The functional units in the C5 core are explicitly documented in a comment in m8.md. gcc/ChangeLog: * config/sparc/m8.md: New file. * config/sparc/sparc.md: Include m8.md. * config/sparc/sparc.opt: New option -mvis4b. * config/sparc/sparc.c (dump_target_flag_bits): Handle MASK_VIS4B. (sparc_option_override): Handle VIS4B. (enum sparc_builtins): Define SPARC_BUILTIN_DICTUNPACK{8,16,32}, SPARC_BUILTIN_FPCMP{LE,GT,EQ,NE}{8,16,32}SHL, SPARC_BUILTIN_FPCMPU{LE,GT}{8,16,32}SHL, SPARC_BUILTIN_FPCMPDE{8,16,32}SHL and SPARC_BUILTIN_FPCMPUR{8,16,32}SHL. (check_constant_argument): New function. (sparc_vis_init_builtins): Define builtins __builtin_vis_dictunpack{8,16,32}, __builtin_vis_fpcmp{le,gt,eq,ne}{8,16,32}shl, __builtin_vis_fpcmpu{le,gt}{8,16,32}shl, __builtin_vis_fpcmpde{8,16,32}shl and __builtin_vis_fpcmpur{8,16,32}shl. (sparc_expand_builtin): Check that the constant operands to __builtin_vis_fpcmp*shl and _builtin_vis_dictunpack* are indeed constant and in range. * config/sparc/sparc-c.c (sparc_target_macros): Handle TARGET_VIS4B. * config/sparc/sparc.h (SPARC_IMM2_P): Define. (SPARC_IMM5_P): Likewise. * config/sparc/sparc.md (cpu_feature): Add new feagure "vis4b". (enabled): Handle vis4b. (UNSPEC_DICTUNPACK): New unspec. (UNSPEC_FPCMPSHL): Likewise. (UNSPEC_FPUCMPSHL): Likewise. (UNSPEC_FPCMPDESHL): Likewise. (UNSPEC_FPCMPURSHL): Likewise. (cpu_feature): New CPU feature `vis4b'. (dictunpack{8,16,32}): New insns. (FPCSMODE): New mode iterator. (fpcscond): New code iterator. (fpcsucond): Likewise. (fpcmp{le,gt,eq,ne}{8,16,32}{si,di}shl): New insns. (fpcmpu{le,gt}{8,16,32}{si,di}shl): Likewise. (fpcmpde{8,16,32}{si,di}shl): Likewise. (fpcmpur{8,16,32}{si,di}shl): Likewise. * config/sparc/constraints.md: Define constraints `q' for unsigned 2-bit integer constants and `t' for unsigned 5-bit integer constants. * config/sparc/predicates.md (imm5_operand_dictunpack8): New predicate. (imm5_operand_dictunpack16): Likewise. (imm5_operand_dictunpack32): Likewise. (imm2_operand): Likewise. * doc/invoke.texi (SPARC Options): Document -mvis4b. * doc/extend.texi (SPARC VIS Built-in Functions): Document the ditunpack* and fpcmp*shl builtins. * config.gcc: Handle m8 in --with-{cpu,tune} options. * config.in: Add HAVE_AS_SPARC6 define. * config/sparc/driver-sparc.c (cpu_names): Add entry for the SPARC M8. * config/sparc/sol2.h (CPP_CPU64_DEFAULT_SPEC): Define for TARGET_CPU_m8. (ASM_CPU32_DEFAUILT_SPEC): Likewise. (CPP_CPU_SPEC): Handle m8. (ASM_CPU_SPEC): Likewise. * config/sparc/sparc-opts.h (enum processor_type): Add PROCESSOR_M8. * config/sparc/sparc.c (m8_costs): New struct. (sparc_option_override): Handle TARGET_CPU_m8. (sparc32_initialize_trampoline): Likewise. (sparc64_initialize_trampoline): Likewise. (sparc_issue_rate): Likewise. (sparc_register_move_cost): Likewise. * config/sparc/sparc.h (TARGET_CPU_m8): Define. (CPP_CPU64_DEFAULT_SPEC): Define for M8. (ASM_CPU64_DEFAULT_SPEC): Likewise. (CPP_CPU_SPEC): Handle M8. (ASM_CPU_SPEC): Likewise. (AS_M8_FLAG): Define. * config/sparc/sparc.md: Add m8 to the cpu attribute. * config/sparc/sparc.opt: New option -mcpu=m8 for sparc targets. * configure.ac (HAVE_AS_SPARC6): Check for assembler support for M8 instructions. * configure: Regenerate. * doc/invoke.texi (SPARC Options): Document -mcpu=m8 and -mtune=m8. * config/sparc/niagara7.md: Rework the DFA scheduler to use insn subtypes. * config/sparc/sparc.md: Remove the `v3pipe' insn attribute. ("*movdi_insn_sp32"): Do not set v3pipe. ("*movsi_insn"): Likewise. ("*movdi_insn_sp64"): Likewise. ("*movsf_insn"): Likewise. ("*movdf_insn_sp32"): Likewise. ("*movdf_insn_sp64"): Likewise. ("*zero_extendsidi2_insn_sp64"): Likewise. ("*sign_extendsidi2_insn"): Likewise. ("*mov<VM32:mode>_insn"): Likewise. ("*mov<VM64:mode>_insn_sp64"): Likewise. ("*mov<VM64:mode>_insn_sp32"): Likewise. ("<plusminus_insn><VADDSUB:mode>3"): Likewise. ("<vlop:code><VL:mode>3"): Likewise. ("*not_<vlop:code><VL:mode>3"): Likewise. ("*nand<VL:mode>_vis"): Likewise. ("*<vlnotop:code>_not1<VL:mode>_vis"): Likewise. ("*<vlnotop:code>_not2<VL:mode>_vis"): Likewise. ("one_cmpl<VL:mode>2"): Likewise. ("faligndata<VM64:mode>_vis"): Likewise. ("alignaddrsi_vis"): Likewise. ("alignaddrdi_vis"): Likweise. ("alignaddrlsi_vis"): Likewise. ("alignaddrldi_vis"): Likewise. ("fcmp<gcond:code><GCM:gcm_name><P:mode>_vis"): Likewise. ("bmaskdi_vis"): Likewise. ("bmasksi_vis"): Likewise. ("bshuffle<VM64:mode>_vis"): Likewise. ("cmask8<P:mode>_vis"): Likewise. ("cmask16<P:mode>_vis"): Likewise. ("cmask32<P:mode>_vis"): Likewise. ("pdistn<P:mode>_vis"): Likewise. ("<vis3_addsub_ss_patname><VASS:mode>3"): Likewise. * config/sparc/sparc.md ("subtype"): New insn attribute. ("*wrgsr_sp64"): Set insn subtype. ("*rdgsr_sp64"): Likewise. ("alignaddrsi_vis"): Likewise. ("alignaddrdi_vis"): Likewise. ("alignaddrlsi_vis"): Likewise. ("alignaddrldi_vis"): Likewise. ("<plusminus_insn><VADDSUB:mode>3"): Likewise. ("fexpand_vis"): Likewise. ("fpmerge_vis"): Likewise. ("faligndata<VM64:mode>_vis"): Likewise. ("bshuffle<VM64:mode>_vis"): Likewise. ("cmask8<P:mode>_vis"): Likewise. ("cmask16<P:mode>_vis"): Likewise. ("cmask32<P:mode>_vis"): Likewise. ("fchksm16_vis"): Likewise. ("v<vis3_shift_patname><GCM:mode>3"): Likewise. ("fmean16_vis"): Likewise. ("fp<plusminus_insn>64_vis"): Likewise. ("<plusminus_insn>v8qi3"): Likewise. ("<vis3_addsub_ss_patname><VASS:mode>3"): Likewise. ("<vis4_minmax_patname><VMMAX:mode>3"): Likewise. ("<vis4_uminmax_patname><VMMAX:mode>3"): Likewise. ("<vis3_addsub_ss_patname>v8qi3"): Likewise. ("<vis4_addsub_us_patname><VAUS:mode>3"): Likewise. ("*movqi_insn"): Likewise. ("*movhi_insn"): Likewise. ("*movsi_insn"): Likewise. ("movsi_pic_gotdata_op"): Likewise. ("*movdi_insn_sp32"): Likewise. ("*movdi_insn_sp64"): Likewise. ("movdi_pic_gotdata_op"): Likewise. ("*movsf_insn"): Likewise. ("*movdf_insn_sp32"): Likewise. ("*movdf_insn_sp64"): Likewise. ("*zero_extendhisi2_insn"): Likewise. ("*zero_extendqihi2_insn"): Likewise. ("*zero_extendqisi2_insn"): Likewise. ("*zero_extendqidi2_insn"): Likewise. ("*zero_extendhidi2_insn"): Likewise. ("*zero_extendsidi2_insn_sp64"): Likewise. ("ldfsr"): Likewise. ("prefetch_64"): Likewise. ("prefetch_32"): Likewise. ("tie_ld32"): Likewise. ("tie_ld64"): Likewise. ("*tldo_ldub_sp32"): Likewise. ("*tldo_ldub1_sp32"): Likewise. ("*tldo_ldub2_sp32"): Likewise. ("*tldo_ldub_sp64"): Likewise. ("*tldo_ldub1_sp64"): Likewise. ("*tldo_ldub2_sp64"): Likewise. ("*tldo_ldub3_sp64"): Likewise. ("*tldo_lduh_sp32"): Likewise. ("*tldo_lduh1_sp32"): Likewise. ("*tldo_lduh_sp64"): Likewise. ("*tldo_lduh1_sp64"): Likewise. ("*tldo_lduh2_sp64"): Likewise. ("*tldo_lduw_sp32"): Likewise. ("*tldo_lduw_sp64"): Likewise. ("*tldo_lduw1_sp64"): Likewise. ("*tldo_ldx_sp64"): Likewise. ("*mov<VM32:mode>_insn"): Likewise. ("*mov<VM64:mode>_insn_sp64"): Likewise. ("*mov<VM64:mode>_insn_sp32"): Likewise. * config/sparc/sparc.md ("type"): New insn type viscmp. ("fcmp<gcond:code><GCM:gcm_name><P:mode>_vis"): Set insn type to viscmp. ("fpcmp<gcond:code>8<P:mode>_vis"): Likewise. ("fucmp<gcond:code>8<P:mode>_vis"): Likewise. ("fpcmpu<gcond:code><GCM:gcm_name><P:mode>_vis"): Likewise. * config/sparc/niagara7.md ("n7_vis_logical_v3pipe"): Handle viscmp. ("n7_vis_logical_11cycle"): Likewise. * config/sparc/niagara4.md ("n4_vis_logical"): Likewise. * config/sparc/niagara2.md ("niag3_vis": Likewise. * config/sparc/niagara.md ("niag_vis"): Likewise. * config/sparc/ultra3.md ("us3_fga"): Likewise. * config/sparc/ultra1_2.md ("us1_fga_double"): Likewise. * config/sparc/sparc.md: New instruction type `bmask'. (bmaskdi_vis): Use the `bmask' type. (bmasksi_vis): Likewise. * config/sparc/ultra3.md (us3_array): Likewise. * config/sparc/niagara7.md (n7_array): Likewise. * config/sparc/niagara4.md (n4_array): Likewise. * config/sparc/niagara2.md (niag2_vis): Likewise. (niag3_vis): Likewise. * config/sparc/niagara.md (niag_vis): Likewise. gcc/testsuite/ChangeLog: * gcc.target/sparc/dictunpack.c: New file. * gcc.target/sparc/fpcmpdeshl.c: Likewise. * gcc.target/sparc/fpcmpshl.c: Likewise. * gcc.target/sparc/fpcmpurshl.c: Likewise. * gcc.target/sparc/fpcmpushl.c: Likewise. From-SVN: r250049
2017-07-05Graceful degrade if Binutils PR21472 is not available.Georg-Johann Lay1-0/+7
gcc/ Graceful degrade if Binutils PR21472 is not available. PR target/81072 * configure.ac [target=avr]: WARN instead of ERROR if avrxmega3 .rodata in flash test fails. (HAVE_LD_AVR_AVRXMEGA3_RODATA_IN_FLASH): Define it if test passes. * confgure: Regenerate. * config.in: Regenerate. * config/avr/avr.c (avr_asm_named_section) [HAVE_LD_AVR_AVRXMEGA3_RODATA_IN_FLASH]: Only trigger __do_copy_data for stuff in .rodata if flash_pm_offset = 0. (avr_asm_init_sections): Same. From-SVN: r250000
2017-05-04configure.ac (--enable-mingw-wildcard): Add new configurable feature.Thomas Preud'homme1-0/+6
2017-05-04 Thomas Preud'homme <thomas.preudhomme@arm.com> * configure.ac (--enable-mingw-wildcard): Add new configurable feature. * configure: Regenerate. * config.in: Regenerate. * config/i386/driver-mingw32.c: new file. * config/i386/x-mingw32: Add rule to build driver-mingw32.o. * config.host: Link driver-mingw32.o on MinGW host. * doc/install.texi: Document new --enable-mingw-wildcard configure option. From-SVN: r247588
2017-02-13isl.m4: Remove support for ISL 0.14.Richard Biener1-6/+0
2017-02-13 Richard Biener <rguenther@suse.de> config/ * isl.m4: Remove support for ISL 0.14. * configure: Re-generate. gcc/ * configure.ac (HAVE_ISL_OPTIONS_SET_SCHEDULE_SERIALIZE_SCCS): Remove. * configure: Re-generate. * config.in: Likewise. * graphite-dependences.c: Simplify as if HAVE_ISL_OPTIONS_SET_SCHEDULE_SERIALIZE_SCCS was defined. * graphite-isl-ast-to-gimple.c: Likewise. * graphite-optimize-isl.c: Likewise. * graphite-poly.c: Likewise. * graphite-sese-to-poly.c: Likewise. * graphite.h: Likewise. * toplev.c: Include isl/version.h and use isl_version () for printing the ISL version. * doc/install.texi: Update ISL requirement. From-SVN: r245382
2017-01-04Update configure deps, remove stray \xA0 in picflag.m4, regenerateAlan Modra1-7/+7
Also fix a stray changelog entry. Some of the regen here is due to previous changes not being regenerated properly, in part due to the missing configure dependencies. * configure: Regenerate. config/ * picflag.m4: Remove stray \xA0 in comment. gcc/ * Makefile.in (aclocal_deps): Update and order as per aclocal.m4. * configure: Regenerate. * config.in: Regenerate. libada/ * Makefile.in (configure_deps): Update and order as per configure.ac sinclude. * configure: Regenerate. libgcc/ * Makefile.in (configure_deps): Update. * configure: Regenerate. libiberty/ * Makefile.in (configure_deps): Update. * configure: Regenerate. libitm/ * Makefile.in: Regenerate. * testsuite/Makefile.in: Regenerate. From-SVN: r244049
2016-11-27[Darwin] fix PR67710 by updating 'as' specs to handle newer assembler versions.Iain Sandoe1-0/+7
A/ Newer versions of ld64 check the min_version command, and newer versions of the system assembler inserts this in response to "-mmacosx-version-min=" on the assembler line. Unless one makes sensible versions, some object is bound to conflict. B/ Additionally, there's a difference in behaviour between "as" and "ld" when presented with xx.yy.zz (ld truncates to xx.yy, as doesn't); net result is that one needs to pass a truncated version to "as". So (if the assembler supports minversion commands) (a) provide a truncated minversion (as asm_macosx_version_min, which is a driver-only var). (b) pass this to "as" (c) Update tests to determine 'HAVE_AS_MMACOSX_VERSION_MIN_OPTION' (Rainer's patch) (d) For some reason the testcases are "run" (it's not obvious they need to be, they are checking compile-time issues) - anyway, to preserve the status quo, I've left them as exec. However, the minimum version that can be code-gened for is target-dependent (there are no released x86 versions before 10.4, for example). To avoid conflicts where the "as" is assuming some minimum, I've set the testversion to 10.5 (which is supported by all the archs we have) (e) We need to ensure that libgcc and crts are generated with a sufficiently old minversion not to conflict. gcc/ 2016-11-27 Iain Sandoe <iain@codesourcery.com> Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> PR target/67710 * config.in: Regenerate * config/darwin-driver.c (darwin_driver_init): Emit a version string for the assembler. * config/darwin.h(ASM_MMACOSX_VERSION_MIN_SPEC): New, new tests. * config/darwin.opt(asm_macosx_version_min): New. * config/i386/darwin.h: Handle ASM_MMACOSX_VERSION_MIN_SPEC. * configure: Regenerate * configure.ac: Check for mmacosx-version-min handling. gcc/testsuite/ 2016-11-27 Iain Sandoe <iain@codesourcery.com> Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> Dominique d'Humieres <dominiq@lps.ens.fr> PR target/67710 * gcc.dg/darwin-minversion-1.c: Update min version check. * gcc.dg/darwin-minversion-2.c: Likewise. * gcc.dg/darwin-minversion-3.c: Likewise. libgcc/ 2016-11-27 Iain Sandoe <iain@codesourcery.com> Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> PR target/67710 * config/t-darwin: Default builds to 10.5 codegen. Co-Authored-By: Dominique d'Humieres <dominiq@lps.ens.fr> Co-Authored-By: Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> From-SVN: r242898
2016-11-27[Darwin, config] Arrange for ld64 to be detected as Darwin's linker.Iain Sandoe1-0/+12
This is an initial patch in a series that converts Darwin's configury to detect ld64 features, rather than the current process of hard-coding them on target system version. A ld64-compatible linker is currently required and assumed by Darwin. If a DEFAULT_LINKER is set via --with-ld= then this will be tested to see if it is ld64. The ld64 version is determined for the chosen ld and this is exported for use in setting a default value for -mtarget-linker (needed for run-time code-gen changes to section choices). The support for -rdynamic is converted to be detected at config time, or by the ld64 version if that is found. gcc/ 2016-11-27 Iain Sandoe <iain@codesourcery.com> PR target/71767 * configure.ac (with-ld64): New var, set for Darwin, set on detection of ld64, gcc_cv_ld64_export_dynamic: New, New test. * config/darwin.h: Use LD64_HAS_DYNAMIC export. DEF_LD64: New, define. * config/darwin10.h(DEF_LD64): Update for this target version. * config/darwin12.h(LINK_GCC_C_SEQUENCE_SPEC): Remove rdynamic test. (DEF_LD64): Update for this target version. * configure: Regenerated. * config.in: Regenerated. From-SVN: r242894
2016-09-30configure.ac: Split CHECKING_P into CHECKING_P and ENABLE_EXTRA_CHECKING.Bernd Edlinger1-3/+9
2016-09-30 Bernd Edlinger <bernd.edlinger@hotmail.de> * configure.ac: Split CHECKING_P into CHECKING_P and ENABLE_EXTRA_CHECKING. * configure: Regenerated. * config.in: Adjust commment of CHECKING_P. Add ENABLE_EXTRA_CHECKING. * common.opt (flag_checking): Use CHECKING_P and ENABLE_EXTRA_CHECKING. From-SVN: r240677
2016-09-29[RS6000] .gnu.attributes Tag_GNU_Power_ABI_FPAlan Modra1-0/+6
Extend this attribute to cover long double ABIs, for 64-bit too. This patch also corrects an error that crept in to code setting rs6000_passes_float. See the added comment. Passing IEEE128 values in vsx regs ought to set both Tag_GNU_Power_ABI_FP and Tag_GNU_Power_ABI_Vector. Also adds a new option, default on, that disables output of .gnu_attribute assembly directives. * config/rs6000/sysv4.opt (mgnu-attribute): New option. * doc/invoke.texi: Document it. * config/rs6000/rs6000.c (HAVE_LD_PPC_GNU_ATTR_LONG_DOUBLE): Define. (rs6000_passes_float): Comment. (rs6000_passes_long_double): New static var. (call_ABI_of_interest): Return false unless rs6000_gnu_attr is set. (init_cumulative_args): Set up to emit fp .gnu_attribute for ELF 64-bit ABIs as well as 32-bit ELF. Correct rs6000_passes_float to include fp values returned in vectors. Set rs6000_passes_long_double. (rs6000_function_arg_advance_1): Likewise for function args. (rs6000_elf_file_end): Emit fp .gnu_attribute for ELF 64-bit ABIs, and SPE. Emit long double tag value too. (rs6000_opt_vars): Add gnu-attr. * configure.ac (HAVE_LD_PPC_GNU_ATTR_LONG_DOUBLE): New ppc32 test. * configure: Regenerate. * config.in: Regenerate. From-SVN: r240601
2016-09-09re PR target/77267 (MPX does not work in a presence of "-Wl,-as-needed" ↵Alexander Ivchenko1-0/+6
option (Ubuntu default)) Fix PR target/77267 2016-09-10 Alexander Ivchenko <alexander.ivchenko@intel.com> PR target/77267 * config.in: Regenerate. * config/i386/linux-common.h (MPX_LD_AS_NEEDED_GUARD_PUSH): New macro. (MPX_LD_AS_NEEDED_GUARD_PUSH): Ditto. (LIBMPXWRAPPERS_SPEC): Remove "--no-whole-archive" from static-libmpxwrappers case. (LIBMPX_SPEC): Add guards with MPX_LD_AS_NEEDED_GUARD_PUSH and MPX_LD_AS_NEEDED_GUARD_POP. * configure: Regenerate. * configure.ac (HAVE_LD_PUSHPOPSTATE_SUPPORT): New variable. defined if linker support "--push-state"/"--pop-state". From-SVN: r240057
2016-06-24Call tls_get_addr via GOT for GNU TLS if possibleH.J. Lu1-0/+7
There are extensions to x86-64 psABI: https://groups.google.com/forum/#!topic/x86-64-abi/de5_KnLHxtI and i386 psABI: https://groups.google.com/forum/#!topic/ia32-abi/awsRSvJOJfs to call tls_get_addr via GOT. X86 assembler and linker in binutils 2.27 implemented call *__tls_get_addr@GOTPCREL(%rip) in 64-bit and call *___tls_get_addr@GOT(%reg) in 32-bit to access global and local thread loal variables in shared library. We check if 32-bit x86 assembler and linker work with call *___tls_get_addr@GOT(%reg) as 32-bit and 64-bit assembler and linker are enabled togther. In 32-bit, since any integer register except EAX, which is used to pass parameter to ___tls_get_addr, and ESP, can be used as GOT base, a new register class, TLS_GOTBASE_REGS, along with a new constraint, Yb, are added. They are used to improve register allocation for 32-bit dynamic TLS patterns. gcc/ * configure.ac (calling ___tls_get_addr via GOT): New assembler/linker check. (HAVE_AS_IX86_TLS_GET_ADDR_GOT): New. Defined to 1 if 32-bit assembler and linker supports calling ___tls_get_addr via GOT. Otherise, defined to 0. * config.in: Regenerated. * configure: Likewise. * config/i386/constraints.md (Yb): New constraint. * config/i386/i386.h (reg_class): Add TLS_GOTBASE_REGS. (REG_CLASS_NAMES): Likewise. (REG_CLASS_CONTENTS): Likewise. * config/i386/i386.md (*tls_global_dynamic_32_gnu): Replace the b constraint with the Yb constraint. Call ___tls_get_addr via GOT for GNU TLS with -fno-plt if HAVE_AS_IX86_TLS_GET_ADDR_GOT is 1. (*tls_local_dynamic_base_32_gnu): Likewise. (*tls_global_dynamic_64_<mode>): Call _tls_get_addr via GOT for GNU TLS with -fno-plt if HAVE_AS_IX86_TLS_GET_ADDR_GOT is 1. (*tls_local_dynamic_base_64_<mode>): Likewise. gcc/testsuite/ * gcc.target/i386/noplt-gd-1.c: New test. * gcc.target/i386/noplt-gd-2.c: Likewise. * gcc.target/i386/noplt-gd-3.c: Likewise. * gcc.target/i386/noplt-ld-1.c: Likewise. * gcc.target/i386/noplt-ld-2.c: Likewise. * gcc.target/i386/noplt-ld-3.c: Likewise. * lib/target-supports.exp (check_effective_target_tls_get_addr_via_got): New. From-SVN: r237765