From 126437c5dad88fb2cc6172f09c556ff09844b649 Mon Sep 17 00:00:00 2001 From: Jonathan Yong <10walls@gmail.com> Date: Thu, 2 Mar 2017 11:00:28 +0000 Subject: unwind-seh.c: Suppress warnings for RtlUnwindEx calls. * unwind-seh.c: Suppress warnings for RtlUnwindEx calls. From-SVN: r245834 --- libgcc/ChangeLog | 4 ++++ libgcc/unwind-seh.c | 6 +++--- 2 files changed, 7 insertions(+), 3 deletions(-) (limited to 'libgcc') diff --git a/libgcc/ChangeLog b/libgcc/ChangeLog index 906cbd5..11b1ff9 100644 --- a/libgcc/ChangeLog +++ b/libgcc/ChangeLog @@ -1,3 +1,7 @@ +2017-03-02 Jonathan Yong <10walls@gmail.com> + + * unwind-seh.c: Suppress warnings for RtlUnwindEx calls. + 2017-02-16 Andrew Pinski * config/aarch64/value-unwind.h: New file. diff --git a/libgcc/unwind-seh.c b/libgcc/unwind-seh.c index 37326c5..91edc1a 100644 --- a/libgcc/unwind-seh.c +++ b/libgcc/unwind-seh.c @@ -221,7 +221,7 @@ _GCC_specific_handler (PEXCEPTION_RECORD ms_exc, void *this_frame, test is that we're the target frame. */ if (ms_exc->ExceptionInformation[1] == (_Unwind_Ptr) this_frame) { - RtlUnwindEx (this_frame, ms_exc->ExceptionInformation[2], + RtlUnwindEx (this_frame, (PVOID) ms_exc->ExceptionInformation[2], ms_exc, gcc_exc, ms_orig_context, ms_disp->HistoryTable); abort (); @@ -313,7 +313,7 @@ _GCC_specific_handler (PEXCEPTION_RECORD ms_exc, void *this_frame, ms_exc->ExceptionInformation[3] = gcc_context.reg[1]; /* Begin phase 2. Perform the unwinding. */ - RtlUnwindEx (this_frame, gcc_context.ra, ms_exc, + RtlUnwindEx (this_frame, (PVOID)gcc_context.ra, ms_exc, (PVOID)gcc_context.reg[0], ms_orig_context, ms_disp->HistoryTable); } @@ -365,7 +365,7 @@ _Unwind_Resume (struct _Unwind_Exception *gcc_exc) ms_context.ContextFlags = CONTEXT_ALL; RtlCaptureContext (&ms_context); - RtlUnwindEx ((void *) gcc_exc->private_[1], gcc_exc->private_[2], + RtlUnwindEx ((void *) gcc_exc->private_[1], (PVOID)gcc_exc->private_[2], &ms_exc, gcc_exc, &ms_context, &ms_history); /* Is RtlUnwindEx declared noreturn? */ -- cgit v1.1 From db9f7f657e035786836f8371b56d876a9bec46bc Mon Sep 17 00:00:00 2001 From: Jonathan Yong <10walls@gmail.com> Date: Thu, 2 Mar 2017 11:03:23 +0000 Subject: 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 --- libgcc/ChangeLog | 6 ++++++ libgcc/config/i386/gthr-win32.h | 1 + 2 files changed, 7 insertions(+) (limited to 'libgcc') diff --git a/libgcc/ChangeLog b/libgcc/ChangeLog index 11b1ff9..476f610 100644 --- a/libgcc/ChangeLog +++ b/libgcc/ChangeLog @@ -1,5 +1,11 @@ 2017-03-02 Jonathan Yong <10walls@gmail.com> + * config/i386/gthr-win32.h: Define NOGDI before + windows.h include to prevent w32api CC_NONE macro + clash with libgfortran. + +2017-03-02 Jonathan Yong <10walls@gmail.com> + * unwind-seh.c: Suppress warnings for RtlUnwindEx calls. 2017-02-16 Andrew Pinski diff --git a/libgcc/config/i386/gthr-win32.h b/libgcc/config/i386/gthr-win32.h index 74a524b..246fa5f 100644 --- a/libgcc/config/i386/gthr-win32.h +++ b/libgcc/config/i386/gthr-win32.h @@ -545,6 +545,7 @@ __gthread_recursive_mutex_destroy (__gthread_recursive_mutex_t *__mutex) #else /* ! __GTHREAD_HIDE_WIN32API */ +#define NOGDI #include #include -- cgit v1.1 From 7502c5970d0af6cc71c2a906d55d95a31322bc07 Mon Sep 17 00:00:00 2001 From: Segher Boessenkool Date: Fri, 10 Mar 2017 18:57:58 +0100 Subject: 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 --- libgcc/ChangeLog | 9 +++++++++ libgcc/config.in | 3 --- libgcc/configure | 12 +++++++----- libgcc/configure.ac | 12 +++++++----- 4 files changed, 23 insertions(+), 13 deletions(-) (limited to 'libgcc') diff --git a/libgcc/ChangeLog b/libgcc/ChangeLog index 476f610..470fbb7 100644 --- a/libgcc/ChangeLog +++ b/libgcc/ChangeLog @@ -1,3 +1,12 @@ +2017-03-10 Segher Boessenkool + + * 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. + 2017-03-02 Jonathan Yong <10walls@gmail.com> * config/i386/gthr-win32.h: Define NOGDI before diff --git a/libgcc/config.in b/libgcc/config.in index 4d33411..25aa0d9 100644 --- a/libgcc/config.in +++ b/libgcc/config.in @@ -21,9 +21,6 @@ /* Define if the system-provided CRTs are present on Solaris. */ #undef HAVE_SOLARIS_CRTS -/* Define if the system-provided CRTs are present on Solaris. */ -#undef HAVE_SOLARIS_CRTS - /* Define to 1 if you have the header file. */ #undef HAVE_STDINT_H diff --git a/libgcc/configure b/libgcc/configure index 5c900cc..45c4597 100644 --- a/libgcc/configure +++ b/libgcc/configure @@ -4779,6 +4779,8 @@ case ${host} in # software libraries, and whether the assembler can handle xsaddqp # for hardware support. powerpc*-*-linux*) + saved_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS -mabi=altivec -mvsx -mfloat128" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PowerPC ISA 2.06 to build __float128 libraries" >&5 $as_echo_n "checking for PowerPC ISA 2.06 to build __float128 libraries... " >&6; } if test "${libgcc_cv_powerpc_float128+set}" = set; then : @@ -4786,8 +4788,7 @@ if test "${libgcc_cv_powerpc_float128+set}" = set; then : else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#pragma GCC target ("vsx") - vector double dadd (vector double a, vector double b) { return a + b; } +vector double dadd (vector double a, vector double b) { return a + b; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : libgcc_cv_powerpc_float128=yes @@ -4799,6 +4800,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $libgcc_cv_powerpc_float128" >&5 $as_echo "$libgcc_cv_powerpc_float128" >&6; } + CFLAGS="$CFLAGS -mpower9-vector -mfloat128-hardware" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PowerPC ISA 3.0 to build hardware __float128 libraries" >&5 $as_echo_n "checking for PowerPC ISA 3.0 to build hardware __float128 libraries... " >&6; } if test "${libgcc_cv_powerpc_float128_hw+set}" = set; then : @@ -4806,12 +4808,11 @@ if test "${libgcc_cv_powerpc_float128_hw+set}" = set; then : else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#pragma GCC target ("vsx,power9-vector") - #include +#include #ifndef AT_PLATFORM #error "AT_PLATFORM is not defined" #endif - vector unsigned char (vector unsigned char a, vector unsigned char b) + vector unsigned char add (vector unsigned char a, vector unsigned char b) { vector unsigned char ret; __asm__ ("xsaddqp %0,%1,%2" : "=v" (ret) : "v" (a), "v" (b)); @@ -4830,6 +4831,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $libgcc_cv_powerpc_float128_hw" >&5 $as_echo "$libgcc_cv_powerpc_float128_hw" >&6; } + CFLAGS="$saved_CFLAGS" esac # Collect host-machine-specific information. diff --git a/libgcc/configure.ac b/libgcc/configure.ac index ea2030f..af15147 100644 --- a/libgcc/configure.ac +++ b/libgcc/configure.ac @@ -379,23 +379,24 @@ case ${host} in # software libraries, and whether the assembler can handle xsaddqp # for hardware support. powerpc*-*-linux*) + saved_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS -mabi=altivec -mvsx -mfloat128" AC_CACHE_CHECK([for PowerPC ISA 2.06 to build __float128 libraries], [libgcc_cv_powerpc_float128], [AC_COMPILE_IFELSE( - [#pragma GCC target ("vsx") - vector double dadd (vector double a, vector double b) { return a + b; }], + [vector double dadd (vector double a, vector double b) { return a + b; }], [libgcc_cv_powerpc_float128=yes], [libgcc_cv_powerpc_float128=no])]) + CFLAGS="$CFLAGS -mpower9-vector -mfloat128-hardware" AC_CACHE_CHECK([for PowerPC ISA 3.0 to build hardware __float128 libraries], [libgcc_cv_powerpc_float128_hw], [AC_COMPILE_IFELSE( - [#pragma GCC target ("vsx,power9-vector") - #include + [#include #ifndef AT_PLATFORM #error "AT_PLATFORM is not defined" #endif - vector unsigned char (vector unsigned char a, vector unsigned char b) + vector unsigned char add (vector unsigned char a, vector unsigned char b) { vector unsigned char ret; __asm__ ("xsaddqp %0,%1,%2" : "=v" (ret) : "v" (a), "v" (b)); @@ -406,6 +407,7 @@ powerpc*-*-linux*) __attribute__ ((__ifunc__ ("add_resolver")));], [libgcc_cv_powerpc_float128_hw=yes], [libgcc_cv_powerpc_float128_hw=no])]) + CFLAGS="$saved_CFLAGS" esac # Collect host-machine-specific information. -- cgit v1.1 From 4144e4e3010cb49a3659055de45acbf7a96b2da4 Mon Sep 17 00:00:00 2001 From: Segher Boessenkool Date: Fri, 10 Mar 2017 20:29:48 +0100 Subject: 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 --- libgcc/ChangeLog | 5 +++++ libgcc/config/rs6000/crtrestvr.S | 1 + libgcc/config/rs6000/crtsavevr.S | 1 + 3 files changed, 7 insertions(+) (limited to 'libgcc') diff --git a/libgcc/ChangeLog b/libgcc/ChangeLog index 470fbb7..a78bc43 100644 --- a/libgcc/ChangeLog +++ b/libgcc/ChangeLog @@ -1,5 +1,10 @@ 2017-03-10 Segher Boessenkool + * config/rs6000/crtrestvr.s: Use .machine altivec. + * config/rs6000/crtsavevr.s: Ditto. + +2017-03-10 Segher Boessenkool + * 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 diff --git a/libgcc/config/rs6000/crtrestvr.S b/libgcc/config/rs6000/crtrestvr.S index 592a2b4..a44ab89 100644 --- a/libgcc/config/rs6000/crtrestvr.S +++ b/libgcc/config/rs6000/crtrestvr.S @@ -31,6 +31,7 @@ /* Called with r0 pointing just beyond the end of the vector save area. */ + .machine altivec .section ".text" CFI_STARTPROC HIDDEN_FUNC(_restvr_20) diff --git a/libgcc/config/rs6000/crtsavevr.S b/libgcc/config/rs6000/crtsavevr.S index 2fd54c4..bc02019 100644 --- a/libgcc/config/rs6000/crtsavevr.S +++ b/libgcc/config/rs6000/crtsavevr.S @@ -31,6 +31,7 @@ /* Called with r0 pointing just beyond the end of the vector save area. */ + .machine altivec .section ".text" CFI_STARTPROC HIDDEN_FUNC(_savevr_20) -- cgit v1.1 From 4ccfdb287ef9e8a62ac09f47b0158b17b1d91190 Mon Sep 17 00:00:00 2001 From: John Marino Date: Fri, 10 Mar 2017 19:33:27 +0000 Subject: freebsd-unwind.h: New file. 2017-03-10 John Marino * config/aarch64/freebsd-unwind.h: New file. * config.host: Add aarch64-*-freebsd unwinder. From-SVN: r246052 --- libgcc/ChangeLog | 5 ++ libgcc/config.host | 2 +- libgcc/config/aarch64/freebsd-unwind.h | 108 +++++++++++++++++++++++++++++++++ 3 files changed, 114 insertions(+), 1 deletion(-) create mode 100644 libgcc/config/aarch64/freebsd-unwind.h (limited to 'libgcc') diff --git a/libgcc/ChangeLog b/libgcc/ChangeLog index a78bc43..4bae69f 100644 --- a/libgcc/ChangeLog +++ b/libgcc/ChangeLog @@ -1,3 +1,8 @@ +2017-03-10 John Marino + + * config/aarch64/freebsd-unwind.h: New file. + * config.host: Add aarch64-*-freebsd unwinder. + 2017-03-10 Segher Boessenkool * config/rs6000/crtrestvr.s: Use .machine altivec. diff --git a/libgcc/config.host b/libgcc/config.host index 8bab369..b279a64 100644 --- a/libgcc/config.host +++ b/libgcc/config.host @@ -340,7 +340,7 @@ aarch64*-*-freebsd*) extra_parts="$extra_parts crtfastmath.o" tmake_file="${tmake_file} ${cpu_type}/t-aarch64" tmake_file="${tmake_file} ${cpu_type}/t-softfp t-softfp t-crtfm" - md_unwind_header=aarch64/aarch64-unwind.h + md_unwind_header=aarch64/freebsd-unwind.h ;; aarch64*-*-linux*) extra_parts="$extra_parts crtfastmath.o" diff --git a/libgcc/config/aarch64/freebsd-unwind.h b/libgcc/config/aarch64/freebsd-unwind.h new file mode 100644 index 0000000..b822a72 --- /dev/null +++ b/libgcc/config/aarch64/freebsd-unwind.h @@ -0,0 +1,108 @@ +/* DWARF2 EH unwinding support for FreeBSD/ARM64 (aarch64). + Copyright (C) 2017 Free Software Foundation, Inc. + Contributed by John Marino + +This file is part of GCC. + +GCC is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 3, or (at your option) +any later version. + +GCC is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +Under Section 7 of GPL version 3, you are granted additional +permissions described in the GCC Runtime Library Exception, version +3.1, as published by the Free Software Foundation. + +You should have received a copy of the GNU General Public License and +a copy of the GCC Runtime Library Exception along with this program; +see the files COPYING3 and COPYING.RUNTIME respectively. If not, see +. */ + +/* Identify a signal frame, and set the frame state data appropriately. + See unwind-dw2.c for the structs. */ + +/* Always include AArch64 unwinder header file. */ +#include "config/aarch64/aarch64-unwind.h" + +#include +#include +#include +#include +#include +#include +#include + +#define REG_NAME(reg) mc_gpregs.gp_## reg +#define XREG(num) mc_gpregs.gp_x[num] +#define DARC __LIBGCC_DWARF_ALT_FRAME_RETURN_COLUMN__ + +#define MD_FALLBACK_FRAME_STATE_FOR aarch64_freebsd_fallback_frame_state + +static int +aarch64_outside_sigtramp_range (unsigned char *pc) +{ + static int sigtramp_range_determined = 0; + static unsigned char *sigtramp_start, *sigtramp_end; + + if (sigtramp_range_determined == 0) + { + struct kinfo_sigtramp kst = {0}; + size_t len = sizeof (kst); + int mib[4] = { CTL_KERN, KERN_PROC, KERN_PROC_SIGTRAMP, getpid() }; + + sigtramp_range_determined = 1; + if (sysctl (mib, 4, &kst, &len, NULL, 0) == 0) + { + sigtramp_range_determined = 2; + sigtramp_start = kst.ksigtramp_start; + sigtramp_end = kst.ksigtramp_end; + } + } + if (sigtramp_range_determined < 2) /* sysctl failed if < 2 */ + return 1; + + return (pc < sigtramp_start || pc >= sigtramp_end); +} + +static _Unwind_Reason_Code +aarch64_freebsd_fallback_frame_state +(struct _Unwind_Context *context, _Unwind_FrameState *fs) +{ + int n; + struct sigframe *sf; + mcontext_t *sc; + _Unwind_Ptr new_cfa; + + if (aarch64_outside_sigtramp_range(context->ra)) + return _URC_END_OF_STACK; + + sf = (struct sigframe *) context->cfa; + sc = &sf->sf_uc.uc_mcontext; + + new_cfa = (_Unwind_Ptr) sc; + fs->regs.cfa_how = CFA_REG_OFFSET; + fs->regs.cfa_reg = __LIBGCC_STACK_POINTER_REGNUM__; + fs->regs.cfa_offset = new_cfa - (_Unwind_Ptr) context->cfa; + + for (n = 0; n < 32; n++) + fs->regs.reg[n].how = REG_SAVED_OFFSET; + + for (n = 0; n < 30; n++) + fs->regs.reg[n].loc.offset = (_Unwind_Ptr) &(sc->XREG(n)) - new_cfa; + + fs->regs.reg[30].loc.offset = (_Unwind_Ptr) &(sc->REG_NAME(lr)) - new_cfa; + fs->regs.reg[31].loc.offset = (_Unwind_Ptr) &(sc->REG_NAME(sp)) - new_cfa; + + fs->regs.reg[DARC].how = REG_SAVED_OFFSET; + fs->regs.reg[DARC].loc.offset = (_Unwind_Ptr) &(sc->REG_NAME(elr)) - new_cfa; + + fs->retaddr_column = DARC; + fs->signal_frame = 1; + + return _URC_NO_REASON; +} -- cgit v1.1 From c4192ad7027a3e991134b5d6d5f2d7451d058f48 Mon Sep 17 00:00:00 2001 From: Claudiu Zissulescu Date: Mon, 27 Mar 2017 12:56:35 +0200 Subject: [ARC] Fix divdf3 emulation for arcem. libgcc/ 2017-02-27 Claudiu Zissulescu * config/arc/ieee-754/divdf3.S (__divdf3): Use __ARCEM__. From-SVN: r246498 --- libgcc/ChangeLog | 4 ++++ libgcc/config/arc/ieee-754/divdf3.S | 8 ++++---- 2 files changed, 8 insertions(+), 4 deletions(-) (limited to 'libgcc') diff --git a/libgcc/ChangeLog b/libgcc/ChangeLog index 4bae69f..ada1365 100644 --- a/libgcc/ChangeLog +++ b/libgcc/ChangeLog @@ -1,3 +1,7 @@ +2017-03-27 Claudiu Zissulescu + + * config/arc/ieee-754/divdf3.S (__divdf3): Use __ARCEM__. + 2017-03-10 John Marino * config/aarch64/freebsd-unwind.h: New file. diff --git a/libgcc/config/arc/ieee-754/divdf3.S b/libgcc/config/arc/ieee-754/divdf3.S index 4d6aae2..b8085a6 100644 --- a/libgcc/config/arc/ieee-754/divdf3.S +++ b/libgcc/config/arc/ieee-754/divdf3.S @@ -189,13 +189,13 @@ __divdf3: asl r8,DBL1H,12 lsr r12,DBL1L,20 lsr r4,r8,26 -#ifdef __HS__ +#if defined (__ARCHS__) || defined (__ARCEM__) add3 r10,pcl,60 ; (.Ldivtab-.) >> 3 #else add3 r10,pcl,59 ; (.Ldivtab-.) >> 3 #endif ld.as r4,[r10,r4] -#ifdef __HS__ +#if defined (__ARCHS__) || defined (__ARCEM__) ld.as r9,[pcl,182]; [pcl,(-((.-.L7ff00000) >> 2))] ; 0x7ff00000 #else ld.as r9,[pcl,180]; [pcl,(-((.-.L7ff00000) >> 2))] ; 0x7ff00000 @@ -299,14 +299,14 @@ __divdf3: rsub r7,r6,5 asr r10,r12,28 bmsk r4,r12,27 -#ifdef __HS__ +#if defined (__ARCHS__) || defined (__ARCEM__) min r7, r7, 31 asr DBL0L, r4, r7 #else asrs DBL0L,r4,r7 #endif add DBL1H,r11,r10 -#ifdef __HS__ +#if defined (__ARCHS__) || defined (__ARCEM__) abs.f r10, r4 sub.mi r10, r10, 1 #endif -- cgit v1.1 From 5764ee3c8491e3ecff855a319f781a66fca2484e Mon Sep 17 00:00:00 2001 From: Jonathan Wakely Date: Mon, 3 Apr 2017 23:30:56 +0100 Subject: 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 --- libgcc/ChangeLog | 4 ++++ libgcc/config/c6x/pr-support.c | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) (limited to 'libgcc') diff --git a/libgcc/ChangeLog b/libgcc/ChangeLog index ada1365..87fea5b 100644 --- a/libgcc/ChangeLog +++ b/libgcc/ChangeLog @@ -1,3 +1,7 @@ +2017-04-03 Jonathan Wakely + + * config/c6x/pr-support.c (__gnu_unwind_execute): Fix typo in comment. + 2017-03-27 Claudiu Zissulescu * config/arc/ieee-754/divdf3.S (__divdf3): Use __ARCEM__. diff --git a/libgcc/config/c6x/pr-support.c b/libgcc/config/c6x/pr-support.c index 6731850..f1ab7ad 100644 --- a/libgcc/config/c6x/pr-support.c +++ b/libgcc/config/c6x/pr-support.c @@ -449,7 +449,7 @@ __gnu_unwind_execute (_Unwind_Context * context, __gnu_unwind_state * uws) if ((op & 0xf0) == 0xe0) { - /* B3 = reg. RETURN case alreadh handled above. */ + /* B3 = reg. RETURN case already handled above. */ int regno = unwind_frame_regs[op & 0xf]; _Unwind_VRS_Get (context, _UVRSC_CORE, regno, _UVRSD_UINT32, ®); -- cgit v1.1 From 2bdf7fc6e6a1c68847539cee4c93a472d55fa04e Mon Sep 17 00:00:00 2001 From: Alan Modra Date: Fri, 7 Apr 2017 11:00:43 +0930 Subject: [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 --- libgcc/ChangeLog | 5 +++++ libgcc/config/rs6000/t-crtstuff | 5 ++++- 2 files changed, 9 insertions(+), 1 deletion(-) (limited to 'libgcc') diff --git a/libgcc/ChangeLog b/libgcc/ChangeLog index 87fea5b..427328d 100644 --- a/libgcc/ChangeLog +++ b/libgcc/ChangeLog @@ -1,3 +1,8 @@ +2017-04-07 Alan Modra + + PR target/45053 + * config/rs6000/t-crtstuff (CRTSTUFF_T_CFLAGS): Add -O2. + 2017-04-03 Jonathan Wakely * config/c6x/pr-support.c (__gnu_unwind_execute): Fix typo in comment. diff --git a/libgcc/config/rs6000/t-crtstuff b/libgcc/config/rs6000/t-crtstuff index 7422d383..0b2601b 100644 --- a/libgcc/config/rs6000/t-crtstuff +++ b/libgcc/config/rs6000/t-crtstuff @@ -1,3 +1,6 @@ # If .sdata is enabled __CTOR_{LIST,END}__ go into .sdata instead of # .ctors. -CRTSTUFF_T_CFLAGS = -msdata=none +# Do not build crtend.o with -Os as that can result in references to +# out-of-line register save/restore functions, which may be unresolved +# as crtend.o is linked after libgcc.a. See PR45053. +CRTSTUFF_T_CFLAGS = -msdata=none -O2 -- cgit v1.1 From 29d8aae6bdb1fba656e0c4f768743015c96bc238 Mon Sep 17 00:00:00 2001 From: Jeff Law Date: Fri, 7 Apr 2017 10:11:57 -0600 Subject: 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 --- libgcc/ChangeLog | 6 ++++++ libgcc/Makefile.in | 5 +++-- libgcc/config/sh/t-sh | 2 +- 3 files changed, 10 insertions(+), 3 deletions(-) (limited to 'libgcc') diff --git a/libgcc/ChangeLog b/libgcc/ChangeLog index 427328d..1dc5469 100644 --- a/libgcc/ChangeLog +++ b/libgcc/ChangeLog @@ -1,3 +1,9 @@ +2017-04-07 Jeff Law + + * 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. + 2017-04-07 Alan Modra PR target/45053 diff --git a/libgcc/Makefile.in b/libgcc/Makefile.in index f71d320..6f58fd4 100644 --- a/libgcc/Makefile.in +++ b/libgcc/Makefile.in @@ -348,8 +348,6 @@ LIBUNWIND = SHLIBUNWIND_LINK = SHLIBUNWIND_INSTALL = -tmake_file = @tmake_file@ -include $(srcdir)/empty.mk $(tmake_file) # Create links to files specified in config.host. LIBGCC_LINKS = enable-execute-stack.c unwind.h md-unwind-support.h \ @@ -366,6 +364,9 @@ sfp-machine.h: $(srcdir)/config/$(sfp_machine_header) gthr-default.h: $(srcdir)/$(thread_header) -$(LN_S) $< $@ +tmake_file = @tmake_file@ +include $(srcdir)/empty.mk $(tmake_file) + # Collect target defines and headers from config.host. libgcc_tm_defines = @tm_defines@ libgcc_tm_file = @tm_file@ diff --git a/libgcc/config/sh/t-sh b/libgcc/config/sh/t-sh index 46d01a6..10869c4 100644 --- a/libgcc/config/sh/t-sh +++ b/libgcc/config/sh/t-sh @@ -45,7 +45,7 @@ sdivsi3_i4i-Os-4-200.o: $(srcdir)/config/sh/lib1funcs-Os-4-200.S $(gcc_compile) -c -DL_sdivsi3_i4i $< udivsi3_i4i-Os-4-200.o: $(srcdir)/config/sh/lib1funcs-Os-4-200.S $(gcc_compile) -c -DL_udivsi3_i4i $< -unwind-dw2-Os-4-200.o: $(srcdir)/unwind-dw2.c +unwind-dw2-Os-4-200.o: $(srcdir)/unwind-dw2.c $(LIBGCC_LINKS) $(gcc_compile) $(LIBGCC2_CFLAGS) $(vis_hide) -fexceptions -Os -c $< OBJS_Os_4_200=sdivsi3_i4i-Os-4-200.o udivsi3_i4i-Os-4-200.o unwind-dw2-Os-4-200.o -- cgit v1.1 From 6397118495f65a03a0d13114cf2c72d4a66f9cb1 Mon Sep 17 00:00:00 2001 From: Martin Liska Date: Tue, 18 Apr 2017 09:24:20 +0200 Subject: Validate that destination gcov file does not exist for gcov-tool (PR gcov-profile/78783). 2017-04-18 Martin Liska PR gcov-profile/78783 * libgcov-driver.c (gcov_get_filename): New function. 2017-04-18 Martin Liska 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 --- libgcc/ChangeLog | 5 +++++ libgcc/libgcov-driver.c | 9 +++++++++ 2 files changed, 14 insertions(+) (limited to 'libgcc') diff --git a/libgcc/ChangeLog b/libgcc/ChangeLog index 1dc5469..593cd09 100644 --- a/libgcc/ChangeLog +++ b/libgcc/ChangeLog @@ -1,3 +1,8 @@ +2017-04-18 Martin Liska + + PR gcov-profile/78783 + * libgcov-driver.c (gcov_get_filename): New function. + 2017-04-07 Jeff Law * Makefile.in: Swap definition of LIBGCC_LINKS and inclusion of diff --git a/libgcc/libgcov-driver.c b/libgcc/libgcov-driver.c index 70fe69f..c3b2fd4 100644 --- a/libgcc/libgcov-driver.c +++ b/libgcc/libgcov-driver.c @@ -852,6 +852,15 @@ gcov_do_dump (struct gcov_info *list, int run_counted) free (gf.filename); } +#if IN_GCOV_TOOL +const char * +__attribute__ ((unused)) +gcov_get_filename (struct gcov_info *list) +{ + return list->filename; +} +#endif + #if !IN_GCOV_TOOL void __gcov_dump_one (struct gcov_root *root) -- cgit v1.1 From 46928a8fda6ed2673ab4eb598060f03278d87af4 Mon Sep 17 00:00:00 2001 From: Martin Liska Date: Wed, 19 Apr 2017 10:08:44 +0200 Subject: Introduce gcov.h header file (PR gcov-profile/80435). 2017-04-19 Martin Liska 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 --- libgcc/ChangeLog | 8 ++++++++ libgcc/Makefile.in | 15 ++++++++++----- libgcc/gcov.h | 41 +++++++++++++++++++++++++++++++++++++++++ libgcc/libgcov.h | 6 +----- 4 files changed, 60 insertions(+), 10 deletions(-) create mode 100644 libgcc/gcov.h (limited to 'libgcc') diff --git a/libgcc/ChangeLog b/libgcc/ChangeLog index 593cd09..272c829 100644 --- a/libgcc/ChangeLog +++ b/libgcc/ChangeLog @@ -1,3 +1,11 @@ +2017-04-19 Martin Liska + + PR gcov-profile/80435 + * Makefile.in: Install gcov.h. + * gcov.h: New file. + * libgcov.h: Use the header and make __gcov_flush publicly + visible. + 2017-04-18 Martin Liska PR gcov-profile/78783 diff --git a/libgcc/Makefile.in b/libgcc/Makefile.in index 6f58fd4..a1a392d 100644 --- a/libgcc/Makefile.in +++ b/libgcc/Makefile.in @@ -907,14 +907,14 @@ libgcov-driver-objects = $(patsubst %,%$(objext),$(LIBGCOV_DRIVER)) libgcov-objects = $(libgcov-merge-objects) $(libgcov-profiler-objects) \ $(libgcov-interface-objects) $(libgcov-driver-objects) -$(libgcov-merge-objects): %$(objext): $(srcdir)/libgcov-merge.c $(srcdir)/libgcov.h +$(libgcov-merge-objects): %$(objext): $(srcdir)/libgcov-merge.c $(srcdir)/gcov.h $(srcdir)/libgcov.h $(gcc_compile) -DL$* -c $(srcdir)/libgcov-merge.c -$(libgcov-profiler-objects): %$(objext): $(srcdir)/libgcov-profiler.c $(srcdir)/libgcov.h +$(libgcov-profiler-objects): %$(objext): $(srcdir)/libgcov-profiler.c $(srcdir)/gcov.h $(srcdir)/libgcov.h $(gcc_compile) -DL$* -c $(srcdir)/libgcov-profiler.c -$(libgcov-interface-objects): %$(objext): $(srcdir)/libgcov-interface.c $(srcdir)/libgcov.h +$(libgcov-interface-objects): %$(objext): $(srcdir)/libgcov-interface.c $(srcdir)/gcov.h $(srcdir)/libgcov.h $(gcc_compile) -DL$* -c $(srcdir)/libgcov-interface.c $(libgcov-driver-objects): %$(objext): $(srcdir)/libgcov-driver.c \ - $(srcdir)/libgcov-driver-system.c $(srcdir)/libgcov.h + $(srcdir)/libgcov-driver-system.c $(srcdir)/gcov.h $(srcdir)/libgcov.h $(gcc_compile) -DL$* -c $(srcdir)/libgcov-driver.c @@ -1114,6 +1114,10 @@ install-unwind_h: all: install-unwind_h-forbuild +install-gcov_h: + $(mkinstalldirs) $(DESTDIR)$(libsubdir)/include + $(INSTALL_DATA) $(srcdir)/gcov.h $(DESTDIR)$(libsubdir)/include + # Documentation targets (empty). .PHONY: info html dvi pdf install-info install-html install-pdf @@ -1171,13 +1175,14 @@ install-leaf: $(install-shared) $(install-libunwind) esac; \ done -install: install-leaf install-unwind_h +install: install-leaf install-unwind_h install-gcov_h @: $(MAKE) ; $(MULTIDO) $(FLAGS_TO_PASS) multi-do DO=install install-strip: install .PHONY: install install-shared install-libunwind install-strip .PHONY: install-unwind_h install-unwind_h-forbuild +.PHONY: install-gcov_h # Don't export variables to the environment, in order to not confuse # configure. diff --git a/libgcc/gcov.h b/libgcc/gcov.h new file mode 100644 index 0000000..0333ecc --- /dev/null +++ b/libgcc/gcov.h @@ -0,0 +1,41 @@ +/* GCOV interface routines. + Copyright (C) 2017 Free Software Foundation, Inc. + + This file is part of GCC. + + GCC is free software; you can redistribute it and/or modify it under + the terms of the GNU General Public License as published by the Free + Software Foundation; either version 3, or (at your option) any later + version. + + GCC is distributed in the hope that it will be useful, but WITHOUT ANY + WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + Under Section 7 of GPL version 3, you are granted additional + permissions described in the GCC Runtime Library Exception, version + 3.1, as published by the Free Software Foundation. + + You should have received a copy of the GNU General Public License and + a copy of the GCC Runtime Library Exception along with this program; + see the files COPYING3 and COPYING.RUNTIME respectively. If not, see + . */ + +#ifndef GCC_GCOV_H +#define GCC_GCOV_H + +/* Set all counters to zero. */ + +extern void __gcov_reset (void); + +/* Write profile information to a file. */ + +extern void __gcov_dump (void); + +/* Write profile information to a file and reset counters to zero. + The function does operations under a mutex. */ + +extern void __gcov_flush (void); + +#endif /* GCC_GCOV_H */ diff --git a/libgcc/libgcov.h b/libgcc/libgcov.h index 6118fe9..4c1204c 100644 --- a/libgcc/libgcov.h +++ b/libgcc/libgcov.h @@ -42,6 +42,7 @@ #include "coretypes.h" #include "tm.h" #include "libgcc_tm.h" +#include "gcov.h" #if __CHAR_BIT__ == 8 typedef unsigned gcov_unsigned_t __attribute__ ((mode (SI))); @@ -237,16 +238,11 @@ extern void __gcov_init (struct gcov_info *) ATTRIBUTE_HIDDEN; /* GCOV exit function registered via a static destructor. */ extern void __gcov_exit (void) ATTRIBUTE_HIDDEN; -/* Called before fork, to avoid double counting. */ -extern void __gcov_flush (void) ATTRIBUTE_HIDDEN; - /* Function to reset all counters to 0. Both externally visible (and overridable) and internal version. */ -extern void __gcov_reset (void); extern void __gcov_reset_int (void) ATTRIBUTE_HIDDEN; /* User function to enable early write of profile information so far. */ -extern void __gcov_dump (void); extern void __gcov_dump_int (void) ATTRIBUTE_HIDDEN; /* The merge function that just sums the counters. */ -- cgit v1.1 From 7ab8766a8e316026c592a2fdbcb342fef7bb887b Mon Sep 17 00:00:00 2001 From: Joshua Conner Date: Sat, 6 May 2017 00:22:38 +0000 Subject: Add fuchsia support to libgcc * 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 --- libgcc/ChangeLog | 8 ++++++++ libgcc/config.host | 17 ++++++++++++++++ libgcc/config/arm/unwind-arm.h | 2 +- libgcc/config/t-slibgcc-fuchsia | 44 +++++++++++++++++++++++++++++++++++++++++ 4 files changed, 70 insertions(+), 1 deletion(-) create mode 100644 libgcc/config/t-slibgcc-fuchsia (limited to 'libgcc') diff --git a/libgcc/ChangeLog b/libgcc/ChangeLog index 272c829..2e0f7fc 100644 --- a/libgcc/ChangeLog +++ b/libgcc/ChangeLog @@ -1,3 +1,11 @@ +2017-05-05 Joshua Conner + + * 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. + 2017-04-19 Martin Liska PR gcov-profile/80435 diff --git a/libgcc/config.host b/libgcc/config.host index b279a64..1426b04 100644 --- a/libgcc/config.host +++ b/libgcc/config.host @@ -231,6 +231,10 @@ case ${host} in ;; esac ;; +*-*-fuchsia*) + tmake_file="$tmake_file t-crtstuff-pic t-libgcc-pic t-eh-dw2-dip t-slibgcc t-slibgcc-fuchsia" + extra_parts="crtbegin.o crtend.o" + ;; *-*-linux* | frv-*-*linux* | *-*-kfreebsd*-gnu | *-*-gnu* | *-*-kopensolaris*-gnu) tmake_file="$tmake_file t-crtstuff-pic t-libgcc-pic t-eh-dw2-dip t-slibgcc t-slibgcc-gld t-slibgcc-elf-ver t-linux" extra_parts="crtbegin.o crtbeginS.o crtbeginT.o crtend.o crtendS.o" @@ -342,6 +346,10 @@ aarch64*-*-freebsd*) tmake_file="${tmake_file} ${cpu_type}/t-softfp t-softfp t-crtfm" md_unwind_header=aarch64/freebsd-unwind.h ;; +aarch64*-*-fuchsia*) + tmake_file="${tmake_file} ${cpu_type}/t-aarch64" + tmake_file="${tmake_file} ${cpu_type}/t-softfp t-softfp" + ;; aarch64*-*-linux*) extra_parts="$extra_parts crtfastmath.o" md_unwind_header=aarch64/linux-unwind.h @@ -394,6 +402,12 @@ arm*-*-freebsd*) # ARM FreeBSD EABI unwind_header=config/arm/unwind-arm.h tmake_file="${tmake_file} t-softfp-sfdf t-softfp-excl arm/t-softfp t-softfp" ;; +arm*-*-fuchsia*) + tmake_file="${tmake_file} arm/t-arm arm/t-elf arm/t-bpabi" + tmake_file="${tmake_file} arm/tsoftfp t-softfp" + tm_file="${tm_file} arm/bpabi-lib.h" + unwind_header=config/arm/unwind-arm.h + ;; arm*-*-netbsdelf*) tmake_file="$tmake_file arm/t-arm arm/t-netbsd t-slibgcc-gld-nover" ;; @@ -588,6 +602,9 @@ i[34567]86-*-elf*) x86_64-*-elf* | x86_64-*-rtems*) tmake_file="$tmake_file i386/t-crtstuff t-crtstuff-pic t-libgcc-pic" ;; +x86_64-*-fuchsia*) + tmake_file="$tmake_file t-libgcc-pic" + ;; i[34567]86-*-dragonfly*) tmake_file="${tmake_file} i386/t-dragonfly i386/t-crtstuff" md_unwind_header=i386/dragonfly-unwind.h diff --git a/libgcc/config/arm/unwind-arm.h b/libgcc/config/arm/unwind-arm.h index 9fb854f..9ceec54 100644 --- a/libgcc/config/arm/unwind-arm.h +++ b/libgcc/config/arm/unwind-arm.h @@ -49,7 +49,7 @@ extern "C" { return 0; #if (defined(linux) && !defined(__uClinux__)) || defined(__NetBSD__) \ - || defined(__FreeBSD__) + || defined(__FreeBSD__) || defined(__fuchsia__) /* Pc-relative indirect. */ #define _GLIBCXX_OVERRIDE_TTYPE_ENCODING (DW_EH_PE_pcrel | DW_EH_PE_indirect) tmp += ptr; diff --git a/libgcc/config/t-slibgcc-fuchsia b/libgcc/config/t-slibgcc-fuchsia new file mode 100644 index 0000000..a171283 --- /dev/null +++ b/libgcc/config/t-slibgcc-fuchsia @@ -0,0 +1,44 @@ +# Copyright (C) 2017 Free Software Foundation, Inc. +# +# This file is part of GCC. +# +# GCC is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3, or (at your option) +# any later version. +# +# GCC is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with GCC; see the file COPYING3. If not see +# . + +# Fuchsia-specific shared library overrides. + +SHLIB_LDFLAGS = -Wl,--soname=$(SHLIB_SONAME) \ + $(LDFLAGS) +# Copyright (C) 2017 Free Software Foundation, Inc. +# +# This file is part of GCC. +# +# GCC is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3, or (at your option) +# any later version. +# +# GCC is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with GCC; see the file COPYING3. If not see +# . + +# Fuchsia-specific shared library overrides. + +SHLIB_LDFLAGS = -Wl,--soname=$(SHLIB_SONAME) \ + $(LDFLAGS) -- cgit v1.1 From 8ef2b9a7b59418d9f5e644badbc0aade7f83414f Mon Sep 17 00:00:00 2001 From: Andreas Tobler Date: Tue, 9 May 2017 22:37:25 +0200 Subject: config.host: Use the generic FreeBSD t-slibgcc-elf-ver for arm*-*-freebsd* instead of the... 2017-05-09 Andreas Tobler * config.host: Use the generic FreeBSD t-slibgcc-elf-ver for arm*-*-freebsd* instead of the t-slibgcc-libgcc. From-SVN: r247812 --- libgcc/ChangeLog | 5 +++++ libgcc/config.host | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) (limited to 'libgcc') diff --git a/libgcc/ChangeLog b/libgcc/ChangeLog index 2e0f7fc..75dba40 100644 --- a/libgcc/ChangeLog +++ b/libgcc/ChangeLog @@ -1,3 +1,8 @@ +2017-05-09 Andreas Tobler + + * config.host: Use the generic FreeBSD t-slibgcc-elf-ver for + arm*-*-freebsd* instead of the t-slibgcc-libgcc. + 2017-05-05 Joshua Conner * config/arm/unwind-arm.h (_Unwind_decode_typeinfo_ptr): Use diff --git a/libgcc/config.host b/libgcc/config.host index 1426b04..6640afb 100644 --- a/libgcc/config.host +++ b/libgcc/config.host @@ -397,7 +397,7 @@ arm-wrs-vxworks) ;; arm*-*-freebsd*) # ARM FreeBSD EABI tmake_file="${tmake_file} arm/t-arm t-fixedpoint-gnu-prefix arm/t-elf" - tmake_file="${tmake_file} arm/t-bpabi arm/t-freebsd t-slibgcc-libgcc" + tmake_file="${tmake_file} arm/t-bpabi arm/t-freebsd" tm_file="${tm_file} arm/bpabi-lib.h" unwind_header=config/arm/unwind-arm.h tmake_file="${tmake_file} t-softfp-sfdf t-softfp-excl arm/t-softfp t-softfp" -- cgit v1.1 From d6d4d7701a4c40f4c46904292456b76502e1ae63 Mon Sep 17 00:00:00 2001 From: Daniel Santos Date: Sun, 14 May 2017 12:22:08 +0200 Subject: i386.opt: Add option -mcall-ms2sysv-xlogues. 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): New pattern. (save_multiple_realign): Likewise. (restore_multiple): Likewise. (restore_multiple_and_return): Likewise. (restore_multiple_leave_return): 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 --- libgcc/ChangeLog | 14 +++++++- libgcc/config.host | 2 +- libgcc/config/i386/i386-asm.h | 82 ++++++++++++++++++++++++++++++++++++++++++ libgcc/config/i386/resms64.S | 57 +++++++++++++++++++++++++++++ libgcc/config/i386/resms64f.S | 55 ++++++++++++++++++++++++++++ libgcc/config/i386/resms64fx.S | 57 +++++++++++++++++++++++++++++ libgcc/config/i386/resms64x.S | 59 ++++++++++++++++++++++++++++++ libgcc/config/i386/savms64.S | 57 +++++++++++++++++++++++++++++ libgcc/config/i386/savms64f.S | 55 ++++++++++++++++++++++++++++ libgcc/config/i386/t-msabi | 7 ++++ 10 files changed, 443 insertions(+), 2 deletions(-) create mode 100644 libgcc/config/i386/i386-asm.h create mode 100644 libgcc/config/i386/resms64.S create mode 100644 libgcc/config/i386/resms64f.S create mode 100644 libgcc/config/i386/resms64fx.S create mode 100644 libgcc/config/i386/resms64x.S create mode 100644 libgcc/config/i386/savms64.S create mode 100644 libgcc/config/i386/savms64f.S create mode 100644 libgcc/config/i386/t-msabi (limited to 'libgcc') diff --git a/libgcc/ChangeLog b/libgcc/ChangeLog index 75dba40..13bdd94 100644 --- a/libgcc/ChangeLog +++ b/libgcc/ChangeLog @@ -1,3 +1,15 @@ +2017-05-14 Daniel Santos + + * 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. + 2017-05-09 Andreas Tobler * config.host: Use the generic FreeBSD t-slibgcc-elf-ver for @@ -9,7 +21,7 @@ pc-relative indirect handling for fuchsia. * config/t-slibgcc-fuchsia: New file. * config.host (*-*-fuchsia*, aarch64*-*-fuchsia*, arm*-*-fuchsia*, - x86_64-*-fuchsia*): Add definitions. + x86_64-*-fuchsia*): Add definitions. 2017-04-19 Martin Liska diff --git a/libgcc/config.host b/libgcc/config.host index 6640afb..466b855 100644 --- a/libgcc/config.host +++ b/libgcc/config.host @@ -1368,7 +1368,7 @@ case ${host} in i[34567]86-*-linux* | x86_64-*-linux* | \ i[34567]86-*-kfreebsd*-gnu | x86_64-*-kfreebsd*-gnu | \ i[34567]86-*-gnu*) - tmake_file="${tmake_file} t-tls i386/t-linux t-slibgcc-libgcc" + tmake_file="${tmake_file} t-tls i386/t-linux i386/t-msabi t-slibgcc-libgcc" if test "$libgcc_cv_cfi" = "yes"; then tmake_file="${tmake_file} t-stack i386/t-stack-i386" fi diff --git a/libgcc/config/i386/i386-asm.h b/libgcc/config/i386/i386-asm.h new file mode 100644 index 0000000..c613e9f --- /dev/null +++ b/libgcc/config/i386/i386-asm.h @@ -0,0 +1,82 @@ +/* Defines common perprocessor and assembly macros for use by various stubs. + Copyright (C) 2016-2017 Free Software Foundation, Inc. + Contributed by Daniel Santos + +This file is part of GCC. + +GCC is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 3, or (at your option) +any later version. + +GCC is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +Under Section 7 of GPL version 3, you are granted additional +permissions described in the GCC Runtime Library Exception, version +3.1, as published by the Free Software Foundation. + +You should have received a copy of the GNU General Public License and +a copy of the GCC Runtime Library Exception along with this program; +see the files COPYING3 and COPYING.RUNTIME respectively. If not, see +. */ + +#ifndef I386_ASM_H +#define I386_ASM_H + +#ifdef __ELF__ +# define ELFFN(fn) .type fn,@function +#else +# define ELFFN(fn) +#endif + +#define FUNC_START(fn) \ + .global fn; \ + ELFFN (fn); \ +fn: + +#define HIDDEN_FUNC(fn)\ + FUNC_START (fn) \ + .hidden fn; \ + +#define FUNC_END(fn) .size fn,.-fn + +#ifdef __SSE2__ +# ifdef __AVX__ +# define MOVAPS vmovaps +# else +# define MOVAPS movaps +# endif + +/* Save SSE registers 6-15. off is the offset of rax to get to xmm6. */ +.macro SSE_SAVE off=0 + MOVAPS %xmm15,(\off - 0x90)(%rax) + MOVAPS %xmm14,(\off - 0x80)(%rax) + MOVAPS %xmm13,(\off - 0x70)(%rax) + MOVAPS %xmm12,(\off - 0x60)(%rax) + MOVAPS %xmm11,(\off - 0x50)(%rax) + MOVAPS %xmm10,(\off - 0x40)(%rax) + MOVAPS %xmm9, (\off - 0x30)(%rax) + MOVAPS %xmm8, (\off - 0x20)(%rax) + MOVAPS %xmm7, (\off - 0x10)(%rax) + MOVAPS %xmm6, \off(%rax) +.endm + +/* Restore SSE registers 6-15. off is the offset of rsi to get to xmm6. */ +.macro SSE_RESTORE off=0 + MOVAPS (\off - 0x90)(%rsi), %xmm15 + MOVAPS (\off - 0x80)(%rsi), %xmm14 + MOVAPS (\off - 0x70)(%rsi), %xmm13 + MOVAPS (\off - 0x60)(%rsi), %xmm12 + MOVAPS (\off - 0x50)(%rsi), %xmm11 + MOVAPS (\off - 0x40)(%rsi), %xmm10 + MOVAPS (\off - 0x30)(%rsi), %xmm9 + MOVAPS (\off - 0x20)(%rsi), %xmm8 + MOVAPS (\off - 0x10)(%rsi), %xmm7 + MOVAPS \off(%rsi), %xmm6 +.endm + +#endif /* __SSE2__ */ +#endif /* I386_ASM_H */ diff --git a/libgcc/config/i386/resms64.S b/libgcc/config/i386/resms64.S new file mode 100644 index 0000000..f47e2f0 --- /dev/null +++ b/libgcc/config/i386/resms64.S @@ -0,0 +1,57 @@ +/* Epilogue stub for 64-bit ms/sysv clobbers: restore + Copyright (C) 2016-2017 Free Software Foundation, Inc. + Contributed by Daniel Santos + +This file is part of GCC. + +GCC is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 3, or (at your option) +any later version. + +GCC is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +Under Section 7 of GPL version 3, you are granted additional +permissions described in the GCC Runtime Library Exception, version +3.1, as published by the Free Software Foundation. + +You should have received a copy of the GNU General Public License and +a copy of the GCC Runtime Library Exception along with this program; +see the files COPYING3 and COPYING.RUNTIME respectively. If not, see +. */ + +#ifdef __x86_64__ +#include "i386-asm.h" + +/* Epilogue routine for restoring 64-bit ms/sysv registers. */ + + .text +HIDDEN_FUNC(__resms64_18) + mov -0x70(%rsi),%r15 +HIDDEN_FUNC(__resms64_17) + mov -0x68(%rsi),%r14 +HIDDEN_FUNC(__resms64_16) + mov -0x60(%rsi),%r13 +HIDDEN_FUNC(__resms64_15) + mov -0x58(%rsi),%r12 +HIDDEN_FUNC(__resms64_14) + mov -0x50(%rsi),%rbp +HIDDEN_FUNC(__resms64_13) + mov -0x48(%rsi),%rbx +HIDDEN_FUNC(__resms64_12) + mov -0x40(%rsi),%rdi + SSE_RESTORE off=0x60 + mov -0x38(%rsi),%rsi + ret +FUNC_END(__resms64_12) +FUNC_END(__resms64_13) +FUNC_END(__resms64_14) +FUNC_END(__resms64_15) +FUNC_END(__resms64_16) +FUNC_END(__resms64_17) +FUNC_END(__resms64_18) + +#endif /* __x86_64__ */ diff --git a/libgcc/config/i386/resms64f.S b/libgcc/config/i386/resms64f.S new file mode 100644 index 0000000..817da60 --- /dev/null +++ b/libgcc/config/i386/resms64f.S @@ -0,0 +1,55 @@ +/* Epilogue stub for 64-bit ms/sysv clobbers: restore (with hard frame pointer) + Copyright (C) 2016-2017 Free Software Foundation, Inc. + Contributed by Daniel Santos + +This file is part of GCC. + +GCC is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 3, or (at your option) +any later version. + +GCC is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +Under Section 7 of GPL version 3, you are granted additional +permissions described in the GCC Runtime Library Exception, version +3.1, as published by the Free Software Foundation. + +You should have received a copy of the GNU General Public License and +a copy of the GCC Runtime Library Exception along with this program; +see the files COPYING3 and COPYING.RUNTIME respectively. If not, see +. */ + +#ifdef __x86_64__ +#include "i386-asm.h" + +/* Epilogue routine for restoring 64-bit ms/sysv registers when hard frame + pointer is used. */ + + .text +HIDDEN_FUNC(__resms64f_17) + mov -0x68(%rsi),%r15 +HIDDEN_FUNC(__resms64f_16) + mov -0x60(%rsi),%r14 +HIDDEN_FUNC(__resms64f_15) + mov -0x58(%rsi),%r13 +HIDDEN_FUNC(__resms64f_14) + mov -0x50(%rsi),%r12 +HIDDEN_FUNC(__resms64f_13) + mov -0x48(%rsi),%rbx +HIDDEN_FUNC(__resms64f_12) + mov -0x40(%rsi),%rdi + SSE_RESTORE off=0x60 + mov -0x38(%rsi),%rsi + ret +FUNC_END(__resms64f_12) +FUNC_END(__resms64f_13) +FUNC_END(__resms64f_14) +FUNC_END(__resms64f_15) +FUNC_END(__resms64f_16) +FUNC_END(__resms64f_17) + +#endif /* __x86_64__ */ diff --git a/libgcc/config/i386/resms64fx.S b/libgcc/config/i386/resms64fx.S new file mode 100644 index 0000000..5dba584 --- /dev/null +++ b/libgcc/config/i386/resms64fx.S @@ -0,0 +1,57 @@ +/* Epilogue stub for 64-bit ms/sysv clobbers: restore, leave and return + Copyright (C) 2016-2017 Free Software Foundation, Inc. + Contributed by Daniel Santos + +This file is part of GCC. + +GCC is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 3, or (at your option) +any later version. + +GCC is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +Under Section 7 of GPL version 3, you are granted additional +permissions described in the GCC Runtime Library Exception, version +3.1, as published by the Free Software Foundation. + +You should have received a copy of the GNU General Public License and +a copy of the GCC Runtime Library Exception along with this program; +see the files COPYING3 and COPYING.RUNTIME respectively. If not, see +. */ + +#ifdef __x86_64__ +#include "i386-asm.h" + +/* Epilogue routine for 64-bit ms/sysv registers when hard frame pointer + * used -- restores registers, restores frame pointer and then returns + * from the function. */ + + .text +HIDDEN_FUNC(__resms64fx_17) + mov -0x68(%rsi),%r15 +HIDDEN_FUNC(__resms64fx_16) + mov -0x60(%rsi),%r14 +HIDDEN_FUNC(__resms64fx_15) + mov -0x58(%rsi),%r13 +HIDDEN_FUNC(__resms64fx_14) + mov -0x50(%rsi),%r12 +HIDDEN_FUNC(__resms64fx_13) + mov -0x48(%rsi),%rbx +HIDDEN_FUNC(__resms64fx_12) + mov -0x40(%rsi),%rdi + SSE_RESTORE off=0x60 + mov -0x38(%rsi),%rsi + leaveq + ret +FUNC_END(__resms64fx_12) +FUNC_END(__resms64fx_13) +FUNC_END(__resms64fx_14) +FUNC_END(__resms64fx_15) +FUNC_END(__resms64fx_16) +FUNC_END(__resms64fx_17) + +#endif /* __x86_64__ */ diff --git a/libgcc/config/i386/resms64x.S b/libgcc/config/i386/resms64x.S new file mode 100644 index 0000000..7770447 --- /dev/null +++ b/libgcc/config/i386/resms64x.S @@ -0,0 +1,59 @@ +/* Epilogue stub for 64-bit ms/sysv clobbers: restore and return + Copyright (C) 2016-2017 Free Software Foundation, Inc. + Contributed by Daniel Santos + +This file is part of GCC. + +GCC is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 3, or (at your option) +any later version. + +GCC is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +Under Section 7 of GPL version 3, you are granted additional +permissions described in the GCC Runtime Library Exception, version +3.1, as published by the Free Software Foundation. + +You should have received a copy of the GNU General Public License and +a copy of the GCC Runtime Library Exception along with this program; +see the files COPYING3 and COPYING.RUNTIME respectively. If not, see +. */ + +#ifdef __x86_64__ +#include "i386-asm.h" + +/* Epilogue routine for restoring 64-bit ms/sysv registers and returning from + * function. */ + + .text +HIDDEN_FUNC(__resms64x_18) + mov -0x70(%rsi),%r15 +HIDDEN_FUNC(__resms64x_17) + mov -0x68(%rsi),%r14 +HIDDEN_FUNC(__resms64x_16) + mov -0x60(%rsi),%r13 +HIDDEN_FUNC(__resms64x_15) + mov -0x58(%rsi),%r12 +HIDDEN_FUNC(__resms64x_14) + mov -0x50(%rsi),%rbp +HIDDEN_FUNC(__resms64x_13) + mov -0x48(%rsi),%rbx +HIDDEN_FUNC(__resms64x_12) + mov -0x40(%rsi),%rdi + SSE_RESTORE off=0x60 + mov -0x38(%rsi),%rsi + mov %r10,%rsp + ret +FUNC_END(__resms64x_12) +FUNC_END(__resms64x_13) +FUNC_END(__resms64x_14) +FUNC_END(__resms64x_15) +FUNC_END(__resms64x_16) +FUNC_END(__resms64x_17) +FUNC_END(__resms64x_18) + +#endif /* __x86_64__ */ diff --git a/libgcc/config/i386/savms64.S b/libgcc/config/i386/savms64.S new file mode 100644 index 0000000..2067dd8 --- /dev/null +++ b/libgcc/config/i386/savms64.S @@ -0,0 +1,57 @@ +/* Prologue stub for 64-bit ms/sysv clobbers: save + Copyright (C) 2016-2017 Free Software Foundation, Inc. + Contributed by Daniel Santos + +This file is part of GCC. + +GCC is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 3, or (at your option) +any later version. + +GCC is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +Under Section 7 of GPL version 3, you are granted additional +permissions described in the GCC Runtime Library Exception, version +3.1, as published by the Free Software Foundation. + +You should have received a copy of the GNU General Public License and +a copy of the GCC Runtime Library Exception along with this program; +see the files COPYING3 and COPYING.RUNTIME respectively. If not, see +. */ + +#ifdef __x86_64__ +#include "i386-asm.h" + +/* Prologue routine for saving 64-bit ms/sysv registers. */ + + .text +HIDDEN_FUNC(__savms64_18) + mov %r15,-0x70(%rax) +HIDDEN_FUNC(__savms64_17) + mov %r14,-0x68(%rax) +HIDDEN_FUNC(__savms64_16) + mov %r13,-0x60(%rax) +HIDDEN_FUNC(__savms64_15) + mov %r12,-0x58(%rax) +HIDDEN_FUNC(__savms64_14) + mov %rbp,-0x50(%rax) +HIDDEN_FUNC(__savms64_13) + mov %rbx,-0x48(%rax) +HIDDEN_FUNC(__savms64_12) + mov %rdi,-0x40(%rax) + mov %rsi,-0x38(%rax) + SSE_SAVE off=0x60 + ret +FUNC_END(__savms64_12) +FUNC_END(__savms64_13) +FUNC_END(__savms64_14) +FUNC_END(__savms64_15) +FUNC_END(__savms64_16) +FUNC_END(__savms64_17) +FUNC_END(__savms64_18) + +#endif /* __x86_64__ */ diff --git a/libgcc/config/i386/savms64f.S b/libgcc/config/i386/savms64f.S new file mode 100644 index 0000000..81583b6 --- /dev/null +++ b/libgcc/config/i386/savms64f.S @@ -0,0 +1,55 @@ +/* Prologue stub for 64-bit ms/sysv clobbers: save (with hard frame pointer) + Copyright (C) 2016-2017 Free Software Foundation, Inc. + Contributed by Daniel Santos + +This file is part of GCC. + +GCC is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 3, or (at your option) +any later version. + +GCC is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +Under Section 7 of GPL version 3, you are granted additional +permissions described in the GCC Runtime Library Exception, version +3.1, as published by the Free Software Foundation. + +You should have received a copy of the GNU General Public License and +a copy of the GCC Runtime Library Exception along with this program; +see the files COPYING3 and COPYING.RUNTIME respectively. If not, see +. */ + +#ifdef __x86_64__ +#include "i386-asm.h" + +/* Prologue routine for saving 64-bit ms/sysv registers when realignment is + * needed or hard frame pointer used. */ + + .text +HIDDEN_FUNC(__savms64f_17) + mov %r15,-0x68(%rax) +HIDDEN_FUNC(__savms64f_16) + mov %r14,-0x60(%rax) +HIDDEN_FUNC(__savms64f_15) + mov %r13,-0x58(%rax) +HIDDEN_FUNC(__savms64f_14) + mov %r12,-0x50(%rax) +HIDDEN_FUNC(__savms64f_13) + mov %rbx,-0x48(%rax) +HIDDEN_FUNC(__savms64f_12) + mov %rdi,-0x40(%rax) + mov %rsi,-0x38(%rax) + SSE_SAVE off=0x60 + ret +FUNC_END(__savms64f_12) +FUNC_END(__savms64f_13) +FUNC_END(__savms64f_14) +FUNC_END(__savms64f_15) +FUNC_END(__savms64f_16) +FUNC_END(__savms64f_17) + +#endif /* __x86_64__ */ diff --git a/libgcc/config/i386/t-msabi b/libgcc/config/i386/t-msabi new file mode 100644 index 0000000..f9806a6 --- /dev/null +++ b/libgcc/config/i386/t-msabi @@ -0,0 +1,7 @@ +# Makefile fragment to support -mcall-ms2sysv-xlogues +LIB2ADD_ST += $(srcdir)/config/i386/savms64.S \ + $(srcdir)/config/i386/resms64.S \ + $(srcdir)/config/i386/resms64x.S \ + $(srcdir)/config/i386/savms64f.S \ + $(srcdir)/config/i386/resms64f.S \ + $(srcdir)/config/i386/resms64fx.S -- cgit v1.1 From eac8c9f2d3263e9f412f90044b1cfda2f979b723 Mon Sep 17 00:00:00 2001 From: Krister Walfridsson Date: Sun, 14 May 2017 22:49:03 +0000 Subject: PR target/80600 - hidden symbol '__cpu_model' is referenced by DSO 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 --- libgcc/ChangeLog | 5 +++++ libgcc/config.host | 1 + 2 files changed, 6 insertions(+) (limited to 'libgcc') diff --git a/libgcc/ChangeLog b/libgcc/ChangeLog index 13bdd94..c070a3d 100644 --- a/libgcc/ChangeLog +++ b/libgcc/ChangeLog @@ -1,3 +1,8 @@ +2017-05-14 Krister Walfridsson + + PR target/80600 + * config.host (*-*-netbsd*): Add t-slibgcc-libgcc to tmake_file. + 2017-05-14 Daniel Santos * config.host: Add i386/t-msabi to i386/t-linux file list. diff --git a/libgcc/config.host b/libgcc/config.host index 466b855..7711abf 100644 --- a/libgcc/config.host +++ b/libgcc/config.host @@ -249,6 +249,7 @@ case ${host} in *-*-netbsd*) tmake_file="$tmake_file t-crtstuff-pic t-libgcc-pic t-eh-dw2-dip" tmake_file="$tmake_file t-slibgcc t-slibgcc-gld t-slibgcc-elf-ver" + tmake_file="$tmake_file t-slibgcc-libgcc" # NetBSD 1.7 and later are set up to use GCC's crtstuff for # ELF configurations. We will clear extra_parts in the # a.out configurations. -- cgit v1.1 From c39d309a2551b68af40f88f024771c61d7644d1b Mon Sep 17 00:00:00 2001 From: Adhemerval Zanella Date: Mon, 15 May 2017 07:36:18 +0000 Subject: 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: r248043 --- libgcc/ChangeLog | 5 +++++ libgcc/config/sparc/lb1spc.S | 6 ++++++ 2 files changed, 11 insertions(+) (limited to 'libgcc') diff --git a/libgcc/ChangeLog b/libgcc/ChangeLog index c070a3d..b00a190 100644 --- a/libgcc/ChangeLog +++ b/libgcc/ChangeLog @@ -1,3 +1,8 @@ +2017-05-15 Adhemerval Zanella + + * config/sparc/lb1spc.S [__ELF__ && __linux__]: Emit .note.GNU-stack + section for a non-executable stack. + 2017-05-14 Krister Walfridsson PR target/80600 diff --git a/libgcc/config/sparc/lb1spc.S b/libgcc/config/sparc/lb1spc.S index b60bd57..e693864 100644 --- a/libgcc/config/sparc/lb1spc.S +++ b/libgcc/config/sparc/lb1spc.S @@ -5,6 +5,12 @@ slightly edited to match the desired calling convention, and also to optimize them for our purposes. */ +/* An executable stack is *not* required for these functions. */ +#if defined(__ELF__) && defined(__linux__) +.section .note.GNU-stack,"",%progbits +.previous +#endif + #ifdef L_mulsi3 .text .align 4 -- cgit v1.1 From 78eca3093f7f60295aac46d559b5f21f3154e6dd Mon Sep 17 00:00:00 2001 From: Andreas Tobler Date: Wed, 17 May 2017 22:54:39 +0200 Subject: unwind-arm.h: Make _Unwind_GetIP... 2017-05-17 Andreas Tobler * 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 --- libgcc/ChangeLog | 6 ++++++ libgcc/config/arm/unwind-arm.c | 22 ++++++++++++++++++++++ libgcc/config/arm/unwind-arm.h | 7 +++++++ 3 files changed, 35 insertions(+) (limited to 'libgcc') diff --git a/libgcc/ChangeLog b/libgcc/ChangeLog index b00a190..1d05cef 100644 --- a/libgcc/ChangeLog +++ b/libgcc/ChangeLog @@ -1,3 +1,9 @@ +2017-05-17 Andreas Tobler + + * 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. + 2017-05-15 Adhemerval Zanella * config/sparc/lb1spc.S [__ELF__ && __linux__]: Emit .note.GNU-stack diff --git a/libgcc/config/arm/unwind-arm.c b/libgcc/config/arm/unwind-arm.c index a3d7391..c6bfe13 100644 --- a/libgcc/config/arm/unwind-arm.c +++ b/libgcc/config/arm/unwind-arm.c @@ -509,3 +509,25 @@ __aeabi_unwind_cpp_pr2 (_Unwind_State state, { return __gnu_unwind_pr_common (state, ucbp, context, 2); } + +#ifdef __FreeBSD__ +/* FreeBSD expects these to be functions */ +inline _Unwind_Ptr +_Unwind_GetIP (struct _Unwind_Context *context) +{ + return _Unwind_GetGR (context, 15) & ~(_Unwind_Word)1; +} + +inline _Unwind_Ptr +_Unwind_GetIPInfo (struct _Unwind_Context *context, int *ip_before_insn) +{ + *ip_before_insn = 0; + return _Unwind_GetIP (context); +} + +inline void +_Unwind_SetIP (struct _Unwind_Context *context, _Unwind_Ptr val) +{ + _Unwind_SetGR (context, 15, val | (_Unwind_GetGR (context, 15) & 1)); +} +#endif diff --git a/libgcc/config/arm/unwind-arm.h b/libgcc/config/arm/unwind-arm.h index 9ceec54..037be34 100644 --- a/libgcc/config/arm/unwind-arm.h +++ b/libgcc/config/arm/unwind-arm.h @@ -72,12 +72,19 @@ extern "C" { { return _URC_FAILURE; } +#ifndef __FreeBSD__ /* Return the address of the instruction, not the actual IP value. */ #define _Unwind_GetIP(context) \ (_Unwind_GetGR (context, 15) & ~(_Unwind_Word)1) #define _Unwind_SetIP(context, val) \ _Unwind_SetGR (context, 15, val | (_Unwind_GetGR (context, 15) & 1)) +#else + #undef _Unwind_GetIPInfo + _Unwind_Ptr _Unwind_GetIP (struct _Unwind_Context *); + _Unwind_Ptr _Unwind_GetIPInfo (struct _Unwind_Context *, int *); + void _Unwind_SetIP (struct _Unwind_Context *, _Unwind_Ptr); +#endif #ifdef __cplusplus } /* extern "C" */ -- cgit v1.1 From 7d66e2655f500058cc7c82f855a23838af598ac5 Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Fri, 26 May 2017 11:45:59 -0700 Subject: re PR libgcc/80037 (Bad .eh_frame data in crtend.o) PR libgcc/80037 * config/alpha/t-alpha (CRTSTUFF_T_CFLAGS): New. From-SVN: r248522 --- libgcc/ChangeLog | 5 +++++ libgcc/config/alpha/t-alpha | 4 ++++ 2 files changed, 9 insertions(+) (limited to 'libgcc') diff --git a/libgcc/ChangeLog b/libgcc/ChangeLog index 1d05cef..8e807eb 100644 --- a/libgcc/ChangeLog +++ b/libgcc/ChangeLog @@ -1,3 +1,8 @@ +2017-05-26 Richard Henderson + + PR libgcc/80037 + * config/alpha/t-alpha (CRTSTUFF_T_CFLAGS): New. + 2017-05-17 Andreas Tobler * config/arm/unwind-arm.h: Make _Unwind_GetIP, _Unwind_GetIPInfo and diff --git a/libgcc/config/alpha/t-alpha b/libgcc/config/alpha/t-alpha index 0b6ffb1..0c2f840 100644 --- a/libgcc/config/alpha/t-alpha +++ b/libgcc/config/alpha/t-alpha @@ -1,2 +1,6 @@ # This is a support routine for longlong.h, used by libgcc2.c. LIB2ADD += $(srcdir)/config/alpha/qrnnd.S + +# When GAS-generated unwind tables are created, they get created +# after the __FRAME_END__ terminator, which causes an ld error. +CRTSTUFF_T_CFLAGS = -fno-unwind-tables -- cgit v1.1 From 5b2edf5314c7c8d69f2e38c1ce5aaf381a230b96 Mon Sep 17 00:00:00 2001 From: Olivier Hainque Date: Tue, 30 May 2017 12:37:39 +0000 Subject: t-vxworks (LIBGCC2_INCLUDES): Remove extraneous dollar sign before $(MULTIDIR). 2017-05-30 Olivier Hainque libgcc/ * config/t-vxworks (LIBGCC2_INCLUDES): Remove extraneous dollar sign before $(MULTIDIR). From-SVN: r248684 --- libgcc/ChangeLog | 5 +++++ libgcc/config/t-vxworks | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) (limited to 'libgcc') diff --git a/libgcc/ChangeLog b/libgcc/ChangeLog index 8e807eb..44c39ea 100644 --- a/libgcc/ChangeLog +++ b/libgcc/ChangeLog @@ -1,3 +1,8 @@ +2017-05-30 Olivier Hainque + + * config/t-vxworks (LIBGCC2_INCLUDES): Remove extraneous + dollar sign before $(MULTIDIR). + 2017-05-26 Richard Henderson PR libgcc/80037 diff --git a/libgcc/config/t-vxworks b/libgcc/config/t-vxworks index 3647f75..7c9bac9 100644 --- a/libgcc/config/t-vxworks +++ b/libgcc/config/t-vxworks @@ -8,7 +8,7 @@ LIB2ADD = $(srcdir)/config/vxlib.c $(srcdir)/config/vxlib-tls.c # VxWorks system headers have names that collide with GCC's # internal (host) headers, e.g. regs.h. LIBGCC2_INCLUDES = -nostdinc -I \ - `case "/$$(MULTIDIR)" in \ + `case "/$(MULTIDIR)" in \ */mrtp*) echo $(WIND_USR)/h ;; \ *) echo $(WIND_BASE)/target/h ;; \ esac` -- cgit v1.1 From ee834d3b93c3b5204d5786cf1e30091b51802fb4 Mon Sep 17 00:00:00 2001 From: Olivier Hainque Date: Fri, 2 Jun 2017 16:24:28 +0000 Subject: vxlib.c (__gthread_once): Add missing value to nested return statement. 2017-06-02 Olivier Hainque * config/vxlib.c (__gthread_once): Add missing value to nested return statement. From-SVN: r248838 --- libgcc/config/vxlib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libgcc') diff --git a/libgcc/config/vxlib.c b/libgcc/config/vxlib.c index 3cb8690..3df5d1f 100644 --- a/libgcc/config/vxlib.c +++ b/libgcc/config/vxlib.c @@ -70,7 +70,7 @@ __gthread_once (__gthread_once_t *guard, void (*func)(void)) /* This can happen on powerpc, which is using all 32 bits of the gthread_once_t structure. */ if (guard->done) - return; + return 0; #endif taskDelay (1); } -- cgit v1.1 From 38a75ccc89c52173f58b315952b36a42ba1feee8 Mon Sep 17 00:00:00 2001 From: Olivier Hainque Date: Fri, 2 Jun 2017 16:46:44 +0000 Subject: Add ChangeLog entry for revision 248838 From-SVN: r248839 --- libgcc/ChangeLog | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'libgcc') diff --git a/libgcc/ChangeLog b/libgcc/ChangeLog index 44c39ea..5a2b12b 100644 --- a/libgcc/ChangeLog +++ b/libgcc/ChangeLog @@ -1,3 +1,8 @@ +2017-06-02 Olivier Hainque + + * config/vxlib.c (__gthread_once): Add missing value to + return statement. + 2017-05-30 Olivier Hainque * config/t-vxworks (LIBGCC2_INCLUDES): Remove extraneous -- cgit v1.1 From d8b9cd2700bc51219a4bf378d305d0d91a2f46ef Mon Sep 17 00:00:00 2001 From: Tony Reix Date: Wed, 7 Jun 2017 12:35:19 +0000 Subject: aix-unwind.h (MD_FALLBACK_FRAME_STATE_FOR): Define unconditionally. 2017-06-07 Tony Reix Matthieu Sarter David Edelsohn * 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 Co-Authored-By: Matthieu Sarter From-SVN: r248968 --- libgcc/ChangeLog | 9 +++++++++ libgcc/config/rs6000/aix-unwind.h | 37 ++++++++++++++++++++++++++++--------- 2 files changed, 37 insertions(+), 9 deletions(-) (limited to 'libgcc') diff --git a/libgcc/ChangeLog b/libgcc/ChangeLog index 5a2b12b..8560804 100644 --- a/libgcc/ChangeLog +++ b/libgcc/ChangeLog @@ -1,3 +1,12 @@ +2017-06-07 Tony Reix + Matthieu Sarter + David Edelsohn + + * 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. + 2017-06-02 Olivier Hainque * config/vxlib.c (__gthread_once): Add missing value to diff --git a/libgcc/config/rs6000/aix-unwind.h b/libgcc/config/rs6000/aix-unwind.h index c513a12..2d8cdae 100644 --- a/libgcc/config/rs6000/aix-unwind.h +++ b/libgcc/config/rs6000/aix-unwind.h @@ -64,7 +64,8 @@ #endif /* Now on to MD_FALLBACK_FRAME_STATE_FOR. - 32bit AIX 5.2, 5.3 and 7.1 only at this stage. */ + 32bit AIX 5.2, 5.3, 6.1, 7.X and + 64bit AIX 6.1, 7.X only at this stage. */ #include #include @@ -73,18 +74,16 @@ #ifdef __64BIT__ -/* 64bit fallback not implemented yet, so MD_FALLBACK_FRAME_STATE_FOR not - defined. Arrange just for the code below to compile. */ typedef struct __context64 mstate_t; #else typedef struct mstsave mstate_t; -#define MD_FALLBACK_FRAME_STATE_FOR ppc_aix_fallback_frame_state - #endif +#define MD_FALLBACK_FRAME_STATE_FOR ppc_aix_fallback_frame_state + /* If we are compiling on AIX < 5.3, the VMX related datastructs are not defined and we take measures to obtain proper runtime behavior if the compiled code happens to run on a later version with VMX enabled. */ @@ -128,10 +127,26 @@ ucontext_for (struct _Unwind_Context *context) { const unsigned int * ra = context->ra; - /* AIX 5.2, 5.3 and 7.1, threaded or not, share common patterns + /* AIX 5.2, 5.3, 6.1 and 7.X, threaded or not, share common patterns and feature variants depending on the configured kernel (unix_mp or unix_64). */ +#ifdef __64BIT__ + if (*(ra - 5) == 0x4c00012c /* isync */ + && *(ra - 4) == 0xe8ec0000 /* ld r7,0(r12) */ + && *(ra - 3) == 0xe84c0008 /* ld r2,8(r12) */ + && *(ra - 2) == 0x7ce903a6 /* mtctr r7 */ + && *(ra - 1) == 0x4e800421 /* bctrl */ + && *(ra - 0) == 0x7de27b78) /* mr r2,r15 <-- context->ra */ + { + /* unix_64 */ + if (*(ra - 6) == 0x7d000164) /* mtmsrd r8 */ + { + /* AIX 6.1, 7.1 and 7.2 */ + return (ucontext_t *)(context->cfa + 0x70); + } + } +#else if (*(ra - 5) == 0x4c00012c /* isync */ && *(ra - 4) == 0x80ec0000 /* lwz r7,0(r12) */ && *(ra - 3) == 0x804c0004 /* lwz r2,4(r12) */ @@ -152,10 +167,14 @@ ucontext_for (struct _Unwind_Context *context) case 0x835a0570: /* lwz r26,1392(r26) */ return (ucontext_t *)(context->cfa + 0x40); - /* AIX 7.1 */ + /* AIX 6.1 and 7.1 */ case 0x2c1a0000: /* cmpwi r26,0 */ return (ucontext_t *)(context->cfa + 0x40); - + + /* AIX 7.2 */ + case 0x3800000a: /* li r0,A */ + return (ucontext_t *)(context->cfa + 0x40); + default: return 0; } @@ -174,7 +193,7 @@ ucontext_for (struct _Unwind_Context *context) return &frame->ucontext; } } - +#endif return 0; } -- cgit v1.1 From 2f8d29a497f8d0f97ace6a4459dd069564dc128b Mon Sep 17 00:00:00 2001 From: David Edelsohn Date: Wed, 7 Jun 2017 08:41:20 -0400 Subject: Fix white space. From-SVN: r248969 --- libgcc/config/rs6000/aix-unwind.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'libgcc') diff --git a/libgcc/config/rs6000/aix-unwind.h b/libgcc/config/rs6000/aix-unwind.h index 2d8cdae..1561658 100644 --- a/libgcc/config/rs6000/aix-unwind.h +++ b/libgcc/config/rs6000/aix-unwind.h @@ -141,10 +141,10 @@ ucontext_for (struct _Unwind_Context *context) { /* unix_64 */ if (*(ra - 6) == 0x7d000164) /* mtmsrd r8 */ - { - /* AIX 6.1, 7.1 and 7.2 */ - return (ucontext_t *)(context->cfa + 0x70); - } + { + /* AIX 6.1, 7.1 and 7.2 */ + return (ucontext_t *)(context->cfa + 0x70); + } } #else if (*(ra - 5) == 0x4c00012c /* isync */ -- cgit v1.1 From 1ac644c8d04230fd1be85de1b102a819c11c87bd Mon Sep 17 00:00:00 2001 From: Olivier Hainque Date: Thu, 8 Jun 2017 14:08:56 +0000 Subject: t-vxworks (LIBGCC2_INCLUDES): Add path to wrn/coreip to the set of -I options... 2017-06-08 Olivier Hainque * 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 --- libgcc/ChangeLog | 6 ++++++ libgcc/config/t-vxworks | 6 +++--- 2 files changed, 9 insertions(+), 3 deletions(-) (limited to 'libgcc') diff --git a/libgcc/ChangeLog b/libgcc/ChangeLog index 8560804..5d531d9 100644 --- a/libgcc/ChangeLog +++ b/libgcc/ChangeLog @@ -1,3 +1,9 @@ +2017-06-08 Olivier Hainque + + * 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. + 2017-06-07 Tony Reix Matthieu Sarter David Edelsohn diff --git a/libgcc/config/t-vxworks b/libgcc/config/t-vxworks index 7c9bac9..d67e446 100644 --- a/libgcc/config/t-vxworks +++ b/libgcc/config/t-vxworks @@ -7,8 +7,8 @@ LIB2ADD = $(srcdir)/config/vxlib.c $(srcdir)/config/vxlib-tls.c # This ensures that the correct target headers are used; some # VxWorks system headers have names that collide with GCC's # internal (host) headers, e.g. regs.h. -LIBGCC2_INCLUDES = -nostdinc -I \ +LIBGCC2_INCLUDES = -nostdinc \ `case "/$(MULTIDIR)" in \ - */mrtp*) echo $(WIND_USR)/h ;; \ - *) echo $(WIND_BASE)/target/h ;; \ + */mrtp*) echo -I$(WIND_USR)/h -I$(WIND_USR)/h/wrn/coreip ;; \ + *) echo -I$(WIND_BASE)/target/h -I$(WIND_BASE)/target/h/wrn/coreip ;; \ esac` -- cgit v1.1 From 4f751c5437988863e622fd8b3ff82ec65e281260 Mon Sep 17 00:00:00 2001 From: Martin Liska Date: Fri, 9 Jun 2017 14:54:53 +0200 Subject: Speed-up indirect-call instrumentation 2017-06-09 Martin Liska * 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 * libgcov-profiler.c (__gcov_indirect_call_profiler_v2): Reset __gcov_indirect_call_callee to NULL. From-SVN: r249058 --- libgcc/ChangeLog | 5 +++++ libgcc/libgcov-profiler.c | 2 ++ 2 files changed, 7 insertions(+) (limited to 'libgcc') diff --git a/libgcc/ChangeLog b/libgcc/ChangeLog index 5d531d9..9a97dba 100644 --- a/libgcc/ChangeLog +++ b/libgcc/ChangeLog @@ -1,3 +1,8 @@ +2017-06-09 Martin Liska + + * libgcov-profiler.c (__gcov_indirect_call_profiler_v2): + Reset __gcov_indirect_call_callee to NULL. + 2017-06-08 Olivier Hainque * config/t-vxworks (LIBGCC2_INCLUDES): Add path to wrn/coreip to diff --git a/libgcc/libgcov-profiler.c b/libgcc/libgcov-profiler.c index 067d762..e4570a0 100644 --- a/libgcc/libgcov-profiler.c +++ b/libgcc/libgcov-profiler.c @@ -336,6 +336,8 @@ __gcov_indirect_call_profiler_v2 (gcov_type value, void* cur_func) || (__LIBGCC_VTABLE_USES_DESCRIPTORS__ && __gcov_indirect_call_callee && *(void **) cur_func == *(void **) __gcov_indirect_call_callee)) __gcov_one_value_profiler_body (__gcov_indirect_call_counters, value, 0); + + __gcov_indirect_call_callee = NULL; } #endif -- cgit v1.1