Commit Graph

896 Commits

Author SHA1 Message Date
Richard Biener 6184085fc6 Update ChangeLog and version files for release
From-SVN: r257041
2018-01-25 08:17:27 +00:00
Max Filippov 08d2ba1b65 libgcc: xtensa: fix NaN return from add/sub/mul/div helpers
libgcc/
2018-01-23  Max Filippov  <jcmvbkbc@gmail.com>

	Backport from mainline
	2018-01-23  Max Filippov  <jcmvbkbc@gmail.com>

	* config/xtensa/ieee754-df.S (__addsf3, __subsf3, __mulsf3)
	(__divsf3): Make NaN return value quiet.
	* config/xtensa/ieee754-sf.S (__adddf3, __subdf3, __muldf3)
	(__divdf3): Make NaN return value quiet.

From-SVN: r257003
2018-01-23 21:47:51 +00:00
Sebastian Huber 2fc75a03b0 RTEMS/EPIPHANY: Add RTEMS support
gcc/
	* config.gcc (epiphany-*-elf*): Add (epiphany-*-rtems*) configuration.
	* config/epiphany/rtems.h: New file.

libgcc/
	* config.host (epiphany-*-elf*): Add (epiphany-*-rtems*)
	configuration.

From-SVN: r256342
2018-01-08 13:39:11 +00:00
Rainer Orth 4a7a8e11a3 Adapt Solaris 12 references
libgo:
	Backport from mainline

    With the change in the Solaris release model (no more major releases
    like Solaris 12 but only minor ones like 11.4), the Solaris 12
    references in GCC need to be adapted.

    Patch by Rainer Orth.

    Reviewed-on: https://go-review.googlesource.com/77490

	libgcc:
	Backport from mainline
	2017-11-14  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>

	* config.host (*-*-solaris2*): Adapt comment for Solaris 12
	renaming.
	* config/sol2/crtpg.c (__start_crt_compiler): Likewise.
	* configure.ac (libgcc_cv_solaris_crts): Likewise.
	* configure: Regenerate.

	gcc:
	Backport from mainline
	2017-11-14  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>

	* config.gcc (*-*-solaris2*): Enable default_use_cxa_atexit since
	Solaris 11.  Update comment.
	* configure.ac (gcc_cv_ld_pid): Adapt comment for Solaris 12
	renaming.
	* config/sol2.h (STARTFILE_SPEC): Likewise.
	* configure: Regenerate.

	gcc/testsuite:
	Backport from mainline
	2017-11-14  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>

	* lib/target-supports.exp (check_effective_target_pie): Adapt
	comment for Solaris 12 renaming.

	* gcc.dg/torture/pr60092.c: Remove *-*-solaris2.11* dg-xfail-run-if.

From-SVN: r254994
2017-11-21 09:31:12 +00:00
Vineet Gupta 2c8462947a [ARC] Backport ARC patch r250097.
From-SVN: r254864
2017-11-17 12:15:26 +01:00
Andreas Tobler 4561f563ec backport: re PR libgcc/82635 (std::thread's join broken on FreeBSD with all GCCs >= 5)
2017-11-05  Andreas Tobler  <andreast@gcc.gnu.org>

    Backport from mainline
    2017-11-04  Andreas Tobler  <andreast@gcc.gnu.org>

    PR libgcc/82635
    * config/i386/freebsd-unwind.h (MD_FALLBACK_FRAME_STATE_FOR): Use a
    sysctl to determine whether we're in a trampoline.
    Keep the pattern matching method for systems without
    KERN_PROC_SIGTRAMP sysctl.

From-SVN: r254431
2017-11-05 20:30:41 +01:00
Jakub Jelinek 7aaf7ebd9b re PR target/82274 (__builtin_mul_overflow fails to detect overflow for int64_t when compiled with -m32)
PR target/82274
	* internal-fn.c (expand_mul_overflow): If both operands have
	the same highpart of -1 or 0 and the topmost bit of lowpart
	is different, overflow is if res <= 0 rather than res < 0.

	* libgcc2.c (__mulvDI3): If both operands have
	the same highpart of -1 and the topmost bit of lowpart is 0,
	multiplication overflows even if both lowparts are 0.

	* gcc.dg/pr82274-1.c: New test.
	* gcc.dg/pr82274-2.c: New test.

From-SVN: r253735
2017-10-13 19:26:28 +02:00
Krister Walfridsson 98c9c18131 backport: re PR target/80600 (hidden symbol `__cpu_model' is referenced by DSO)
gcc/ChangeLog:

	Backport from mainline
	2017-05-14  Krister Walfridsson  <krister.walfridsson@gmail.com>

	PR target/80600
	* config/netbsd.h (NETBSD_LIBGCC_SPEC): Always add -lgcc.

libgcc/ChangeLog:

	Backport from mainline
	2017-05-14  Krister Walfridsson  <krister.walfridsson@gmail.com>

	PR target/80600
	* config.host (*-*-netbsd*): Add t-slibgcc-libgcc to tmake_file.

From-SVN: r253263
2017-09-28 19:17:51 +00:00
Richard Biener 586a0829dc Update ChangeLog and version files for release
From-SVN: r251081
2017-08-14 07:59:11 +00:00
Sebastian Huber 3df4b03a37 [PowerPC/RTEMS] Add 64-bit support using ELFv2 ABI
Add 64-bit support for RTEMS using the ELFv2 ABI with 64-bit long
double.

gcc/
	* config.gcc (powerpc-*-rtems*): Remove rs6000/eabi.h.  Add
	rs6000/biarch64.h.
	* config/rs6000/rtems.h (ASM_DECLARE_FUNCTION_SIZE): New macro.
	(ASM_OUTPUT_SPECIAL_POOL_ENTRY_P): Likewise.
	(CRT_CALL_STATIC_FUNCTION): Likewise.
	(ASM_DEFAULT_SPEC): New define.
	(ASM_SPEC32): Likewise.
	(ASM_SPEC64): Likewise.
	(ASM_SPEC_COMMON): Likewise.
	(ASM_SPEC): Likewise.
	(INVALID_64BIT): Likewise.
	(LINK_OS_DEFAULT_SPEC): Likewise.
	(LINK_OS_SPEC32): Likewise.
	(LINK_OS_SPEC64): Likewise.
	(POWERPC_LINUX): Likewise.
	(PTRDIFF_TYPE): Likewise.
	(RESTORE_FP_PREFIX): Likewise.
	(RESTORE_FP_SUFFIX): Likewise.
	(SAVE_FP_PREFIX): Likewise.
	(SAVE_FP_SUFFIX): Likewise.
	(SIZE_TYPE): Likewise.
	(SUBSUBTARGET_OVERRIDE_OPTIONS): Likewise.
	(TARGET_64BIT): Likewise.
	(TARGET_64BIT): Likewise.
	(TARGET_AIX): Likewise.
	(WCHAR_TYPE_SIZE): Likewise.
	(WCHAR_TYPE): Undefine.
	(TARGET_OS_CPP_BUILTINS): Add 64-bit PowerPC defines.
	(CPP_OS_DEFAULT_SPEC): Use previous CPP_OS_RTEMS_SPEC.
	(CPP_OS_RTEMS_SPEC): Delete.
	(SUBSUBTARGET_EXTRA_SPECS): Remove cpp_os_rtems.  Add
	asm_spec_common, asm_spec32, asm_spec64, link_os_spec32, and
	link_os_spec64.
	* config/rs6000/t-rtems: Add mcpu=e6500/m64 multilibs.

libgcc/
	* config/rs6000/ibm-ldouble.c: Disable if defined __rtems__.

From-SVN: r250654
2017-07-28 08:20:50 +00:00
Peter Bergner e1a9ef3f5c backport: float128-ifunc.c: Don't include auxv.h.
libgcc/
	Backport from mainline
	2017-07-07  Peter Bergner  <bergner@vnet.ibm.com>

	* config/rs6000/float128-ifunc.c: Don't include auxv.h.
	(have_ieee_hw_p): Delete function.
	(SW_OR_HW) Use __builtin_cpu_supports().

From-SVN: r250391
2017-07-20 09:31:57 -05:00
John Marino fd8e5aa174 Fix Unwind support on DragonFly BSD after sigtramp move
2017-07-19  John Marino  <gnugcc@marino.st>

	* config/i386/dragonfly-unwind.h: Handle sigtramp relocation.

From-SVN: r250356
2017-07-19 16:57:48 +01:00
Joseph Myers 1a8be74612 Use ucontext_t not struct ucontext in linux-unwind.h files.
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: r249956
2017-07-04 11:22:56 +01:00
Richard Biener 075a5f6aaf backport: [multiple changes]
2017-06-28  Richard Biener  <rguenther@suse.de>

	Backport from mainline
	2017-06-09  Richard Biener  <rguenther@suse.de>

	PR middle-end/81007
	* ipa-polymorphic-call.c
	(ipa_polymorphic_call_context::restrict_to_inner_class):
	Skip FIELD_DECLs with error_mark_node type.
	* passes.def (all_lowering_passes): Run pass_build_cgraph_edges
	last again.

	* g++.dg/pr81007.C: New testcase.

	2017-06-14  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/81083
	* tree-ssa-sccvn.c (vn_reference_lookup_3): Do not use abnormals
	as values.

	* gcc.dg/torture/pr81083.c: New testcase.

	2017-06-21  Richard Biener  <rguenther@suse.de>

	PR gcov-profile/81080
	* configure.ac: Add AC_SYS_LARGEFILE.
	* libgcov.h: Include auto-target.h before tsystem.h to pick
	up _FILE_OFFSET_BITS which might differ for multilibs.
	* config.in: Regenerate.
	* configure: Likewise.

From-SVN: r249738
2017-06-28 13:25:33 +00:00
Richard Henderson b7a489b025 re PR libgcc/80037 (Bad .eh_frame data in crtend.o)
PR libgcc/80037

 Backport from mainline
 * config/alpha/t-alpha (CRTSTUFF_T_CFLAGS): New.

From-SVN: r248525
2017-05-26 12:29:46 -07:00
Andreas Tobler f132a47f39 backport: unwind-arm.h: Make _Unwind_GetIP...
2017-05-19  Andreas Tobler  <andreast@gcc.gnu.org>

    Backport from mainline
    2017-05-17  Andreas Tobler  <andreast@gcc.gnu.org>

    * config/arm/unwind-arm.h: Make _Unwind_GetIP, _Unwind_GetIPInfo and
    _Unwind_SetIP available as functions for arm*-*-freebsd*.
    * config/arm/unwind-arm.c: Implement the above.

From-SVN: r248299
2017-05-19 20:38:22 +02:00
Adhemerval Zanella 16fbcc168c lb1spc.S: Emit .note.GNU-stack section for a non-executable stack.
* config/sparc/lb1spc.S [__ELF__ && __linux__]: Emit .note.GNU-stack
	section for a non-executable stack.

From-SVN: r248044
2017-05-15 07:36:33 +00:00
Andreas Tobler bd94ba42e8 backport: config.host: Use the generic FreeBSD t-slibgcc-elf-ver for arm*-*-freebsd* instead of the...
2017-05-10  Andreas Tobler  <andreast@gcc.gnu.org>

    Backport from mainline
    2017-05-09  Andreas Tobler  <andreast@gcc.gnu.org>

    * config.host: Use the generic FreeBSD t-slibgcc-elf-ver for
    arm*-*-freebsd* instead of the t-slibgcc-libgcc.

From-SVN: r247859
2017-05-10 22:42:58 +02:00
GCC Administrator 303f81ad7e Update ChangeLog and version files for release
From-SVN: r247493
2017-05-02 12:42:24 +00:00
Martin Liska 46928a8fda Introduce gcov.h header file (PR gcov-profile/80435).
2017-04-19  Martin Liska  <mliska@suse.cz>

	PR gcov-profile/80435
	* Makefile.in: Install gcov.h.
	* gcov.h: New file.
	* libgcov.h: Use the header and make __gcov_flush publicly
	visible.

From-SVN: r246990
2017-04-19 08:08:44 +00:00
Martin Liska 6397118495 Validate that destination gcov file does not exist for gcov-tool (PR gcov-profile/78783).
2017-04-18  Martin Liska  <mliska@suse.cz>

	PR gcov-profile/78783
	* libgcov-driver.c (gcov_get_filename): New function.
2017-04-18  Martin Liska  <mliska@suse.cz>

	PR gcov-profile/78783
	* gcov-tool.c (gcov_output_files): Validate that destination
	file is either removed by the tool or by a user.

From-SVN: r246961
2017-04-18 07:24:20 +00:00
Jeff Law 29d8aae6bd Makefile.in: Swap definition of LIBGCC_LINKS and inclusion of target makefile fragment.
* Makefile.in: Swap definition of LIBGCC_LINKS and inclusion of
	target makefile fragment.
	* config/sh/t-sh (unwind-dw2-Os-4-200.o): Depend on LIBGCC_LINKS.

From-SVN: r246766
2017-04-07 10:11:57 -06:00
Alan Modra 2bdf7fc6e6 [RS6000] Out-of-line register save functions can't be used from crtend.o
PR target/45053
	* config/rs6000/t-crtstuff (CRTSTUFF_T_CFLAGS): Add -O2.

From-SVN: r246749
2017-04-07 11:00:43 +09:30
Jonathan Wakely 5764ee3c84 Fix numerous typos in comments
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
2017-04-03 23:30:56 +01:00
Claudiu Zissulescu c4192ad702 [ARC] Fix divdf3 emulation for arcem.
libgcc/
2017-02-27  Claudiu Zissulescu  <claziss@synopsys.com>

	* config/arc/ieee-754/divdf3.S (__divdf3): Use __ARCEM__.

From-SVN: r246498
2017-03-27 12:56:35 +02:00
John Marino 4ccfdb287e freebsd-unwind.h: New file.
2017-03-10  John Marino  <gnugcc@marino.st>

    * config/aarch64/freebsd-unwind.h: New file.
    * config.host: Add aarch64-*-freebsd unwinder.

From-SVN: r246052
2017-03-10 20:33:27 +01:00
Segher Boessenkool 4144e4e301 Build crt*vr.S with AltiVec enabled
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
2017-03-10 20:29:48 +01:00
Segher Boessenkool 7502c5970d rs6000: float128 on BE and 32-bit
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
2017-03-10 18:57:58 +01:00
Jonathan Yong db9f7f657e gthr-win32.h: Define NOGDI before windows.h include to prevent w32api CC_NONE macro clash...
* config/i386/gthr-win32.h: Define NOGDI before
        windows.h include to prevent w32api CC_NONE macro
        clash with libgfortran.

From-SVN: r245835
2017-03-02 11:03:23 +00:00
Jonathan Yong 126437c5da unwind-seh.c: Suppress warnings for RtlUnwindEx calls.
* unwind-seh.c: Suppress warnings for RtlUnwindEx calls.

From-SVN: r245834
2017-03-02 11:00:28 +00:00
Andrew Pinski 31927af6c7 value-unwind.h: New file.
* config/aarch64/value-unwind.h: New file.
	* config.host (aarch64*-*-*): Add aarch64/value-unwind.h
	to tm_file.

From-SVN: r245508
2017-02-16 16:27:42 +00:00
Palmer Dabbelt 0bd99911ee RISC-V Port: libgcc
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
2017-02-06 21:38:51 +00:00
Jakub Jelinek a8c9ef2a39 op-common.h (_FP_MUL, [...]): Add /* FALLTHRU */ comments.
* soft-fp/op-common.h (_FP_MUL, _FP_FMA, _FP_DIV): Add
	/* FALLTHRU */ comments.

From-SVN: r244884
2017-01-24 23:32:30 +01:00
Gerald Pfeifer c6c82710ed * config/i386/cygming-crtbegin.c (LIBGCJ_SONAME): No longer #define.
From-SVN: r244743
2017-01-21 08:52:32 +00:00
Jiong Wang a876231c40 [AArch64] Only build & test pauth code for LP64
gcc/
	* config/aarch64/aarch64-builtins.c (aarch64_init_builtins): Register
	register pauth builtins for LP64 only.

libgcc/
	* config/aarch64/aarch64-unwind.h: Empty this file on ILP32.
	* unwind-dw2.c (execute_cfa_program):  Only multiplexing
	DW_CFA_GNU_window_save for AArch64 and LP64.

gcc/testsuite/
	* testsuite/gcc.target/aarch64/return_address_sign_1.c: Enable on LP64
	only.
	* testsuite/gcc.target/aarch64/return_address_sign_2.c: Likewise.
	* testsuite/gcc.target/aarch64/return_address_sign_3.c: Likewise.

From-SVN: r244732
2017-01-20 21:03:41 +00:00
Jiong Wang aa348be2b0 [AArch64] Always include linux-unwind.h
libgcc/
        * config/aarch64/linux-unwind.h: Always include aarch64-unwind.h.

From-SVN: r244710
2017-01-20 12:27:46 +00:00
Jiong Wang 5636faf2bc [AArch64][4/4] libgcc unwinder support for return address signing
libgcc/
	* config/aarch64/aarch64-unwind.h: New file.
	(DWARF_REGNUM_AARCH64_RA_STATE): Define.
	(MD_POST_EXTRACT_ROOT_ADDR): New target marcro and define it on AArch64.
	(MD_POST_EXTRACT_FRAME_ADDR): Likewise.
	(MD_POST_FROB_EH_HANDLER_ADDR): Likewise.
	(MD_FROB_UPDATE_CONTEXT): Define it on AArch64.
	(aarch64_post_extract_frame_addr): New function.
	(aarch64_post_frob_eh_handler_addr): New function.
	(aarch64_frob_update_context): New function.
	* config/aarch64/linux-unwind.h: Include aarch64-unwind.h
	* config.host (aarch64*-*-elf, aarch64*-*-rtems*,
	aarch64*-*-freebsd*):
	Initialize md_unwind_header to include aarch64-unwind.h.
	* unwind-dw2.c (struct _Unwind_Context): Define "RA_A_SIGNED_BIT".
	(execute_cfa_program): Multiplex DW_CFA_GNU_window_save for
	__aarch64__.
	(uw_update_context): Honor MD_POST_EXTRACT_FRAME_ADDR.
	(uw_init_context_1): Honor MD_POST_EXTRACT_ROOT_ADDR.
	(uw_frob_return_addr): New function.
	(uw_install_context): Use uw_frob_return_addr.

From-SVN: r244673
2017-01-20 00:19:01 +00:00
Jakub Jelinek 3c36aa6ba2 re PR other/79046 (g++ -print-file-name=plugin uses full version number in path)
PR other/79046
	* configure: Regenerated.
config/
	* acx.m4 (GCC_BASE_VER): New m4 function.
	(ACX_TOOL_DIRS): Require GCC_BASE_VER, for
	--with-gcc-major-version-only use just major number from BASE-VER.
gcc/
	* configure.ac: Add GCC_BASE_VER.
	* Makefile.in (version): Use @get_gcc_base_ver@ instead of cat to get
	version from BASE-VER file.
	(CFLAGS-gcc.o): Add -DBASEVER=$(BASEVER_s).
	(gcc.o): Depend on $(BASEVER).
	* common.opt (dumpfullversion): New option.
	* gcc.c (driver_handle_option): Handle OPT_dumpfullversion.
	* doc/invoke.texi: Document -dumpfullversion.
	* doc/install.texi: Document --with-gcc-major-version-only.
	* configure: Regenerated.
libatomic/
	* configure.ac: Add GCC_BASE_VER.
	* Makefile.am (gcc_version): Use @get_gcc_base_ver@ instead of cat to
	get version from BASE-VER file.
	* testsuite/Makefile.in: Regenerated.
	* configure: Regenerated.
	* Makefile.in: Regenerated.
libgomp/
	* configure.ac: Add GCC_BASE_VER.
	* Makefile.am (gcc_version): Use @get_gcc_base_ver@ instead of cat to
	get version from BASE-VER file.
	* testsuite/Makefile.in: Regenerated.
	* configure: Regenerated.
	* Makefile.in: Regenerated.
libgcc/
	* configure.ac: Add GCC_BASE_VER.
	* Makefile.in (version): Use @get_gcc_base_ver@ instead of cat to get
	version from BASE-VER file.
	* configure: Regenerated.
libssp/
	* configure.ac: Add GCC_BASE_VER.
	* Makefile.am (gcc_version): Use @get_gcc_base_ver@ instead of cat to
	get version from BASE-VER file.
	* configure: Regenerated.
	* Makefile.in: Regenerated.
liboffloadmic/
	* configure.ac: Add GCC_BASE_VER.
	* Makefile.am (gcc_version): Use @get_gcc_base_ver@ instead of cat to
	get version from BASE-VER file.
	* aclocal.m4: Include ../config/acx.m4.
	* configure: Regenerated.
	* Makefile.in: Regenerated.
libquadmath/
	* configure.ac: Add GCC_BASE_VER.
	* Makefile.am (gcc_version): Use @get_gcc_base_ver@ instead of cat to
	get version from BASE-VER file.
	* configure: Regenerated.
	* Makefile.in: Regenerated.
libmpx/
	* configure.ac: Add GCC_BASE_VER.
	* Makefile.am (gcc_version): Use @get_gcc_base_ver@ instead of cat to
	get version from BASE-VER file.
	* configure: Regenerated.
	* Makefile.in: Regenerated.
libada/
	* configure.ac: Add GCC_BASE_VER.
	* Makefile.in (version): Use @get_gcc_base_ver@ instead of cat to get
	version from BASE-VER file.
	* configure: Regenerated.
lto-plugin/
	* configure.ac: Add GCC_BASE_VER.
	* Makefile.am (gcc_version): Use @get_gcc_base_ver@ instead of cat to
	get version from BASE-VER file.
	* configure: Regenerated.
	* Makefile.in: Regenerated.
libitm/
	* configure.ac: Add GCC_BASE_VER.
	* Makefile.am (gcc_version): Use @get_gcc_base_ver@ instead of cat to
	get version from BASE-VER file.
	* testsuite/Makefile.in: Regenerated.
	* configure: Regenerated.
	* Makefile.in: Regenerated.
fixincludes/
	* configure.ac: Add GCC_BASE_VER.
	* Makefile.in (gcc_version): Use @get_gcc_base_ver@ instead of cat to
	get version from BASE-VER file.
	* configure: Regenerated.
libcilkrts/
	* configure.ac: Add GCC_BASE_VER.
	* Makefile.am (gcc_version): Use @get_gcc_base_ver@ instead of cat to
	get version from BASE-VER file.
	* aclocal.m4: Include ../config/acx.m4.
	* configure: Regenerated.
	* Makefile.in: Regenerated.
libcc1/
	* configure.ac: Add GCC_BASE_VER.  For --with-gcc-major-version-only
	use just major number from BASE-VER.
	* configure: Regenerated.
	* Makefile.in: Regenerated.
libobjc/
	* configure.ac: Add GCC_BASE_VER.
	* Makefile.in (gcc_version): Use @get_gcc_base_ver@ instead of cat to
	get version from BASE-VER file.
	* configure: Regenerated.
libstdc++-v3/
	* configure.ac: Add GCC_BASE_VER.
	* fragment.am (gcc_version): Use @get_gcc_base_ver@ instead of cat to
	get version from BASE-VER file.
	* po/Makefile.in: Regenerated.
	* libsupc++/Makefile.in: Regenerated.
	* testsuite/Makefile.in: Regenerated.
	* src/Makefile.in: Regenerated.
	* configure: Regenerated.
	* Makefile.in: Regenerated.
	* include/Makefile.in: Regenerated.
	* doc/Makefile.in: Regenerated.
	* python/Makefile.in: Regenerated.
	* src/c++11/Makefile.in: Regenerated.
	* src/c++98/Makefile.in: Regenerated.
	* src/filesystem/Makefile.in: Regenerated.
libvtv/
	* configure.ac: Add GCC_BASE_VER.
	* Makefile.am (gcc_version): Use @get_gcc_base_ver@ instead of cat to
	get version from BASE-VER file.
	* testsuite/Makefile.in: Regenerated.
	* configure: Regenerated.
	* Makefile.in: Regenerated.
libsanitizer/
	* configure.ac: Add GCC_BASE_VER.
	* Makefile.am (gcc_version): Use @get_gcc_base_ver@ instead of cat to
	get version from BASE-VER file.
	* libbacktrace/Makefile.in: Regenerated.
	* interception/Makefile.in: Regenerated.
	* asan/Makefile.in: Regenerated.
	* ubsan/Makefile.in: Regenerated.
	* configure: Regenerated.
	* sanitizer_common/Makefile.in: Regenerated.
	* lsan/Makefile.in: Regenerated.
	* Makefile.in: Regenerated.
	* tsan/Makefile.in: Regenerated.
libgfortran/
	* configure.ac: Add GCC_BASE_VER.
	* Makefile.am (gcc_version): Use @get_gcc_base_ver@ instead of cat to
	get version from BASE-VER file.
	* configure: Regenerated.
	* Makefile.in: Regenerated.

From-SVN: r244521
2017-01-17 10:38:48 +01:00
Joe Seymour 829afb8f05 t-msp430 (libmul_none.a, [...]): Filter archived prerequisites.
2017-01-13  Joe Seymour  <joe.s@somniumtech.com>
* config/msp430/t-msp430 (libmul_none.a, libmul_16.a, libmul_32.a,
libmul_f5.a): Filter archived prerequisites.

From-SVN: r244455
2017-01-13 17:18:07 -05:00
Andrew Senkevich 79fc8ffe6c Enable AVX-512 VPOPCNTD/VPOPCNTQ instructions.
gcc/
	* common/config/i386/i386-common.c (OPTION_MASK_ISA_AVX512VPOPCNTDQ_SET,
	OPTION_MASK_ISA_AVX512VPOPCNTDQ_UNSET): New.
	* config.gcc: Add avx512vpopcntdqintrin.h.
	* config/i386/avx512vpopcntdqintrin.h: New.
	* config/i386/cpuid.h (bit_AVX512VPOPCNTDQ): New.
	* config/i386/i386-builtin-types.def: Add new types.
	* config/i386/i386-builtin.def (__builtin_ia32_vpopcountd_v16si,
	__builtin_ia32_vpopcountd_v16si_mask, __builtin_ia32_vpopcountq_v8di,
	__builtin_ia32_vpopcountq_v8di_mask): New.
	* config/i386/i386-c.c (ix86_target_macros_internal): Define
	__AVX512VPOPCNTDQ__.
	* config/i386/i386.c (ix86_target_string): Add -mavx512vpopcntdq.
	(PTA_AVX512VPOPCNTDQ): Define.
	* config/i386/i386.h (TARGET_AVX512VPOPCNTDQ,
	TARGET_AVX512VPOPCNTDQ_P): Define.
	* config/i386/i386.opt: Add mavx512vpopcntdq.
	* config/i386/immintrin.h: Include avx512vpopcntdqintrin.h.
	* config/i386/sse.md (define_insn "vpopcount<mode><mask_name>"): New.

libgcc/
	* config/i386/cpuinfo.h (processor_features): Add
	FEATURE_AVX512VPOPCNTDQ.
	* config/i386/cpuinfo.c (get_available_features): Habdle new
	feature.

gcc/testsuite/
	* g++.dg/other/i386-2.C: Add -mavx512vpopcntdq.
	* g++.dg/other/i386-3.C: Ditto.
	* gcc.target/i386/sse-12.c: Ditto.
	* gcc.target/i386/sse-13.c: Ditto.
	* gcc.target/i386/sse-22.c: Ditto.
	* gcc.target/i386/sse-23.c: Ditto.
	* gcc.target/i386/builtin_target.c: Handle new option.
	* gcc.target/i386/funcspec-56.inc: Test new attributes.
	* gcc.target/i386/avx512vpopcntdq-vpopcntd.c: New test.
	* gcc.target/i386/avx512vpopcntdq-vpopcntq.c: Ditto.

From-SVN: r244263
2017-01-10 12:55:41 +00:00
Joseph Myers fec5f4e041 Make MIPS soft-fp preserve NaN payloads for NAN2008.
The MIPS sfp-machine.h has an _FP_CHOOSENAN implementation which
emulates hardware semantics of not preserving signaling NaN payloads
for an operation with two NaN arguments (although that doesn't suffice
to avoid sNaN payload preservation in any case with just one NaN
argument).

However, those are only hardware semantics in the legacy NaN case; in
the NAN2008 case, the architecture documentation says hardware
preserves payloads in such cases.  Furthermore, this implementation
assumes legacy NaN semantics, so in the NAN2008 case the
implementation actually has the effect of preserving sNaN payloads but
not preserving qNaN payloads, when both should be preserved.

This patch fixes the code just to copy from the first argument (at the
level of libgcc, it's not meaningful which argument is the first and
which is the second).

Tested for mips64-linux-gnu (soft float, NAN2008) with the glibc math/
tests.

	* config/mips/sfp-machine.h (_FP_CHOOSENAN): Always preserve NaN
	payload if [__mips_nan2008].

From-SVN: r244059
2017-01-04 17:06:33 +00:00
Alan Modra 8f56cb5163 Update configure deps, remove stray \xA0 in picflag.m4, regenerate
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
2017-01-04 18:59:34 +10:30
Jakub Jelinek cbe34bb5ed Update copyright years.
From-SVN: r243994
2017-01-01 13:07:43 +01:00
Krister Walfridsson ab955692fe config.host (*-*-netbsd*): Add t-eh-dw2-dip to tmake_file.
2016-12-19  Krister Walfridsson  <krister.walfridsson@gmail.com>

	* config.host (*-*-netbsd*): Add t-eh-dw2-dip to tmake_file.
	* crtstuff.c (BSD_DL_ITERATE_PHDR_AVAILABLE): Define for NetBSD.
	* unwind-dw2-fde-dip.c (USE_PT_GNU_EH_FRAME, ElfW): Likewise.

From-SVN: r243790
2016-12-19 09:21:09 +00:00
Matthias Klose de34320fba gmon: Remove empty directory.
2016-12-17  Matthias Klose  <doko@ubuntu.com>

        * config/arc/gmon: Remove empty directory.

From-SVN: r243775
2016-12-17 12:42:03 +00:00
Claudiu Zissulescu e04ea1daa9 [ARC] Rework code for profiling.
gcc/
2016-12-16  Claudiu Zissulescu  <claziss@synopsys.com>

	* config/arc/arc.h (LINK_SPEC): Tidy up.
	(ENDFILE_SPEC): Likewise.
	(LIB_SPEC): Likewise.
	(STARTFILE_SPEC): Include gcrt0 when profiling.
	(FUNCTION_PROFILER): Use __mcount.
	* config/arc/arc.opt (mucb-mcount): Remove.
	* doc/invoke.texi (ARC): Remove mucb-mcount doc.
	* arc/arc-protos.h (arc_profile_call): Remove.
	* config/arc/arc.c (write_profile_sections): Likewise.
	(arc_profile_call): Likewise.
	(unspec_prof_hash): Likewise.
	(unspec_prof_htab_eq): Likewise.
	(arc_legitimate_constant_p): Remove UNSPEC_PROF.
	(arc_reorg): Remove call to write_profile_sections.
	* config/arc/arc.md (call): Remove call to arc_profile_call.
	(call_value): Likewise.
	(sibcall): Likewise.
	(sibcall_value): Likewise.
	(define_constants): Remove UNSPEC_PROF.

libgcc/
	* config.host (arc*-*-linux-uclibc*): Remove libgmon, crtg, and
	crtgend.
	(arc*-*-elf*): Likewise.
	* config/arc/t-arc: Remove old gmon lib targets.
	* config/arc/crtg.S: Remove.
	* config/arc/crtgend.S: Likewise.
	* config/arc/gmon/atomic.h: Likewise.
	* config/arc/gmon/auxreg.h: Likewise.
	* config/arc/gmon/dcache_linesz.S: Likewise.
	* config/arc/gmon/gmon.c: Likewise.
	* config/arc/gmon/machine-gmon.h: Likewise.
	* config/arc/gmon/mcount.c: Likewise.
	* config/arc/gmon/prof-freq-stub.S: Likewise.
	* config/arc/gmon/prof-freq.c: Likewise.
	* config/arc/gmon/profil.S: Likewise.
	* config/arc/gmon/sys/gmon.h: Likewise.
	* config/arc/gmon/sys/gmon_out.h: Likewise.
	* config/arc/t-arc-newlib: Likewise.
	* config/arc/t-arc700-uClibc: Renamed to t-arc-uClibc.

From-SVN: r243742
2016-12-16 13:56:21 +01:00
George Spelvin 8ae1c2c129 lib1funcs.S (__ashrdi3): Fix typo from r243545.
libgcc/
	* config/avr/lib1funcs.S (__ashrdi3): Fix typo from r243545.

From-SVN: r243546
2016-12-12 11:57:33 +00:00
George Spelvin a5b947fa66 lib1funcs.S (__ashldi3): Use __tmp_reg__ to restore R16 instead of push + pop.
libgcc/
	2016-12-12  George Spelvin  <linux@sciencehorizons.net>
	* config/avr/lib1funcs.S (__ashldi3): Use __tmp_reg__ to restore
	R16 instead of push + pop.
	(__ashrdi3, __lshrdi3): Same. And use __zero_reg__ for signs.

From-SVN: r243545
2016-12-12 11:25:51 +00:00
Krister Walfridsson d6574dd103 config.host (i[34567]86-*-netbsdelf*): Add i386/t-crtstuff to tmake_file.
2016-12-10  Krister Walfridsson  <krister.walfridsson@gmail.com>

	* config.host (i[34567]86-*-netbsdelf*): Add i386/t-crtstuff to
	tmake_file.

From-SVN: r243518
2016-12-10 20:59:52 +00:00
Cupertino Miranda 62440b4f0e [ARC] Fix PIE.
gcc/
2016-12-05  Cupertino Miranda  <cmiranda@synopsys.com>

	* config/arc/arc.h (STARTFILE_SPEC): Use default linux specs.
	(ENDFILE_SPEC): Likewise.

libgcc/
2016-12-05  Cupertino Miranda  <cmiranda@synopsys.com>

	* config.host (arc*-*-linux-uclibc*): Use default extra
	objects. Include linux-android header.
	* config/arc/crti.S (_init): Declare symbol as function.
	(_fini): Likewise.

From-SVN: r243245
2016-12-05 12:16:52 +01:00