1. 12 Jul, 2017 1 commit
    • re PR target/81193 (PowerPC GCC __builtin_cpu_is and __builtin_cpu_supports… · 3787ee47
      re PR target/81193 (PowerPC GCC __builtin_cpu_is and __builtin_cpu_supports should warn about old libraries)
      
      [gcc]
      2017-07-12  Michael Meissner  <meissner@linux.vnet.ibm.com>
      
      	PR target/81193
      	* config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): If GLIBC
      	provides the hardware capability bits, define the macro
      	__BUILTIN_CPU_SUPPORTS__.
      	* config/rs6000/rs6000.c (cpu_expand_builtin): Generate a warning
      	if GLIBC does not provide the hardware capability bits.  Add a
      	gcc_unreachable call if the built-in cpu function is neither
      	__builtin_cpu_is nor __builtin_cpu_supports.
      	(rs6000_get_function_versions_dispatcher): Change the warning
      	that an old GLIBC is used which does not export the capability
      	bits to be an error.
      	* doc/extend.texi (target_clones attribute): Document the
      	restriction that GLIBC 2.23 or newer is needed on the PowerPC.
      	(PowerPC built-in functions): Document that GLIBC 2.23 or newer is
      	needed by __builtin_cpu_is and __builtin_cpu_supports.  Document
      	the macros defined by GCC if the newer GLIBC is available.
      
      [gcc/testsuite]
      2017-07-12  Michael Meissner  <meissner@linux.vnet.ibm.com>
      
      	PR target/81193
      	* gcc.target/powerpc/bmi-andn-1.c: Add guard against using
      	__builtin_cpu_supports with old GLIBC's.
      	* gcc.target/powerpc/bmi-andn-2.c: Likewise.
      	* gcc.target/powerpc/bmi-bextr-1.c: Likewise.
      	* gcc.target/powerpc/bmi-bextr-2.c: Likewise.
      	* gcc.target/powerpc/bmi-bextr-4.c: Likewise.
      	* gcc.target/powerpc/bmi-bextr-5.c: Likewise.
      	* gcc.target/powerpc/bmi-blsi-1.c: Likewise.
      	* gcc.target/powerpc/bmi-blsi-2.c: Likewise.
      	* gcc.target/powerpc/bmi-blsmsk-1.c: Likewise.
      	* gcc.target/powerpc/bmi-blsmsk-2.c: Likewise.
      	* gcc.target/powerpc/bmi-blsr-1.c: Likewise.
      	* gcc.target/powerpc/bmi-blsr-2.c: Likewise.
      	* gcc.target/powerpc/bmi-tzcnt-1.c: Likewise.
      	* gcc.target/powerpc/bmi-tzcnt-2.c: Likewise.
      	* gcc.target/powerpc/bmi2-bzhi32-1.c: Likewise.
      	* gcc.target/powerpc/bmi2-bzhi64-1.c: Likewise.
      	* gcc.target/powerpc/bmi2-mulx32-1.c: Likewise.
      	* gcc.target/powerpc/bmi2-mulx32-2.c: Likewise.
      	* gcc.target/powerpc/bmi2-mulx64-1.c: Likewise.
      	* gcc.target/powerpc/bmi2-mulx64-2.c: Likewise.
      	* gcc.target/powerpc/bmi2-pdep32-1.c: Likewise.
      	* gcc.target/powerpc/bmi2-pdep64-1.c: Likewise.
      	* gcc.target/powerpc/bmi2-pext32-1.c: Likewise.
      	* gcc.target/powerpc/bmi2-pext64-1.c: Likewise.
      	* gcc.target/powerpc/cpu-builtin-1.c: Likewise.
      
      [libgcc]
      2017-07-12  Michael Meissner  <meissner@linux.vnet.ibm.com>
      
      	PR target/81193
      	* configure.ac (PowerPC float128 hardware support): Test whether
      	we can use __builtin_cpu_supports before enabling the ifunc
      	handler.
      	* configure: Regenerate.
      
      From-SVN: r250165
      Michael Meissner committed
  2. 10 Jul, 2017 1 commit
  3. 09 Jul, 2017 1 commit
  4. 07 Jul, 2017 1 commit
  5. 06 Jul, 2017 1 commit
    • Add support for ARMv8-R architecture · 9296dd9b
      2017-07-06  Thomas Preud'homme  <thomas.preudhomme@arm.com>
      
          gcc/
          * config/arm/arm-cpus.in (armv8-r): Add new entry.
          * config/arm/arm-isa.h (ISA_ARMv8r): Define macro.
          * config/arm/arm-tables.opt: Regenerate.
          * config/arm/arm.h (enum base_architecture): Add BASE_ARCH_8R
          enumerator.
          * doc/invoke.texi: Mention -march=armv8-r and its extensions.
      
          gcc/testsuite/
          * lib/target-supports.exp: Generate
          check_effective_target_arm_arch_v8r_ok, add_options_for_arm_arch_v8r
          and check_effective_target_arm_arch_v8r_multilib.
      
          libgcc/
          * config/arm/lib1funcs.S: Defined __ARM_ARCH__ to 8 for ARMv8-R.
      
      From-SVN: r250025
      Thomas Preud'homme committed
  6. 04 Jul, 2017 1 commit
  7. 03 Jul, 2017 1 commit
  8. 28 Jun, 2017 1 commit
    • Use ucontext_t not struct ucontext in linux-unwind.h files. · 883312dc
      Current glibc no longer gives the ucontext_t type the tag struct
      ucontext, to conform with POSIX namespace rules.  This requires
      various linux-unwind.h files in libgcc, that were previously using
      struct ucontext, to be fixed to use ucontext_t instead.  This is
      similar to the removal of the struct siginfo tag from siginfo_t some
      years ago.
      
      This patch changes those files to use ucontext_t instead.  As the
      standard name that should be unconditionally safe, so this is not
      restricted to architectures supported by glibc, or conditioned on the
      glibc version.
      
      Tested compilation together with current glibc with glibc's
      build-many-glibcs.py.
      
      	* config/aarch64/linux-unwind.h (aarch64_fallback_frame_state),
      	config/alpha/linux-unwind.h (alpha_fallback_frame_state),
      	config/bfin/linux-unwind.h (bfin_fallback_frame_state),
      	config/i386/linux-unwind.h (x86_64_fallback_frame_state,
      	x86_fallback_frame_state), config/m68k/linux-unwind.h (struct
      	uw_ucontext), config/nios2/linux-unwind.h (struct nios2_ucontext),
      	config/pa/linux-unwind.h (pa32_fallback_frame_state),
      	config/riscv/linux-unwind.h (riscv_fallback_frame_state),
      	config/sh/linux-unwind.h (sh_fallback_frame_state),
      	config/tilepro/linux-unwind.h (tile_fallback_frame_state),
      	config/xtensa/linux-unwind.h (xtensa_fallback_frame_state): Use
      	ucontext_t instead of struct ucontext.
      
      From-SVN: r249731
      Joseph Myers committed
  9. 27 Jun, 2017 2 commits
  10. 22 Jun, 2017 1 commit
    • driver-i386.c (host_detect_local_cpu): Add Kaby Lake models to skylake case. · 60edf8bb
      gcc/
      
      2017-06-22  Matt Turner  <mattst88@gmail.com>
      
      	* config/i386/driver-i386.c (host_detect_local_cpu): Add Kaby
      	Lake models to skylake case.  Assume skylake for unknown
      	models with clflushopt.
      
      gcc/testsuite/
      
      2017-06-22  Matt Turner  <mattst88@gmail.com>
      
      	* gcc.target/i386/builtin_target.c: Add Kaby Lake models to
      	skylake check.
      
      libgcc/
      
      2017-06-22  Matt Turner  <mattst88@gmail.com>
      
      	* config/i386/cpuinfo.c (get_intel_cpu): Add Kaby Lake models to
      	skylake case.
      
      From-SVN: r249574
      Matt Turner committed
  11. 21 Jun, 2017 1 commit
  12. 16 Jun, 2017 1 commit
    • [arm] Explicitly set .fpu in cmse_nonsecure_call.S · f0cd49c5
      This file is missing a .fpu directive and was relying on the compiler
      driver passing through a -mfpu= command line option.  When the FPU is
      auto, that will not be passed through correctly, so set something
      suitable within the file itself.
      
      libgcc:
      	 * config/arm/cmse_nonsecure_call.S: Explicitly set the FPU.
      
      From-SVN: r249297
      Richard Earnshaw committed
  13. 09 Jun, 2017 1 commit
    • Speed-up indirect-call instrumentation · 4f751c54
      2017-06-09  Martin Liska  <mliska@suse.cz>
      
      	* tree-profile.c (gimple_gen_ic_profiler): Update comment.
      	(gimple_gen_ic_func_profiler): Emit direct comparison
      	of __gcov_indirect_call_callee with NULL.
      	(gimple_gen_time_profiler): Change probability from
      	PROB_VERY_UNLIKELY to PROB_UNLIKELY.
      2017-06-09  Martin Liska  <mliska@suse.cz>
      
      	* libgcov-profiler.c (__gcov_indirect_call_profiler_v2):
      	Reset __gcov_indirect_call_callee to NULL.
      
      From-SVN: r249058
      Martin Liska committed
  14. 08 Jun, 2017 1 commit
  15. 07 Jun, 2017 2 commits
  16. 02 Jun, 2017 2 commits
  17. 30 May, 2017 1 commit
  18. 26 May, 2017 1 commit
  19. 17 May, 2017 1 commit
  20. 15 May, 2017 1 commit
  21. 14 May, 2017 2 commits
    • PR target/80600 - hidden symbol '__cpu_model' is referenced by DSO · eac8c9f2
      gcc/ChangeLog:
      
              PR target/80600
              * config/netbsd.h (NETBSD_LIBGCC_SPEC): Always add -lgcc.
      
      libgcc/ChangeLog:
      
              PR target/80600
              * config.host (*-*-netbsd*): Add t-slibgcc-libgcc to tmake_file.
      
      From-SVN: r248037
      Krister Walfridsson committed
    • i386.opt: Add option -mcall-ms2sysv-xlogues. · d6d4d770
      gcc/ChangeLog:
      
      	* config/i386/i386.opt: Add option -mcall-ms2sysv-xlogues.
      	* config/i386/i386.h
      	(x86_64_ms_sysv_extra_clobbered_registers): Change type to unsigned.
      	(NUM_X86_64_MS_CLOBBERED_REGS): New macro.
      	(struct machine_function): Add new members call_ms2sysv,
      	call_ms2sysv_pad_in, call_ms2sysv_pad_out and call_ms2sysv_extra_regs.
      	(struct machine_frame_state): New fields sp_realigned and
      	sp_realigned_offset.
      	* config/i386/i386.c
      	(enum xlogue_stub): New enum.
      	(enum xlogue_stub_sets): New enum.
      	(class xlogue_layout): New class.
      	(struct ix86_frame): New fields stack_realign_allocate_offset,
      	stack_realign_offset and outlined_save_offset.  Modify comments to
      	detail stack layout when using out-of-line stubs.
      	(ix86_target_string): Add -mcall-ms2sysv-xlogues option.
      	(ix86_option_override_internal): Add sorry() for TARGET_SEH and
      	-mcall-ms2sysv-xlogues.
      	(stub_managed_regs): New static variable.
      	(ix86_save_reg): Add new parameter ignore_outlined to optionally omit
      	registers managed by out-of-line stub.
      	(disable_call_ms2sysv_xlogues): New function.
      	(ix86_compute_frame_layout): Modify re-alignment calculations, disable
      	m->call_ms2sysv when appropriate and compute frame layout for
      	out-of-line stubs.
      	(sp_valid_at, fp_valid_at): New inline functions.
      	(choose_basereg): New function.
      	(choose_baseaddr): Add align parameter, use choose_basereg and modify
      	all callers.
      	(ix86_emit_save_reg_using_mov, ix86_emit_restore_sse_regs_using_mov):
      	Use align parameter of choose_baseaddr to generated aligned SSE movs
      	when possible.
      	(pro_epilogue_adjust_stack): Modify to track
      	machine_frame_state::sp_realigned.
      	(ix86_nsaved_regs): Modify to accommodate changes to ix86_save_reg.
      	(ix86_nsaved_sseregs): Likewise.
      	(ix86_emit_save_regs): Likewise.
      	(ix86_emit_save_regs_using_mov): Likewise.
      	(ix86_emit_save_sse_regs_using_mov): Likewise.
      	(get_scratch_register_on_entry): Likewise.
      	(gen_frame_set): New function.
      	(gen_frame_load): Likewise.
      	(gen_frame_store): Likewise.
      	(emit_outlined_ms2sysv_save): Likewise.
      	(emit_outlined_ms2sysv_restore): Likewise.
      	(ix86_expand_prologue): Modify stack re-alignment code and call
      	emit_outlined_ms2sysv_save when appropriate.
      	(ix86_emit_leave): Clear machine_frame_state::sp_realigned.  Add
      	parameter rtx_insn *insn, which allows the function to be used to only
      	generate the notes.
      	(ix86_expand_epilogue): Modify validity checks of frame and stack
      	pointers, and call emit_outlined_ms2sysv_restore when appropriate.
      	(ix86_expand_call): Modify to enable m->call_ms2sysv when appropriate.
      	* config/i386/predicates.md
      	(save_multiple): New predicate.
      	(restore_multiple): Likewise.
      	* config/i386/sse.md
      	(save_multiple<mode>): New pattern.
      	(save_multiple_realign<mode>): Likewise.
      	(restore_multiple<mode>): Likewise.
      	(restore_multiple_and_return<mode>): Likewise.
      	(restore_multiple_leave_return<mode>): Likewise.
      	* Makefile.in: Export HOSTCXX and HOSTCXXFLAGS to site.exp
      
      gcc/testsuite/ChangeLog:
      
      	* gcc.target/x86_64/abi/ms-sysv/do-test.S: New file.
      	* gcc.target/x86_64/abi/ms-sysv/gen.cc: Likewise.
      	* gcc.target/x86_64/abi/ms-sysv/ms-sysv.c: Likewise.
      	* gcc.target/x86_64/abi/ms-sysv/ms-sysv.exp: Likewise.
      
      libgcc/ChangeLog:
      
      	* config.host: Add i386/t-msabi to i386/t-linux file list.
      	* config/i386/i386-asm.h: New file.
      	* config/i386/resms64.S: New file.
      	* config/i386/resms64f.S: New file.
      	* config/i386/resms64fx.S: New file.
      	* config/i386/resms64x.S: New file.
      	* config/i386/savms64.S: New file.
      	* config/i386/savms64f.S: New file.
      	* config/i386/t-msabi: New file.
      
      From-SVN: r248029
      Daniel Santos committed
  22. 09 May, 2017 1 commit
  23. 06 May, 2017 1 commit
    • Add fuchsia support to libgcc · 7ab8766a
      	* config/arm/unwind-arm.h (_Unwind_decode_typeinfo_ptr): Use
      	pc-relative indirect handling for fuchsia.
      	* config/t-slibgcc-fuchsia: New file.
      	* config.host (*-*-fuchsia*, aarch64*-*-fuchsia*, arm*-*-fuchsia*,
      	x86_64-*-fuchsia*): Add definitions.
      
      From-SVN: r247710
      Joshua Conner committed
  24. 19 Apr, 2017 1 commit
  25. 18 Apr, 2017 1 commit
  26. 07 Apr, 2017 2 commits
  27. 03 Apr, 2017 1 commit
    • Fix numerous typos in comments · 5764ee3c
      gcc:
      
      	* alias.c (base_alias_check): Fix typo in comment.
      	* cgraph.h (class ipa_polymorphic_call_context): Likewise.
      	* cgraphunit.c (symbol_table::compile): Likewise.
      	* collect2.c (maybe_run_lto_and_relink): Likewise.
      	* config/arm/arm.c (arm_thumb1_mi_thunk): Likewise.
      	* config/avr/avr-arch.h (avr_arch_info_t): Likewise.
      	* config/avr/avr.c (avr_map_op_t): Likewise.
      	* config/cr16/cr16.h (DATA_ALIGNMENT): Likewise.
      	* config/epiphany/epiphany.c (TARGET_ARG_PARTIAL_BYTES): Likewise.
      	* config/epiphany/epiphany.md (movcc): Likewise.
      	* config/i386/i386.c (legitimize_pe_coff_extern_decl): Likewise.
      	* config/m68k/m68k.c (struct _sched_ib, m68k_sched_variable_issue):
      	Likewise.
      	* config/mips/mips.c (mips_save_restore_reg): Likewise.
      	* config/rx/rx.c (rx_is_restricted_memory_address): Likewise.
      	* config/s390/s390.c (Z10_EARLYLOAD_DISTANCE): Likewise.
      	* config/sh/sh.c (sh_rtx_costs): Likewise.
      	* fold-const.c (fold_truth_andor): Likewise.
      	* genautomata.c (collapse_flag): Likewise.
      	* gengtype.h (struct type::u::s): Likewise.
      	* gensupport.c (has_subst_attribute, add_mnemonic_string): Likewise.
      	* input.c (FORMAT_AMOUNT): Likewise.
      	* ipa-cp.c (class ipcp_lattice, agg_replacements_to_vector)
      	(known_aggs_to_agg_replacement_list): Likewise.
      	* ipa-inline-analysis.c: Likewise.
      	* ipa-inline.h (estimate_edge_time, estimate_edge_hints): Likewise.
      	* ipa-polymorphic-call.c
      	(ipa_polymorphic_call_context::restrict_to_inner_class): Likewise.
      	* loop-unroll.c (analyze_insn_to_expand_var): Likewise.
      	* lra.c (lra_optional_reload_pseudos, lra_subreg_reload_pseudos):
      	Likewise.
      	* modulo-sched.c (apply_reg_moves): Likewise.
      	* omp-expand.c (build_omp_regions_1): Likewise.
      	* trans-mem.c (struct tm_wrapper_hasher): Likewise.
      	* tree-ssa-loop-ivopts.c (may_eliminate_iv): Likewise.
      	* tree-ssa-loop-niter.c (maybe_lower_iteration_bound): Likewise.
      	* tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise.
      	* value-prof.c: Likewise.
      	* var-tracking.c (val_reset): Likewise.
      
      gcc/ada:
      
      	* doc/gnat_ugn/gnat_and_program_execution.rst: Fix typo.
      	* g-socket.adb (To_Host_Entry): Fix typo in comment.
      	* gnat_ugn.texi: Fix typo.
      	* raise.c (_gnat_builtin_longjmp): Fix capitalization in comment.
      	* s-stposu.adb (Allocate_Any_Controlled): Fix typo in comment.
      	* sem_ch3.adb (Build_Derived_Record_Type): Likewise.
      	* sem_util.adb (Mark_Coextensions): Likewise.
      	* sem_util.ads (Available_Full_View_Of_Component): Likewise.
      
      gcc/c:
      
      	* c-array-notation.c: Fix typo in comment.
      
      gcc/c-family:
      
      	* c-warn.c (do_warn_double_promotion): Fix typo in comment.
      
      gcc/cp:
      
              * class.c (update_vtable_entry_for_fn): Fix typo in comment.
      	* decl2.c (one_static_initialization_or_destruction): Likewise.
      	* name-lookup.c (store_bindings): Likewise.
      	* parser.c (make_call_declarator): Likewise.
      	* pt.c (check_explicit_specialization): Likewise.
      
      gcc/testsuite:
      
      	* g++.old-deja/g++.benjamin/scope02.C: Fix typo in comment.
      	* gcc.dg/20031012-1.c: Likewise.
      	* gcc.dg/ipa/ipcp-1.c: Likewise.
      	* gcc.dg/torture/matrix-3.c: Likewise.
      	* gcc.target/powerpc/ppc-spe.c: Likewise.
      	* gcc.target/rx/zero-width-bitfield.c: Likewise.
      
      libcpp:
      
      	* include/line-map.h (LINEMAPS_MACRO_MAPS): Fix typo in comment.
      	* lex.c (search_line_fast): Likewise.
      	* pch.h (cpp_valid_state): Likewise.
      
      libdecnumber:
      
      	* decCommon.c (decFloatFromPackedChecked): Fix typo in comment.
      	* decNumber.c (decNumberPower, decMultiplyOp): Likewise.
      
      libgcc:
      
      	* config/c6x/pr-support.c (__gnu_unwind_execute): Fix typo in comment.
      
      libitm:
      
      	* libitm_i.h (sutrct gtm_thread): Fix typo in comment.
      
      From-SVN: r246664
      Jonathan Wakely committed
  28. 27 Mar, 2017 1 commit
  29. 10 Mar, 2017 3 commits
    • freebsd-unwind.h: New file. · 4ccfdb28
      2017-03-10  John Marino  <gnugcc@marino.st>
      
          * config/aarch64/freebsd-unwind.h: New file.
          * config.host: Add aarch64-*-freebsd unwinder.
      
      From-SVN: r246052
      John Marino committed
    • Build crt*vr.S with AltiVec enabled · 4144e4e3
      These files won't build on targets that do not have AltiVec enabled,
      breaking the build, unless we tell GAS that Altivec insns are fine.
      The alternative is to not build these files in that case, which is much
      more complicated.
      
      
      libgcc/
      	* config/rs6000/crtrestvr.s: Use .machine altivec.
      	* config/rs6000/crtsavevr.s: Ditto.
      
      From-SVN: r246051
      Segher Boessenkool committed
    • rs6000: float128 on BE and 32-bit · 7502c597
      This fixes float128 on BE and on 32-bit.
      
      The configure tests need to use -mabi=altivec for 32-bit, since it is
      not the default there.  That also enables the "vector" keyword, used by
      the tests.  To do this it temporarily adds a few flags to the CFLAGS
      variable.
      
      It also fixes a syntax error in the libgcc_cv_powerpc_float128_hw test
      (the function name was missing in the function declaration).
      
      Regenerating config.in (via autoreconf) removed the duplicate definition
      of HAVE_SOLARIS_CRTS.
      
      Finally, this adds a "-mfloat128-hardware requires -m64" test to
      rs6000.c: all the current patterns need 64-bit registers.  Maybe we'll
      want to add float128 hardware support to 32-bit some day, but certainly
      not today.
      
      
      	* config/rs6000/rs6000.c (rs6000_option_override_internal): Disallow
      	-mfloat128-hardware without -m64.
      
      libgcc/
      	* configure.ac (test for libgcc_cv_powerpc_float128): Temporarily
      	modify CFLAGS.  Add -mabi=altivec -mvsx -mfloat128.
      	(test for libgcc_cv_powerpc_float128_hw): Add -mpower9-vector and
      	-mfloat128-hardware to the CFLAGS.  Fix syntax error in the C snippet.
      	* configure: Regenerate.
      	* config.in: Regenerate.
      
      From-SVN: r246043
      Segher Boessenkool committed
  30. 02 Mar, 2017 2 commits
  31. 16 Feb, 2017 1 commit
  32. 06 Feb, 2017 1 commit
    • RISC-V Port: libgcc · 0bd99911
      libgcc/ChangeLog:
      
      2017-02-06  Palmer Dabbelt <palmer@dabbelt.com>
      
              * config.host: Add RISC-V tuples.
              * config/riscv/atomic.c: New file.
              * config/riscv/crti.S: Likewise.
              * config/riscv/crtn.S: Likewise.
              * config/riscv/div.S: Likewise.
              * config/riscv/linux-unwind.h: Likewise.
              * config/riscv/muldi3.S: Likewise.
              * config/riscv/multi3.S: Likewise.
              * config/riscv/save-restore.S: Likewise.
              * config/riscv/sfp-machine.h: Likewise.
              * config/riscv/t-elf: Likewise.
              * config/riscv/t-elf32: Likewise.
              * config/riscv/t-elf64: Likewise.
              * config/riscv/t-softfp32: Likewise.
              * config/riscv/t-softfp64: Likewise.
      
      From-SVN: r245226
      Palmer Dabbelt committed