aboutsummaryrefslogtreecommitdiff
path: root/libgcc
AgeCommit message (Collapse)AuthorFilesLines
2017-09-26Enable no-exec stacks for more targets using the Linux kernel.Joseph Myers12-0/+76
Building glibc for many different configurations and running the compilation parts of the testsuite runs into failures of the elf/check-execstack test for hppa and microblaze. Those configurations default to executable stacks in the Linux kernel because of VM_DATA_DEFAULT_FLAGS definitions including VM_EXEC (VM_DATA_DEFAULT_FLAGS being the default definition of VM_STACK_DEFAULT_FLAGS). This fails because those configurations are not generating .note.GNU-stack sections to indicate that programs do not need an executable stack. This patch fixes GCC to generate those sections on those architectures (when configured for a target using the Linux kernel), as it does on other architectures, together with adding that section to libgcc .S sources, with the same code as used on other architectures (or a variant using "#ifdef __linux__" instead of the usual "#if defined(__ELF__) && defined(__linux__)" for microblaze, as that configuration doesn't use elfos.h and so doesn't define __ELF__). This suffices to eliminate that glibc test failure. (For hppa, the compilation parts of the glibc testsuite still fail because of the separate elf/check-textrel failure.) gcc: * config/microblaze/linux.h (TARGET_ASM_FILE_END): Likewise. * config/pa/pa.h (NEED_INDICATE_EXEC_STACK): Likewise. * config/pa/pa-linux.h (NEED_INDICATE_EXEC_STACK): Likewise. * config/pa/pa.c (pa_hpux_file_end): Rename to pa_file_end. Define unconditionally, with [ASM_OUTPUT_EXTERNAL_REAL] conditionals inside the function instead of around it. Call file_end_indicate_exec_stack if NEED_INDICATE_EXEC_STACK. (TARGET_ASM_FILE_END): Define unconditionally to pa_file_end. libgcc: * config/microblaze/crti.S, config/microblaze/crtn.S, config/microblaze/divsi3.S, config/microblaze/moddi3.S, config/microblaze/modsi3.S, config/microblaze/muldi3_hard.S, config/microblaze/mulsi3.S, config/microblaze/stack_overflow_exit.S, config/microblaze/udivsi3.S, config/microblaze/umodsi3.S, config/pa/milli64.S: Add .note.GNU-stack section. From-SVN: r253204
2017-09-23PR target/82196 addendum: Fix Darwin build breakage and test FAILS on SolarisDaniel Santos5-8/+105
gcc/testsuite: * gcc.target/i386/pr82196-1.c: (b): Remove volatile asm. * gcc.target/i386/pr82196-2.c: (b): Likewise. libgcc: * configure.ac: Add Check for HAVE_AS_AVX. * config.in: Regenerate. * configure: Likewise. * config/i386/i386-asm.h: Include auto-target.h from libgcc. (SSE_SAVE, SSE_RESTORE): Emit .byte sequence for !HAVE_AS_AVX. Correct out-of-date comments. From-SVN: r253116
2017-09-20config.gcc: Support "knm".Sebastian Peryt3-20/+30
gcc/ * config.gcc: Support "knm". * config/i386/driver-i386.c (host_detect_local_cpu): Detect "knm". * config/i386/i386-c.c (ix86_target_macros_internal): Handle PROCESSOR_KNM. * config/i386/i386.c (m_KNM): Define. (processor_target_table): Add "knm". (PTA_KNM): Define. (ix86_option_override_internal): Add "knm". (ix86_issue_rate): Add PROCESSOR_KNM. (ix86_adjust_cost): Ditto. (ia32_multipass_dfa_lookahead): Ditto. (get_builtin_code_for_version): Handle PROCESSOR_KNM. (fold_builtin_cpu): Add M_INTEL_KNM. * config/i386/i386.h (processor_costs): Define TARGET_KNM. (processor_type): Add PROCESSOR_KNM. * config/i386/x86-tune.def: Add m_KNM. * doc/invoke.texi: Add knm as x86 -march=/-mtune= CPU type. libgcc/ * config/i386/cpuinfo.h (processor_types): Add INTEL_KNM. * config/i386/cpuinfo.c (get_intel_cpu): Detect Knights Mill. gcc/testsuite/ * gcc.target/i386/builtin_target.c: Test knm. * gcc.target/i386/funcspec-56.inc: Test arch=knm. From-SVN: r253013
2017-09-17PR target/82196 correct choice of avx/sse stubs for -mcall-ms2sysv-xloguesDaniel Santos21-96/+164
gcc: config/i386/i386.c: (xlogue_layout::STUB_NAME_MAX_LEN): Increase to 20 bytes. (xlogue_layout::s_stub_names): Add an additional size-2 diminsion. (xlogue_layout::get_stub_name): Modify to select the appropairate sse or avx version of the stub. gcc/testsuite: gcc.target/i386/pr82196-1.c: New test. gcc.target/i386/pr82196-2.c: Likewise. libgcc: config/i386/i386-asm.h (PASTE2): New macro. (ASMNAME): Modify to use PASTE2. (MS2SYSV_STUB_PREFIX): New macro for isa prefix. (MS2SYSV_STUB_BEGIN, MS2SYSV_STUB_END): New macros for stub headers. config/i386/resms64.S: Rename to a header file, use MS2SYSV_STUB_BEGIN instead of HIDDEN_FUNC and MS2SYSV_STUB_END instead of FUNC_END. config/i386/resms64f.S: Likewise. config/i386/resms64fx.S: Likewise. config/i386/resms64x.S: Likewise. config/i386/savms64.S: Likewise. config/i386/savms64f.S: Likewise. config/i386/avx_resms64.S: New file that only defines a macro and includes it's corresponding header file. config/i386/avx_resms64f.S: Likewise. config/i386/avx_resms64fx.S: Likewise. config/i386/avx_resms64x.S: Likewise. config/i386/avx_savms64.S: Likewise. config/i386/avx_savms64f.S: Likewise. config/i386/sse_resms64.S: Likewise. config/i386/sse_resms64f.S: Likewise. config/i386/sse_resms64fx.S: Likewise. config/i386/sse_resms64x.S: Likewise. config/i386/sse_savms64.S: Likewise. config/i386/sse_savms64f.S: Likewise. config/i386/t-msabi: Modified to add avx and sse versions of stubs. From-SVN: r252896
2017-09-01config.host (*-*-vxworks7): Widen scope to vxworks7*.Olivier Hainque2-1/+5
2017-09-01 Olivier Hainque <hainque@adacore.com> libgcc/ * config.host (*-*-vxworks7): Widen scope to vxworks7*. From-SVN: r251594
2017-08-31config.gcc (powerpc-wrs-vxworks|vxworksae|vxworksmils): Now match as ↵Olivier Hainque2-1/+6
powerpc-wrs-vxworks*. 2017-08-31 Olivier Hainque <hainque@adacore.com> gcc/ * config.gcc (powerpc-wrs-vxworks|vxworksae|vxworksmils): Now match as powerpc-wrs-vxworks*. libgcc/ * config.host: Likewise. From-SVN: r251573
2017-08-07Share mingw fset-stack-executable with cygwinJonathan Yong2-0/+8
This patch is in use by Cygwin for years, upstream to GCC. * gcc/config/i386/mingw.opt (fset-stack-executable): Removed. * gcc/config/i386/cygming.opt (fset-stack-executable): Moved from mingw.opt. * gcc/config/i386/cygwin.h: Define CHECK_EXECUTE_STACK_ENABLED. * ligcc/config.host (*-cygwin): Include file from mingw config/i386/enable-execute-stack-mingw32.c From-SVN: r250914
2017-08-01config.gcc (arm-wrs-vxworks*): Rework to handle arm-wrs-vxworks7 as well as ↵Jerome Lambourg4-1/+55
arm-wrs-vxworks. 2017-08-01 Jerome Lambourg <lambourg@adacore.com> Doug Rupp <rupp@adacore.com> Olivier Hainque <hainque@adacore.com> gcc/ * config.gcc (arm-wrs-vxworks*): Rework to handle arm-wrs-vxworks7 as well as arm-wrs-vxworks. Update target_cpu_name from arm6 (arch v3) to arm8 (arch v4). * config/arm/vxworks.h (MAYBE_TARGET_BPABI_CPP_BUILTINS): New, helper for TARGET_OS_CPP_BUILTIN. (TARGET_OS_CPP_BUILTIN): Invoke MAYBE_TARGET_BPABI_CPP_BUILTINS(), refine CPU definitions for arm_arch5 and add those for arm_arch6 and arm_arch7. (MAYBE_ASM_ABI_SPEC): New, helper for SUBTARGET_EXTRA_ASM_SPEC, passing required abi options to the assembler for EABI configurations. (EXTRA_CC1_SPEC): New macro, to help prevent the implicit production of .text.hot and .text.unlikely sections for kernel modules when using ARM style exceptions. (CC1_SPEC): Remove obsolete attempt at mimicking Diab toolchain options. Add EXTRA_CC1_SPEC. (VXWORKS_ENDIAN_SPEC): Adjust comment and remove handling of Diab toolchain options. (DWARF2_UNWIND_INFO): Redefine to handle the pre/post VxWorks 7 transition. (ARM_TARGET2_DWARF_FORMAT): Define. * config/arm/t-vxworks: Adjust multilib control to removal of the Diab command line options. libgcc/ * config.host (arm-wrs-vxworks*): Rework to handle arm-wrs-vxworks7 as well as arm-wrs-vxworks. * config/arm/t-vxworks7: New file. Add unwind-arm-vxworks.c to LIB2ADDEH. * config/arm/unwind-arm-vxworks.c: New file. Provide dummy __exidx_start and __exidx_end for downloadable modules. Co-Authored-By: Doug Rupp <rupp@adacore.com> Co-Authored-By: Olivier Hainque <hainque@adacore.com> From-SVN: r250781
2017-08-01t-vxworks (LIBGCC2_INCLUDES): Start with -I.Olivier Hainque3-8/+15
2017-08-01 Olivier Hainque <hainque@adacore.com> * config/t-vxworks (LIBGCC2_INCLUDES): Start with -I. after -nostdinc. * config/t-vxworks7: Likewise. From-SVN: r250776
2017-08-01t-vxworks: Instead of redefining LIB2ADD, augment LIB2ADDEH with vxlib.c and ↵Olivier Hainque2-1/+6
vxlib-tls.c. 2017-08-01 Olivier Hainque <hainque@adacore.com> * config/t-vxworks: Instead of redefining LIB2ADD, augment LIB2ADDEH with vxlib.c and vxlib-tls.c. From-SVN: r250775
2017-07-28[PowerPC/RTEMS] Add 64-bit support using ELFv2 ABISebastian Huber2-1/+6
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: r250652
2017-07-24PR testsuite/80759 Fix -mcall-ms2sysv-xlogues on Darwin and SolarisDaniel Santos9-43/+85
2017-07-24 Daniel Santos <daniel.santos@pobox.com> PR testsuite/80759 * config.host: include i386/t-msabi for darwin and solaris. * config/i386/i386-asm.h (ELFFN): Rename to FN_TYPE. (FN_SIZE): New macro. (FN_HIDDEN): Likewise. (ASMNAME): Likewise. (FUNC_START): Rename to FUNC_BEGIN, use ASMNAME, replace .global with .globl. (HIDDEN_FUNC): Use ASMNAME and .globl instead of .global. (SSE_SAVE): Convert to cpp macro, hard-code offset (always 0x60). * config/i386/resms64.S: Use SSE_SAVE as cpp macro instead of gas .macro. * config/i386/resms64f.S: Likewise. * config/i386/resms64fx.S: Likewise. * config/i386/resms64x.S: Likewise. * config/i386/savms64.S: Likewise. * config/i386/savms64f.S: Likewise. From-SVN: r250488
2017-07-19Fix Unwind support on DragonFly BSD after sigtramp moveJohn Marino2-17/+46
2017-07-19 John Marino <gnugcc@marino.st> * config/i386/dragonfly-unwind.h: Handle sigtramp relocation. From-SVN: r250354
2017-07-12re PR target/81193 (PowerPC GCC __builtin_cpu_is and __builtin_cpu_supports ↵Michael Meissner3-8/+22
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
2017-07-10[ARC] Configure script to allow non uclibc based tripletsVineet Gupta2-1/+5
gcc/ 2017-07-10 Vineet Gupta <vgupta@synopsys.com> * config.gcc: Remove uclibc from arc target spec. libgcc/ 2017-07-10 Vineet Gupta <vgupta@synopsys.com> * config.host: Remove uclibc from arc target spec. From-SVN: r250097
2017-07-09config.host (*-*-netbsd*): Remove check for aout NetBSD releases.Krister Walfridsson2-8/+5
2017-07-09 Krister Walfridsson <krister.walfridsson@gmail.com> * config.host (*-*-netbsd*): Remove check for aout NetBSD releases. From-SVN: r250080
2017-07-07float128-ifunc.c: Don't include auxv.h.Peter Bergner2-42/+8
libgcc/ * 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: r250061
2017-07-06Add support for ARMv8-R architectureThomas Preud'homme2-1/+5
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
2017-07-04Add missing libgcc/ChangeLog entry.Olivier Hainque1-0/+4
From-SVN: r249953
2017-07-03t-vxworks7: New file.Olivier Hainque1-0/+16
2017-06-27 Olivier Hainque <hainque@adacore.com> * config/t-vxworks7: New file. New file mistakenly omitted from previous commit referencing it. From-SVN: r249938
2017-06-28Use ucontext_t not struct ucontext in linux-unwind.h files.Joseph Myers12-12/+27
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
2017-06-27config.gcc (i*86-wrs-vxworks7): Handle new acceptable triplet.Jerome Lambourg2-1/+6
2017-06-27 Jerome Lambourg <lambourg@adacore.com> gcc/ * config.gcc (i*86-wrs-vxworks7): Handle new acceptable triplet. (x86_64-wrs-vxworks7): Likewise. libgcc/ * config.host (i*86-wrs)vxworks7): Handle new acceptable triplet. (x86_64-wrs-vxworks7): Likewise. From-SVN: r249689
2017-06-27t-vxworks7: New file.Olivier Hainque2-0/+8
2017-06-27 Olivier Hainque <hainque@adacore.com> * config/t-vxworks7: New file. * config.host (*-*-vxworks7): Use it. From-SVN: r249688
2017-06-22driver-i386.c (host_detect_local_cpu): Add Kaby Lake models to skylake case.Matt Turner2-0/+8
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
2017-06-21re PR gcov-profile/81080 (target libgcov not built with large file support)Richard Biener5-0/+219
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: r249435
2017-06-16[arm] Explicitly set .fpu in cmse_nonsecure_call.SRichard Earnshaw2-0/+12
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
2017-06-09Speed-up indirect-call instrumentationMartin Liska2-0/+7
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
2017-06-08t-vxworks (LIBGCC2_INCLUDES): Add path to wrn/coreip to the set of -I options...Olivier Hainque2-3/+9
2017-06-08 Olivier Hainque <hainque@adacore.com> * config/t-vxworks (LIBGCC2_INCLUDES): Add path to wrn/coreip to the set of -I options, support for direct inclusions of net/uio.h by VxWorks header files via ioLib.h. From-SVN: r249016
2017-06-07Fix white space.David Edelsohn1-4/+4
From-SVN: r248969
2017-06-07aix-unwind.h (MD_FALLBACK_FRAME_STATE_FOR): Define unconditionally.Tony Reix2-9/+37
2017-06-07 Tony Reix <tony.reix@atos.net> Matthieu Sarter <matthieu.sarter.external@atos.net> David Edelsohn <dje.gcc@gmail.com> * config/rs6000/aix-unwind.h (MD_FALLBACK_FRAME_STATE_FOR): Define unconditionally. (ucontext_for): Add 64-bit AIX 6.1, 7.1, 7.2 support. Add 32-bit AIX 7.2 support. Co-Authored-By: David Edelsohn <dje.gcc@gmail.com> Co-Authored-By: Matthieu Sarter <matthieu.sarter.external@atos.net> From-SVN: r248968
2017-06-02Add ChangeLog entry for revision 248838Olivier Hainque1-0/+5
From-SVN: r248839
2017-06-02vxlib.c (__gthread_once): Add missing value to nested return statement.Olivier Hainque1-1/+1
2017-06-02 Olivier Hainque <hainque@adacore.com> * config/vxlib.c (__gthread_once): Add missing value to nested return statement. From-SVN: r248838
2017-05-30t-vxworks (LIBGCC2_INCLUDES): Remove extraneous dollar sign before $(MULTIDIR).Olivier Hainque2-1/+6
2017-05-30 Olivier Hainque <hainque@adacore.com> libgcc/ * config/t-vxworks (LIBGCC2_INCLUDES): Remove extraneous dollar sign before $(MULTIDIR). From-SVN: r248684
2017-05-26re PR libgcc/80037 (Bad .eh_frame data in crtend.o)Richard Henderson2-0/+9
PR libgcc/80037 * config/alpha/t-alpha (CRTSTUFF_T_CFLAGS): New. From-SVN: r248522
2017-05-17unwind-arm.h: Make _Unwind_GetIP...Andreas Tobler3-0/+35
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: r248173
2017-05-15lb1spc.S: Emit .note.GNU-stack section for a non-executable stack.Adhemerval Zanella2-0/+11
* config/sparc/lb1spc.S [__ELF__ && __linux__]: Emit .note.GNU-stack section for a non-executable stack. From-SVN: r248043
2017-05-14PR target/80600 - hidden symbol '__cpu_model' is referenced by DSOKrister Walfridsson2-0/+6
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
2017-05-14i386.opt: Add option -mcall-ms2sysv-xlogues.Daniel Santos10-2/+443
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
2017-05-09config.host: Use the generic FreeBSD t-slibgcc-elf-ver for arm*-*-freebsd* ↵Andreas Tobler2-1/+6
instead of the... 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: r247812
2017-05-06Add fuchsia support to libgccJoshua Conner4-1/+70
* 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
2017-04-19Introduce gcov.h header file (PR gcov-profile/80435).Martin Liska4-10/+60
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-18Validate that destination gcov file does not exist for gcov-tool (PR ↵Martin Liska2-0/+14
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-07Makefile.in: Swap definition of LIBGCC_LINKS and inclusion of target ↵Jeff Law3-3/+10
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[RS6000] Out-of-line register save functions can't be used from crtend.oAlan Modra2-1/+9
PR target/45053 * config/rs6000/t-crtstuff (CRTSTUFF_T_CFLAGS): Add -O2. From-SVN: r246749
2017-04-03Fix numerous typos in commentsJonathan Wakely2-1/+5
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-03-27[ARC] Fix divdf3 emulation for arcem.Claudiu Zissulescu2-4/+8
libgcc/ 2017-02-27 Claudiu Zissulescu <claziss@synopsys.com> * config/arc/ieee-754/divdf3.S (__divdf3): Use __ARCEM__. From-SVN: r246498
2017-03-10freebsd-unwind.h: New file.John Marino3-1/+114
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-10Build crt*vr.S with AltiVec enabledSegher Boessenkool3-0/+7
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-10rs6000: float128 on BE and 32-bitSegher Boessenkool4-13/+23
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-02gthr-win32.h: Define NOGDI before windows.h include to prevent w32api ↵Jonathan Yong2-0/+7
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