aboutsummaryrefslogtreecommitdiff
path: root/libgcc
AgeCommit message (Collapse)AuthorFilesLines
2020-06-10Daily bump.GCC Administrator1-0/+14
2020-06-09libgcov: fix TOPN type castingMartin Liska2-24/+29
The patch fixes tree-prof.exp tests on solaris11 and i686-linux-gnu, problem was that sizeof of a pointer is different from sizeof gcov_type. I'm going to install it if there are no objections. Thanks, Martin libgcc/ChangeLog: PR gcov-profile/95494 * libgcov-driver.c (write_top_counters): Cast first to intptr_t as sizeof(*) != sizeof(gcov_type). * libgcov.h (gcov_counter_set_if_null): Remove. (gcov_topn_add_value): Cast first to intptr_t and update linked list directly.
2020-06-08xtensa: libgcc: fix PR target/95571Max Filippov1-24/+22
Rewrite uw_install_context without function calls to avoid register spilling in _Unwind_RaiseException during return context installation. 2020-06-08 Max Filippov <jcmvbkbc@gmail.com> gcc/testsuite/ * g++.target/xtensa/pr95571.C: New test. * g++.target/xtensa/xtensa.exp: New testsuite. libgcc/ * config/xtensa/unwind-dw2-xtensa.c (uw_install_context): Merge with uw_install_context_1.
2020-06-05Daily bump.GCC Administrator1-0/+9
2020-06-04Missing __divtf3@@GCC_4.4.0 on ia64Andreas Schwab2-0/+12
gcc/testsuite/ PR libfortran/59227 * gfortran.dg/erf_3.F90: Remove XFAIL on ia64-*-linux*. libgcc/ PR target/59230 PR libfortran/59227 * config/ia64/t-softfp-compat (softfp_file_list): Filter out soft-fp/divtf3.c. (LIB2ADD): Add config/ia64/divtf3.c. * config/ia64/divtf3.c: New file.
2020-06-04Daily bump.GCC Administrator1-0/+8
2020-06-03gcov: Fix build on AIXMartin Liska2-13/+20
We must guard used atomic builtins with GCOV_SUPPORTS_ATOMIC. The patch is tested on AIX and I'm going to push it. libgcc/ChangeLog: PR gcov-profile/95480 * libgcov-profiler.c (GCOV_SUPPORTS_ATOMIC): Move to... * libgcov.h (GCOV_SUPPORTS_ATOMIC): ...here. (gcov_counter_add): Use GCOV_SUPPORTS_ATOMIC guard. (gcov_counter_set_if_null): Likewise.
2020-06-03Daily bump.GCC Administrator1-0/+27
2020-06-02RISC-V: Make __divdi3 handle div by zero same as hardware.Jim Wilson1-3/+5
The ISA manual specifies that divide by zero always returns -1 as the result. We were failing to do that when the dividend was negative. Original patch from Virginie Moser. libgcc/ * config/riscv/div.S (__divdi3): For negative arguments, change bgez to bgtz.
2020-06-02libgcov: replace malloc and calloc.Martin Liska1-1/+1
The calloc was in the original tested version of the patch and I made accidental last minute change. Installed to master as obvious. libgcc/ChangeLog: * libgcov.h (gcov_topn_add_value): Use xcalloc instead of xmalloc.
2020-06-02Make TOPN counter dynamically allocated.Martin Liska4-184/+162
gcc/ChangeLog: * coverage.c (get_coverage_counts): Skip sanity check for TOP N counters as they have variable number of counters. * gcov-dump.c (main): Add new option -r. (print_usage): Likewise. (tag_counters): All new raw format. * gcov-io.h (struct gcov_kvp): New. (GCOV_TOPN_VALUES): Remove. (GCOV_TOPN_VALUES_COUNTERS): Likewise. (GCOV_TOPN_MEM_COUNTERS): New. (GCOV_TOPN_DISK_COUNTERS): Likewise. (GCOV_TOPN_MAXIMUM_TRACKED_VALUES): Likewise. * ipa-profile.c (ipa_profile_generate_summary): Use GCOV_TOPN_MAXIMUM_TRACKED_VALUES. (ipa_profile_write_edge_summary): Likewise. (ipa_profile_read_edge_summary): Likewise. (ipa_profile): Remove usage of GCOV_TOPN_VALUES. * profile.c (sort_hist_values): Sort variable number of counters. (compute_value_histograms): Special case for TOP N counters that have dynamic number of key-value pairs. * value-prof.c (dump_histogram_value): Dump variable number of key-value pairs. (stream_in_histogram_value): Stream in variable number of key-value pairs for TOP N counter. (get_nth_most_common_value): Deal with variable number of key-value pairs. (dump_ic_profile): Use GCOV_TOPN_MAXIMUM_TRACKED_VALUES for loop iteration. (gimple_find_values_to_profile): Set GCOV_TOPN_MEM_COUNTERS to n_counters. * doc/gcov-dump.texi: Document new -r option. libgcc/ChangeLog: * libgcov-driver.c (prune_topn_counter): Remove. (prune_counters): Likewise. (merge_one_data): Special case TOP N counters as they have variable length. (write_top_counters): New. (write_one_data): Special case TOP N. (dump_one_gcov): Do not prune TOP N counters. * libgcov-merge.c (merge_topn_values_set): Remove. (__gcov_merge_topn): Use gcov_topn_add_value. * libgcov-profiler.c (__gcov_topn_values_profiler_body): Likewise here. * libgcov.h (gcov_counter_add): New. (gcov_counter_set_if_null): Likewise. (gcov_topn_add_value): New.
2020-06-02Daily bump.GCC Administrator1-0/+5
2020-06-01i386: Add __attribute__ ((gcc_struct)) to struct fenv [PR95418]Uros Bizjak1-1/+1
Windows ABI (MinGW) is different than Linux ABI when bitfileds are involved. The following patch adds __attribute__ ((gcc_struct)) to struct fenv in order to match the layout of x87 state image in memory. 2020-06-01 Uroš Bizjak <ubizjak@gmail.com> libatomic/ChangeLog: * config/x86/fenv.c (struct fenv): Add __attribute__ ((gcc_struct)). libgcc/ChangeLog: * config/i386/sfp-exceptions.c (struct fenv): Add __attribute__ ((gcc_struct)). libgfortran/ChangeLog: PR libfortran/95418 * config/fpu-387.h (struct fenv): Add __attribute__ ((gcc_struct)).
2020-05-30Daily bump.GCC Administrator1-0/+5
2020-05-29Avoid nested save_CFLAGS and save_LDFLAGSH.J. Lu1-2/+3
Avoid nested save_CFLAGS and save_LDFLAGS by replacing save_CFLAGS and save_LDFLAGS with cet_save_CFLAGS and cet_save_LDFLAGS in cet.m4. config/ PR bootstrap/95413 * cet.m4: Replace save_CFLAGS and save_LDFLAGS with cet_save_CFLAGS and cet_save_LDFLAGS. gcc/ PR bootstrap/95413 * configure: Regenerated. libatomic/ PR bootstrap/95413 * configure: Regenerated. libbacktrace/ PR bootstrap/95413 * configure: Regenerated. libcc1/ PR bootstrap/95413 * configure: Regenerated. libcpp/ PR bootstrap/95413 * configure: Regenerated. libdecnumber/ PR bootstrap/95413 * configure: Regenerated. libgcc/ PR bootstrap/95413 * configure: Regenerated. libgfortran/ PR bootstrap/95413 * configure: Regenerated. libgomp/ PR bootstrap/95413 * configure: Regenerated. libiberty/ PR bootstrap/95413 * configure: Regenerated. libitm/ PR bootstrap/95413 * configure: Regenerated. libobjc/ PR bootstrap/95413 * configure: Regenerated. libphobos/ PR bootstrap/95413 * configure: Regenerated. libquadmath/ PR bootstrap/95413 * configure: Regenerated. libsanitizer/ PR bootstrap/95413 * configure: Regenerated. libssp/ PR bootstrap/95413 * configure: Regenerated. libstdc++-v3/ PR bootstrap/95413 * configure: Regenerated. libvtv/ PR bootstrap/95413 * configure: Regenerated. lto-plugin/ PR bootstrap/95413 * configure: Regenerated. zlib/ PR bootstrap/95413 * configure: Regenerated.
2020-05-29Daily bump.GCC Administrator1-0/+6
2020-05-28gcov-tool: Flexible endian adjustment for merging coverage dataMartin Liska2-4/+3
gcc/ChangeLog: 2020-05-27 Dong JianQiang <dongjianqiang2@huawei.com> PR gcov-profile/95332 * gcov-io.c (gcov_var::endian): Move field. (from_file): Add IN_GCOV_TOOL check. * gcov-io.h (gcov_magic): Ditto. libgcc/ChangeLog: 2020-05-27 Dong JianQiang <dongjianqiang2@huawei.com> PR gcov-profile/95332 * libgcov-util.c (read_gcda_file): Call gcov_magic. * libgcov.h (gcov_magic): Disable GCC poison.
2020-05-21libgcc: Move FEATURE_AVX512VP2INTERSECT after FEATURE_AVX512BF16H.J. Lu2-2/+8
Move FEATURE_AVX512VP2INTERSECT after FEATURE_AVX512BF16 to avoid changing libgcc ABI. gcc/ PR target/95212 * config/i386/i386-builtins.c (processor_features): Move F_AVX512VP2INTERSECT after F_AVX512BF16. (isa_names_table): Likewise. libgcc/ PR target/95212 * config/i386/cpuinfo.h (processor_features): Move FEATURE_AVX512VP2INTERSECT after FEATURE_AVX512BF16.
2020-05-20Add missing ChangeLog entry for r11-516H.J. Lu1-0/+6
2020-05-20x86: Update VPCLMULQDQ checkH.J. Lu1-2/+2
Update VPCLMULQDQ check to support processors with AVX version of VPCLMULQDQ. PR target/91695 * config/i386/cpuinfo.c (get_available_features): Fix VPCLMULQDQ check.
2020-05-19x86: Add FEATURE_AVX512VP2INTERSECT and update GFNI checkH.J. Lu3-2/+14
Add FEATURE_AVX512VP2INTERSECT to libgcc so that enum processor_features in libgcc matches enum processor_features in i386-builtins.c. Update GFNI check to support processors with SSE and AVX versions of GFNI. PR target/95212 PR target/95220 * config/i386/cpuinfo.c (get_available_features): Fix FEATURE_GFNI check. Also check FEATURE_AVX512VP2INTERSECT. * config/i386/cpuinfo.h (processor_features): Add FEATURE_AVX512VP2INTERSECT.
2020-05-15x86: Also check if -fcf-protection worksH.J. Lu2-0/+8
When defaulting CET run-time support to auto, check if -fcf-protection works. Even if the stage1 GCC doesn't support -fcf-protection, since the final GCC does, CET run-time support will be enabled by default if binutils support CET. config/ PR bootstrap/95147 * cet.m4 (GCC_CET_FLAGS): Also check if -fcf-protection works when defaulting to auto. libatomic/ PR bootstrap/95147 * configure: Regenerated. libbacktrace/ PR bootstrap/95147 * configure: Regenerated. libgcc/ PR bootstrap/95147 * configure: Regenerated. libgfortran/ PR bootstrap/95147 * configure: Regenerated. libgomp/ PR bootstrap/95147 * configure: Regenerated. libitm/ PR bootstrap/95147 * configure: Regenerated. libobjc/ PR bootstrap/95147 * configure: Regenerated. libphobos/ PR bootstrap/95147 * configure: Regenerated. libquadmath/ PR bootstrap/95147 * configure: Regenerated. libsanitizer/ PR bootstrap/95147 * configure: Regenerated. libssp/ PR bootstrap/95147 * configure: Regenerated. libstdc++-v3/ PR bootstrap/95147 * configure: Regenerated. libvtv/ PR bootstrap/95147 * configure: Regenerated. zlib/ PR bootstrap/95147 * configure: Regenerated.
2020-05-14x86: Default CET run-time support to autoH.J. Lu2-2/+6
CET has been added since GCC 8. This patch defaults CET run-time support to auto. It enables CET run-time support if asssembler supports CET instructions and multi-byte NOPs are enabled via SSE2. config/ * cet.m4 (GCC_CET_FLAGS): Change default to auto. gcc/ * configure: Regenerated. libatomic/ * configure: Regenerated. libbacktrace/ * configure: Regenerated. libcc1/ * configure: Regenerated. libcpp/ * configure: Regenerated. libdecnumber/ * configure: Regenerated. libgcc/ * configure: Regenerated. libgfortran/ * configure: Regenerated. libgomp/ * configure: Regenerated. libitm/ * configure: Regenerated. libobjc/ * configure: Regenerated. libquadmath/ * configure: Regenerated. libsanitizer/ * configure: Regenerated. libssp/ * configure: Regenerated. libstdc++-v3/ * configure: Regenerated. libvtv/ * configure: Regenerated. zlib/ * configure: Regenerated.
2020-05-09libgcc: cris: Remove support for crisv32-*-* and cris*-*-linuxHans-Peter Nilsson4-18/+5
Part of the removal of crisv32-* and cris-*-linux* (cris-elf remains). libgcc: * config.host: Remove support for crisv32-*-* and cris*-*-linux. * config/cris/libgcc-glibc.ver, config/cris/t-linux: Remove.
2020-05-06i386: Use generic division to generate INEXACT exceptionUros Bizjak2-14/+18
Introduce math_force_eval_div to use generic division to generate INEXACT as well as INVALID and DIVZERO exceptions. libgcc/ChangeLog: * config/i386/sfp-exceptions.c (__math_force_eval): Remove. (__math_force_eval_div): New define. (__sfp_handle_exceptions): Use __math_force_eval_div to use generic division to generate INVALID, DIVZERO and INEXACT exceptions. libatomic/ChangeLog: * config/x86/fenv.c (__math_force_eval): Remove. (__math_force_eval_div): New define. (__atomic_deraiseexcept): Use __math_force_eval_div to use generic division to generate INVALID, DIVZERO and INEXACT exceptions. libgfortran/ChangeLog: * config/fpu-387.h (__math_force_eval): Remove. (__math_force_eval_div): New define. (local_feraiseexcept): Use __math_force_eval_div to use generic division to generate INVALID, DIVZERO and INEXACT exceptions. (struct fenv): Define named struct instead of typedef.
2020-05-06[AArch64] Use __getauxval instead of getauxval in LSE detection code in libgccKyrylo Tkachov2-8/+17
This version of the fix uses __getauxval instead of getauxval. The whole thing is guarded simply on __gnu_linux__. __getauxval was introduced in 2.16 but the aarch64 port was added in 2.17 so in practice I expect all aarch64 glibcs to support __getauxval. Bootstrapped and tested on aarch64-none-linux-gnu. Also tested on aarch64-none-elf. 2020-05-06 Kyrylo Tkachov <kyrylo.tkachov@arm.com> * config/aarch64/lse-init.c (init_have_lse_atomics): Use __getauxval instead of getauxval. (AT_HWCAP): Define. (HWCAP_ATOMICS): Define. Guard detection on __gnu_linux__.
2020-05-05Delete file meant for a private branchMichael Meissner1-7/+0
2020-05-05Delete file meant for private branchMichael Meissner1-22/+0
2020-05-05Remove files meant for private branchMichael Meissner2-85/+0
2020-05-05Delete changes meant for a private branch.Michael Meissner5-162/+9
2020-05-05 Michael Meissner <meissner@linux.ibm.com> * config/rs6000/rs6000-builtin.def: Delete changes meant for a private branch. * config/rs6000/rs6000-c.c: Likewise. * config/rs6000/rs6000-call.c: Likewise. * gcc/config/rs6000/rs6000.c: Likewise. 2020-05-05 Michael Meissner <meissner@linux.ibm.com> * gcc.dg/nextafter-2.c: Delete changes meant for a private branch. * gcc.target/powerpc/pr70117.c: Likewise. 2020-05-05 Michael Meissner <meissner@linux.ibm.com> * config.host: Delete changes meant for a private branch. * config/rs6000/t-float128: Likewise. * configure.ac: Likewise. * configure: Likewise.
2020-05-05Patch ieee128-lib-patch010bMichael Meissner7-2/+259
2020-05-05New fileMichael Meissner1-0/+0
2020-05-05New filesMichael Meissner2-0/+0
2020-05-05Update ChangeLogMichael Meissner1-1/+1
2020-05-05Remove extra newlineMichael Meissner1-1/+0
2020-05-05Patch ieee128-lib-patch003bMichael Meissner2-0/+14
2020-05-05setup branchMichael Meissner1-0/+4
2020-05-05Remove __gcov_flush.Martin Liska4-35/+20
PR gcov-profile/93623 * tree-cfg.c (stmt_can_terminate_bb_p): Update comment to reflect reality. PR gcov-profile/93623 * Makefile.in: Remove __gcov_flush. * gcov.h (__gcov_flush): Remove. * libgcov-interface.c (__gcov_flush): Remove. (init_mx): Use renamed mutex. (__gcov_lock): Likewise. (__gcov_unlock): Likewise. (__gcov_fork): Likewise. (__gcov_flush): Remove.
2020-05-05Use __gcov_dump and __gcov_reset in execv and fork context.Martin Liska2-16/+56
PR gcov-profile/93623 * libgcov-interface.c (__gcov_fork): Do not flush and reset only in child process. (__gcov_execl): Dump counters only and reset them only if exec* fails. (__gcov_execlp): Likewise. (__gcov_execle): Likewise. (__gcov_execv): Likewise. (__gcov_execvp): Likewise. (__gcov_execve): Likewise.
2020-05-05Do locking for __gcov_dump and __gcov_reset as well.Martin Liska4-16/+65
PR gcov-profile/93623 * Makefile.in: Add _gcov_lock_unlock to LIBGCOV_INTERFACE. * libgcov-interface.c (ALIAS_void_fn): Remove. (__gcov_lock): New. (__gcov_unlock): New. (__gcov_flush): Use __gcov_lock and __gcov_unlock. (__gcov_reset): Likewise. (__gcov_dump): Likewise. * libgcov.h (__gcov_lock): New declaration. (__gcov_unlock): Likewise.
2020-05-05Add missing ChangeLog entries.Martin Liska1-0/+6
2020-05-05Remove 2 dead variables in bid_internal.h.Martin Liska1-4/+0
libgcc/config/libbid/ChangeLog: 2020-02-04 Martin Liska <mliska@suse.cz> PR libgcc/92565 * bid_internal.h (handle_UF_128_rem): Remove unused variable. (handle_UF_128): Likewise.
2020-05-01i386: Use generic division to generate INVALID and DIVZERO exceptionsUros Bizjak2-12/+14
Introduce math_force_eval to evaluate generic division to generate INVALID and DIVZERO exceptions. libgcc/ChangeLog: * config/i386/sfp-exceptions.c (__math_force_eval): New define. (__sfp_handle_exceptions): Use __math_force_eval to evaluete generic division to generate INVALID and DIVZERO exceptions. libatomic/ChangeLog: * config/x86/fenv.c (__math_force_eval): New define. (__atomic_feraiseexcept): Use __math_force_eval to evaluete generic division to generate INVALID and DIVZERO exceptions. libgfortran/ChangeLog: * config/fpu-387.h (__math_force_eval): New define. (local_feraiseexcept): Use __math_force_eval to evaluete generic division to generate INVALID and DIVZERO exceptions.
2020-04-27RS6000: Use .machine ppc for some CRT filesSebastian Huber4-0/+9
Since commit e154242724b084380e3221df7c08fcdbd8460674 the flag -many is sometimes not passed to the assembler. Use .machine ppc to prevent errors if these files are assembled for an ISA which does not support FPRs. libgcc/ * config/rs6000/crtresfpr.S: Use .machine ppc. * config/rs6000/crtresxfpr.S: Likewise. * config/rs6000/crtsavfpr.S: Likewise.
2020-04-21aarch64, libgcc: Fix unwinding from pac-ret to normal frames [PR94514]Szabolcs Nagy2-0/+8
With -mbranch-protection=pac-ret the debug info toggles the signedness state of the return address so the unwinder knows when the return address needs pointer authentication. The unwind context flags were not updated according to the dwarf frame info. This causes unwinding across frames that were built without pac-ret to incorrectly authenticate the return address wich corrupts the return address on a system where PAuth is enabled. Note: This even affects systems where all code use pac-ret because unwinding across a signal frame the return address is not signed. gcc/testsuite/ChangeLog: PR target/94514 * g++.target/aarch64/pr94514.C: New test. * gcc.target/aarch64/pr94514.c: New test. libgcc/ChangeLog: PR target/94514 * config/aarch64/aarch64-unwind.h (aarch64_frob_update_context): Update context->flags accroding to the frame state.
2020-04-19i386: Remove unneeded assignments when triggering SSE exceptionsUros Bizjak2-6/+5
According to "Intel 64 and IA32 Arch SDM, Vol. 3: "Because SIMD floating-point exceptions are precise and occur immediately, the situation does not arise where an x87 FPU instruction, a WAIT/FWAIT instruction, or another SSE/SSE2/SSE3 instruction will catch a pending unmasked SIMD floating-point exception." Remove unneeded assignments to volatile memory. libgcc/ChangeLog: * config/i386/sfp-exceptions.c (__sfp_handle_exceptions) [__SSE_MATH__]: Remove unneeded assignments to volatile memory. libatomic/ChangeLog: * config/x86/fenv.c (__atomic_feraiseexcept) [__SSE_MATH__]: Remove unneeded assignments to volatile memory. libgfortran/ChangeLog: * config/fpu-387.h (local_feraiseexcept) [__SSE_MATH__]: Remove unneeded assignments to volatile memory.
2020-04-15aarch64: Fix bootstrap with old binutils [PR93053]Jakub Jelinek5-8/+125
As reported in the PR, GCC 10 (and also 9.3.1 but not 9.3.0) fails to build when using older binutils which lack LSE support, because those instructions are used in libgcc. Thanks to Kyrylo's hint, the following patches (hopefully) allow it to build even with older binutils by using .inst directive if LSE support isn't available in the assembler. 2020-04-15 Jakub Jelinek <jakub@redhat.com> PR target/93053 * configure.ac (LIBGCC_CHECK_AS_LSE): Add HAVE_AS_LSE checking. * config/aarch64/lse.S: Include auto-target.h, if HAVE_AS_LSE is not defined, use just .arch armv8-a. (B, M, N, OPN): Define. (COMMENT): New .macro. (CAS, CASP, SWP, LDOP): Use .inst directive if HAVE_AS_LSE is not defined. Otherwise, move the operands right after the glue? and comment out operands where the macros are used. * configure: Regenerated. * config.in: Regenerated.
2020-04-07libgcc: use syscall rather than __mmap/__munmapIan Lance Taylor2-8/+53
PR libgcc/94513 * generic-morestack.c: Give up trying to use __mmap/__munmap, use syscall instead.
2020-04-04libgcc: only use __mmap if glibc >- 2.26Ian Lance Taylor2-1/+5
* generic-morestack.c: Only use __mmap on glibc >= 2.26.
2020-04-03libgcc: avoid mmap/munmap hooks in split-stack code on GNU/LinuxIan Lance Taylor2-0/+22
* generic-morestack.c: On GNU/Linux use __mmap/__munmap rather than mmap/munmap, to avoid hooks.