aboutsummaryrefslogtreecommitdiff
path: root/libgcc
AgeCommit message (Collapse)AuthorFilesLines
2015-09-03RTEMS: Update RTEMS thread modelSebastian Huber2-56/+200
libgcc/ChangeLog * config/gthr-rtems.h (__GTHREADS_CXX0X): New. (__GTHREAD_HAS_COND): Likewise. (__gthread_t): Likewise. (__gthread_cond_t): Likewise. (__gthread_time_t): Likewise. (__GTHREAD_MUTEX_INIT): Likewise. (__GTHREAD_RECURSIVE_MUTEX_INIT): Likewise. (__GTHREAD_COND_INIT): Likewise. (__GTHREAD_COND_INIT_FUNCTION): Likewise. (__GTHREAD_TIME_INIT): Likewise. (__gthread_create): Likewise. (__gthread_join): Likewise. (__gthread_detach): Likewise. (__gthread_equal): Likewise. (__gthread_self): Likewise. (__gthread_yield): Likewise. (__gthread_cond_broadcast): Likewise. (__gthread_cond_signal): Likewise. (__gthread_cond_wait): Likewise. (__gthread_cond_timedwait): Likewise. (__gthread_cond_wait_recursive): Likewise. (__gthread_cond_destroy): Likewise. (rtems_gxx_once): Delete. (rtems_gxx_key_create): Likewise. (rtems_gxx_key_delete): Likewise. (rtems_gxx_getspecific): Likewise. (rtems_gxx_setspecific): Likewise. (rtems_gxx_mutex_init): Likewise. (rtems_gxx_mutex_destroy): Likewise. (rtems_gxx_mutex_lock): Likewise. (rtems_gxx_mutex_trylock): Likewise. (rtems_gxx_mutex_unlock): Likewise. (rtems_gxx_recursive_mutex_init): Likewise. (rtems_gxx_recursive_mutex_lock): Likewise. (rtems_gxx_recursive_mutex_trylock): Likewise. (rtems_gxx_recursive_mutex_unlock): Likewise. (__GTHREAD_ONCE_INIT): Use <pthread.h> initializer. (__GTHREAD_MUTEX_INIT_FUNCTION): Use <pthread.h> function. (__GTHREAD_RECURSIVE_MUTEX_INIT_FUNCTION): Likewise. (__gthread_once): Likewise. (__gthread_key_create): Likewise. (__gthread_key_delete): Likewise. (__gthread_getspecific): Likewise. (__gthread_setspecific): Likewise. (__gthread_key_t): Use <pthread.h> type. (__gthread_once_t): Likewise (__gthread_mutex_t): Use <sys/lock.h> type. (__gthread_recursive_mutex_t): Likewise (__gthread_mutex_lock): Use <sys/lock.h> function. (__gthread_mutex_trylock): Likewise. (__gthread_mutex_timedlock): Likewise. (__gthread_mutex_unlock): Likewise. (__gthread_mutex_destroy): Likewise. (__gthread_recursive_mutex_lock): Likewise. (__gthread_recursive_mutex_trylock): Likewise. (__gthread_recursive_mutex_timedlock): Likewise. (__gthread_recursive_mutex_unlock): Likewise. (__gthread_recursive_mutex_destroy): Likewise. From-SVN: r227428
2015-08-18xtensa: fix _Unwind_GetCFAMax Filippov2-1/+6
Returning context->cfa in _Unwind_GetCFA makes CFA point one stack frame higher than what was actually used by code at context->ra. This results in invalid CFA value in signal frames and premature unwinding completion in forced unwinding used by uClibc NPTL thread cancellation. Returning context->sp from _Unwind_GetCFA makes all CFA values valid and matching code that used them. 2015-08-18 Max Filippov <jcmvbkbc@gmail.com> libgcc/ * config/xtensa/unwind-dw2-xtensa.c (_Unwind_GetCFA): Return context->sp instead of context->cfa. From-SVN: r226964
2015-08-18xtensa: use unwind-dw2-fde-dip instead of unwind-dw2-fdeMax Filippov2-1/+6
This allows having exception cleanup code in binaries that don't register their unwind tables. 2015-08-18 Max Filippov <jcmvbkbc@gmail.com> libgcc/ * config/xtensa/t-windowed (LIB2ADDEH): Replace unwind-dw2-fde with unwind-dw2-fde-dip. From-SVN: r226963
2015-08-18xtensa: reimplement register spillingMax Filippov2-7/+30
Spilling windowed registers in userspace is much easier, more portable, less error-prone and equally effective as in kernel. Now that register spilling syscall is considered obsolete in the xtensa linux kernel replace it with CALL12 followed by series of ENTRY in libgcc. 2015-08-18 Max Filippov <jcmvbkbc@gmail.com> libgcc/ * config/xtensa/lib2funcs.S (__xtensa_libgcc_window_spill): Use CALL12 followed by series of ENTRY to spill windowed registers. (__xtensa_nonlocal_goto): Call __xtensa_libgcc_window_spill instead of making linux spill syscall. From-SVN: r226962
2015-08-14driver-i386.c (host_detect_local_cpu): Add support for skylake.Yuri Rumyantsev2-0/+12
gcc/ * config/i386/driver-i386.c (host_detect_local_cpu): Add support for skylake. * config/i386/i386.c (PTA_SKYLAKE): New macros. (processor_alias_table): Add skylake description. (enum processor_model): Add skylake processor. (arch_names_table): Add skylake record. * doc/invoke.texi: Add skylake item. gcc/testsuite/ * gcc.target/i386/builtin_target.c: Add skylake check. libgcc/ * config/i386/cpuinfo.c (enum processor_subtypes): Add skylake. (get_intel_cpu): Likewise. From-SVN: r226884
2015-08-12Add Knights Landing support to __builtin_cpu_isH.J. Lu2-0/+10
This patch adds Knights Landing support to __builtin_cpu_is. gcc/testsuite/ * gcc.target/i386/builtin_target.c (check_intel_cpu_model): Check Knights Landing support. libgcc/ * config/i386/cpuinfo.c (processor_types): Add INTEL_KNL. (get_intel_cpu): Add Knights Landing support. From-SVN: r226817
2015-08-11re PR target/66954 (function multiversioning fails for target "aes")Uros Bizjak2-1/+10
libgcc/ChangeLog: PR target/66954 * config/i386/cpuinfo.c (enum processor_features): Add FEATURE_PCLMUL. (get_available_features): Handle FEATURE_PCLMUL. gcc/ChangeLog: PR target/66954 * config/i386/i386.c (get_builtin_code_for_version): Add P_PCLMUL to enum feature_priority and feature_list. (fold_builtin_cpu): Add F_PCLMUL to enum processor_features and isa_names_table. gcc/testsuite/ChangeLog: PR target/66954 * g++.dg/ext/mv25.C: New test. From-SVN: r226784
2015-08-10Treat model == 0x4f as BroadwellH.J. Lu2-0/+6
gcc/testsuite/ * gcc.target/i386/builtin_target.c (check_intel_cpu_model): Treat model == 0x4f as Broadwell. libgcc/ * config/i386/cpuinfo.c (get_intel_cpu): Treat model == 0x4f as Broadwell. From-SVN: r226766
2015-07-22re PR target/66954 (function multiversioning fails for target "aes")Uros Bizjak2-1/+10
libgcc/ChangeLog: PR target/66954 * config/i386/cpuinfo.c (enum processor_features): Add FEATURE_AES. (get_available_features): Handle FEATURE_AES. gcc/ChangeLog: PR target/66954 * config/i386/i386.c (get_builtin_code_for_version): Add P_AES to enum feature_priority and feature_list. (fold_builtin_cpu): Add F_AES to enum processor_features and isa_names_table. gcc/testsuite/ChangeLog: PR target/66954 * g++.dg/ext/mv24.C: New test. From-SVN: r226081
2015-07-22linux-atomic.c (<asm/unistd.h>): Remove #include.Chung-Lin Tang2-5/+5
2015-07-22 Chung-Lin Tang <cltang@codesourcery.com> libgcc/ * config/nios2/linux-atomic.c (<asm/unistd.h>): Remove #include. (EFAULT,EBUSY,ENOSYS): Delete unused #defines. From-SVN: r226063
2015-07-17mkoffload.c (process): Constify host data.Nathan Sidwell2-7/+11
gcc/ * config/nvptx/mkoffload.c (process): Constify host data. * config/i386/intelmic-mkoffload.c (generate_target_descr_file): Constify host data. (generate_host_descr_file): Likewise. libgomp/ * target.c (struct_offload_image_descr): Constify host_table. (gomp_offload_image_to_device): Likewise. (GOMP_offload_register, GOMP_offload_unregister): Likewise. libgcc/ * offloadstuff.c: Constify host data. From-SVN: r225943
2015-07-17libgcc: fix build with older makeJan Beulich2-1/+7
Make up to 3.80 (documented as minimal permitted version) doesn't support "else if...". 2015-07-17 Jan Beulich <jbeulich@suse.com> * config/t-softfp: Split up "else ifneq". From-SVN: r225920
2015-07-14tramp.c (MOVHI, ORI, JMP): Conditionalize for __nios2_arch__ level.Sandra Loosemore2-3/+24
2015-07-14 Sandra Loosemore <sandra@codesourcery.com> Cesar Philippidis <cesar@codesourcery.com> Chung-Lin Tang <cltang@codesourcery.com> libgcc/ * config/nios2/tramp.c (MOVHI, ORI, JMP): Conditionalize for __nios2_arch__ level. Co-Authored-By: Cesar Philippidis <cesar@codesourcery.com> Co-Authored-By: Chung-Lin Tang <cltang@codesourcery.com> From-SVN: r225794
2015-07-13t-dragonfly: New.John Marino2-0/+6
2015-07-13 John Marino <gnugcc@marino.st> * config/i386/t-dragonfly: New. From-SVN: r225738
2015-07-01linux-atomic.c (__kernel_cmpxchg): Reorder arguments to better match ↵John David Anglin2-26/+33
light-weight syscall argument order. * config/pa/linux-atomic.c (__kernel_cmpxchg): Reorder arguments to better match light-weight syscall argument order. (__kernel_cmpxchg2): Likewise. Adjust callers. From-SVN: r225267
2015-06-30IA MCU psABI support: changes to librariesH.J. Lu5-1/+17
Patch in the bottom adds support of IA MCU psABI to libgcc (enables soft-fp) and libdecnumber (enables it for IA MCU). config/ * dfp.m4 (enable_decimal_float): Also set to yes for i?86*-*-elfiamcu target. gcc/ * configure: Regenerated. libdecnumber/ * configure: Regenerated. libgcc/ * config.host: Support i[34567]86-*-elfiamcu target. * config/t-softfp-sfdftf: New file. * config/i386/32/t-iamcu: Likewise. * configure: Regenerated. From-SVN: r225198
2015-06-23lib1funcs.S (aeabi_idiv0, [...]): Add CFI entries.James Lemke2-2/+14
2015-06-23 James Lemke <jwlemke@codesourcery.com> libgcc/config/arm/ * lib1funcs.S (aeabi_idiv0, aeabi_ldiv0): Add CFI entries. From-SVN: r224854
2015-06-03Fix FT32 ChangeLogsJeff Law1-0/+5
From-SVN: r224080
2015-05-27Add --enable-default-pie option to GCC configureH.J. Lu2-1/+5
Add --enable-default-pie option to configure GCC to generate PIE by default. gcc/ * Makefile.in (COMPILER): Add @NO_PIE_CFLAGS@. (BUILD_CFLAGS): Likewise. (BUILD_CXXFLAGS): Likewise. (LINKER): Add @NO_PIE_FLAG@. (BUILD_LDFLAGS): Likewise. (libgcc.mvars): Set NO_PIE_CFLAGS to -fno-PIE for --enable-default-pie. * common.opt (fPIE): Initialize to -1. (fpie): Likewise. (no-pie): New option. (pie): Replace "Negative(shared)" with "Negative(no-pie)". * configure.ac: Add --enable-default-pie. (NO_PIE_CFLAGS): New. Check if -fno-PIE works. AC_SUBST. (NO_PIE_FLAG): New. Check if -no-pie works. AC_SUBST. * defaults.h (DEFAULT_FLAG_PIE): New. Default PIE to -fPIE. * gcc.c (NO_PIE_SPEC): New. (PIE_SPEC): Likewise. (NO_FPIE1_SPEC): Likewise. (FPIE1_SPEC): Likewise. (NO_FPIE2_SPEC): Likewise. (FPIE2_SPEC): Likewise. (NO_FPIE2_SPEC): Likewise. (FPIE_SPEC): Likewise. (NO_FPIE_SPEC): Likewise. (NO_FPIC1_SPEC): Likewise. (FPIC1_SPEC): Likewise. (NO_FPIC2_SPEC): Likewise. (FPIC2_SPEC): Likewise. (NO_FPIC2_SPEC): Likewise. (FPIC_SPEC): Likewise. (NO_FPIC_SPEC): Likewise. (NO_FPIE1_AND_FPIC1_SPEC): Likewise. (FPIE1_OR_FPIC1_SPEC): Likewise. (NO_FPIE2_AND_FPIC2_SPEC): Likewise. (FPIE2_OR_FPIC2_SPEC): Likewise. (NO_FPIE_AND_FPIC_SPEC): Likewise. (FPIE_OR_FPIC_SPEC): Likewise. (LD_PIE_SPEC): Likewise. (LINK_PIE_SPEC): Handle -no-pie. Use PIE_SPEC and LD_PIE_SPEC. * opts.c (finish_options): Update opts->x_flag_pie if it is -1. * config/darwin.h (PIE_SPEC): Renamed to ... (DARWIN_PIE_SPEC): This. (LINK_SPEC): Replace PIE_SPEC with DARWIN_PIE_SPEC. * config/darwin9.h (PIE_SPEC): Renamed to ... (DARWIN_PIE_SPEC): This. * config/gnu-user.h (GNU_USER_TARGET_STARTFILE_SPEC): Use PIE_SPEC and NO_PIE_SPEC if HAVE_LD_PIE is defined. * config/openbsd.h (ASM_SPEC): Use FPIE1_OR_FPIC1_SPEC and FPIE2_OR_FPIC2_SPEC. * config/m68k/netbsd-elf.h (ASM_SPEC): Likewise. * config/m68k/openbsd.h (ASM_SPEC): Likewise. * gcc/config/sol2.h (ASM_PIC_SPEC): Likewise. * config/arm/freebsd.h (SUBTARGET_EXTRA_ASM_SPEC): Likewise. * config/arm/netbsd-elf.h (SUBTARGET_EXTRA_ASM_SPEC): Likewise. * config/arm/semi.h (SUBTARGET_EXTRA_ASM_SPEC): Likewise. * config/cris/linux.h (CRIS_ASM_SUBTARGET_SPEC): Likewise. * config/m32r/m32r.h (ASM_SPEC): Likewise. * config/m68k/uclinux.h (DRIVER_SELF_SPECS): Likewise. * config/rs6000/linux64.h (ASM_SPEC32): Likewise. * config/rs6000/sysv4.h (ASM_SPEC): Likewise. * config/sparc/freebsd.h (ASM_SPEC): Likewise. * config/sparc/linux.h (ASM_SPEC): Likewise. * config/sparc/linux64.h (ASM_SPEC): Likewise. * config/sparc/netbsd-elf.h (ASM_SPEC): Likewise. * config/sparc/openbsd64.h (ASM_SPEC): Likewise. * config/sparc/sp-elf.h (ASM_SPEC): Likewise. * config/sparc/sp64-elf.h (ASM_SPEC): Likewise. * config/sparc/sparc.h (ASM_SPEC): Likewise. * config/sparc/sysv4.h (ASM_SPEC): Likewise. * config/sparc/vxworks.h (ASM_SPEC): Likewise. * config/c6x/elf-common.h (ASM_SPEC): Use NO_FPIC2_SPEC, FPIC2_SPEC, FPIC1_SPEC and FPIC2_SPEC. * config/c6x/uclinux-elf.h (LINK_SPEC): Use FPIE_SPEC. * config/frv/frv.h (DRIVER_SELF_SPECS): Use FPIC_SPEC, NO_FPIC_SPEC and NO_FPIE1_AND_FPIC1_SPEC. (ASM_SPEC): Use FPIE1_OR_FPIC1_SPEC and FPIE2_OR_FPIC2_SPEC. * config/m68k/m68k.h (ASM_PCREL_SPEC): Use FPIC_SPEC and NO_FPIC_SPEC. * config/mips/gnu-user.h (NO_SHARED_SPECS): Use NO_FPIE_AND_FPIC_SPEC. * config/mips/vxworks.h (SUBTARGET_ASM_SPEC): Use FPIC_SPEC. * config/rs6000/freebsd64.h (ASM_SPEC32): Likewise. * config/rs6000/vxworks.h (ASM_SPEC): Likewise. * config/vax/linux.h (ASM_SPEC): Likewise. * doc/install.texi: Document --enable-default-pie. * doc/invoke.texi: Document -no-pie. * config.in: Regenerated. * configure: Likewise. gcc/ada/ * gcc-interface/Makefile.in (TOOLS_LIBS): Add @NO_PIE_FLAG@. libgcc/ * Makefile.in (CRTSTUFF_CFLAGS): Add $(NO_PIE_CFLAGS). From-SVN: r223796
2015-05-27config.host (i[34567]86-*-freebsd*, [...]): Set md_unwind_headerJohn Marino3-0/+181
* config.host (i[34567]86-*-freebsd*, x86_64-*-freebsd*): Set md_unwind_header * config/i386/freebsd-unwind.h: New. From-SVN: r223765
2015-05-22config.host (i[34567]-*-*, x86_64-*-*): Add t-crtfm instead of i386/t-crtfm ↵Uros Bizjak4-58/+65
to tmake_file. * config.host (i[34567]-*-*, x86_64-*-*): Add t-crtfm instead of i386/t-crtfm to tmake_file. * config/i386/crtfastmath.c (set_fast_math_sse): New function. (set_fast_math): Use set_fast_math_sse for SSE targets. * config/i386/t-crtfm: Remove. From-SVN: r223578
2015-05-21re PR libgcc/66225 (libgcc/config/rs6000/morecore.S will not build on ↵Alan Modra2-1/+5
systems with an older assembler) PR libgcc/66225 * config/rs6000/morestack.S: Remove ".abiversion 1". From-SVN: r223464
2015-05-20rs6000-common.c (TARGET_SUPPORTS_SPLIT_STACK): Define.Alan Modra5-0/+367
gcc/ * common/config/rs6000/rs6000-common.c (TARGET_SUPPORTS_SPLIT_STACK): Define. (rs6000_supports_split_stack): New function. * gcc/config/rs6000/rs6000.c (machine_function): Add split_stack_arg_pointer. (TARGET_EXTRA_LIVE_ON_ENTRY, TARGET_INTERNAL_ARG_POINTER): Define. (setup_incoming_varargs): Use crtl->args.internal_arg_pointer rather than virtual_incoming_args_rtx. (rs6000_va_start): Likewise. (split_stack_arg_pointer_used_p): New function. (rs6000_emit_prologue): Set up arg pointer for -fsplit-stack. (morestack_ref): New var. (gen_add3_const, rs6000_expand_split_stack_prologue, rs6000_internal_arg_pointer, rs6000_live_on_entry, rs6000_split_stack_space_check): New functions. (rs6000_elf_file_end): Call file_end_indicate_split_stack. * gcc/config/rs6000/rs6000.md (UNSPEC_STACK_CHECK): Define. (UNSPECV_SPLIT_STACK_RETURN): Define. (split_stack_prologue, load_split_stack_limit, load_split_stack_limit_di, load_split_stack_limit_si, split_stack_return, split_stack_space_check): New expands and insns. * gcc/config/rs6000/rs6000-protos.h (rs6000_expand_split_stack_prologue): Declare. (rs6000_split_stack_space_check): Declare. libgcc/ * config/rs6000/morestack.S: New. * config/rs6000/t-stack-rs6000: New. * config.host (powerpc*-*-linux*): Add t-stack and t-stack-rs6000 to tmake_file. * generic-morestack.c: Don't build for powerpc 32-bit. From-SVN: r223426
2015-05-19Makefile.in (LIBUNWIND): Move dependency for shared libgcc.Eric Botcazou2-4/+6
* Makefile.in (LIBUNWIND): Move dependency for shared libgcc. Remove useless endif/ifneq ($(enable_shared),yes) pair. From-SVN: r223412
2015-05-16FT32 target added. Approved by Jeff Law [law@redhat.com]James Bowman9-0/+1508
From-SVN: r223261
2015-05-15Add support for CFI directives in fp emulation routines for ARM.Martin Galvan4-30/+271
2015-05-15 Martin Galvan <martin.galvan@tallertechnologies.com> * config/arm/lib1funcs.S (CFI_START_FUNCTION, CFI_END_FUNCTION): New macros. * config/arm/ieee754-df.S: Add CFI directives. * config/arm/ieee754-sf.S: Add CFI directives. From-SVN: r223220
2015-05-13sjlj.m4: New file.Eric Botcazou5-131/+46
config/ * sjlj.m4: New file. libgcc/ * configure.ac: Include config/sjlj.m4. Remove manual SJLJ check, add GCC_CHECK_SJLJ_EXCEPTIONS and adjust. * config.in: Regenerate. * configure: Likewise. * config.host: Replace enable_sjlj_exceptions by ac_cv_sjlj_exceptions. libjava/ * configure.ac: Include config/sjlj.m4. Remove manual SJLJ check, add GCC_CHECK_SJLJ_EXCEPTIONS and adjust. * include/config.h.in: Regenerate. * configure: Likewise. * exception.cc: Replace SJLJ_EXCEPTIONS by __USING_SJLJ_EXCEPTIONS__. * stacktrace.cc: Likewise. * include/default-signal.h: Likewise. * sysdep/i386/backtrace.h: Likewise. libobjc/ * configure.ac: Remove manual SJLJ check. * config.h.in: Regenerate. * configure: Likewise. * exception.c: Replace SJLJ_EXCEPTIONS by __USING_SJLJ_EXCEPTIONS__. libstdc++-v3/ * acinclude.m4 (GLIBCXX_ENABLE_SJLJ_EXCEPTIONS): Delete. * configure.ac: Remove GLIBCXX_ENABLE_SJLJ_EXCEPTIONS. * config.h.in: Regenerate. * configure: Likewise. * libsupc++/eh_personality.cc: Replace _GLIBCXX_SJLJ_EXCEPTIONS by __USING_SJLJ_EXCEPTIONS__. * libsupc++/eh_throw.cc: Likewise. * libsupc++/eh_ptr.cc: Likewise. * doc/html/manual/appendix_porting.html: Remove GLIBCXX_ENABLE_SJLJ_EXCEPTIONS * doc/xml/manual/build_hacking.xml: Likewise. * doc/html/manual/configure.html: Remove --enable-sjlj-exceptions. * doc/xml/manual/configure.xml: Likewise. From-SVN: r223181
2015-05-12libgcov-util.c: Add space between string literal and macro name.Uros Bizjak2-8/+14
* libgcov-util.c: Add space between string literal and macro name. From-SVN: r223073
2015-05-06unknown-elf.h (STARTFILE_SPEC): Add conditional linking of crtfastmath.o.Sandra Loosemore3-3/+53
2015-05-06 Sandra Loosemore <sandra@codesourcery.com> Chris Jones <chrisj@nvidia.com> Joshua Conner <jconner@nvidia.com> gcc/ * config/arm/unknown-elf.h (STARTFILE_SPEC): Add conditional linking of crtfastmath.o. * config/arm/linux-eabi.h (STARTFILE_SPEC): Likewise. libgcc/ * config.host (arm*-*-linux*): Add support for crtfastmath.o. (arm*-*-uclinux*): Likewise. (arm*-*-eabi* | arm*-*-rtems*): Likewise. * config/arm/crtfastmath.c: New file. Co-Authored-By: Chris Jones <chrisj@nvidia.com> Co-Authored-By: Joshua Conner <jconner@nvidia.com> From-SVN: r222857
2015-04-29Fix libgcc installation for offload targets.Bernd Schmidt4-13/+17
* Makefile.in (real_host_noncanonical): New variable. (libsubdir): Use it. * configure.ac (real_host_noncanonical): Compute. Remove special case for intelmicemul. * configure: Regenerate. From-SVN: r222585
2015-04-28elf-lib.h: New file.Uros Bizjak5-8/+44
libgcc/ChangeLog: * config/frv/elf-lib.h: New file. (CRT_GET_RFIB_DATA): Move definition from gcc/config/frv/frv.h. * libgcc/config.host (frv-*elf, frv-*-*linux*): Add frv/elf-lib.h to tm_file. * config/frv/frvbengin.c: Do not include defaults.h * config/frv/frvend.c: Ditto. gcc/ChangeLog: * config/frv/frv.h (CRT_GET_RFIB_DATA): Move definition to libgcc/config/frv/elf-lib.h. From-SVN: r222519
2015-04-27config.gcc: Add h8300-*-linux.Yoshinori Sato5-37/+140
gcc/ * config.gcc: Add h8300-*-linux. * config/h8300/linux.h: New. * config/h8300/t-linux: New. * config/h8300/h8300.c (h8300_option_override): Normal mode is not supported for h8300-*-linux. (h8300_file_start): Target priority change. (get_shift_alg): Likewise. (h8300_shift_need_scratch_p): Likewise. * config/h8300/h8300.h (TARGET_CPU_CPP_BUILTINS): Likewise. * config/h8300/h8300.md (define_peephole2): Remove duplicate condition. libgcc/ * config.host: Add h8300-*-linux * config/h8300/t-linux: New file. * config/h8300/lib1funs.s: Change symbol prefix. * config/h8300/sfp-machine.h: 64bit double support. From-SVN: r222479
2015-04-22unwind fix for muslGregor Richards2-0/+12
On behalf of szabolcs.nagy@arm.com 2015-04-22 Gregor Richards <gregor.richards@uwaterloo.ca> Szabolcs Nagy <szabolcs.nagy@arm.com> * unwind-dw2-fde-dip.c (USE_PT_GNU_EH_FRAME): Define it on Linux if target provides dl_iterate_phdr. Co-Authored-By: Szabolcs Nagy <szabolcs.nagy@arm.com> From-SVN: r222328
2015-04-17Hide __cpu_indicator_init/__cpu_model from linkerH.J. Lu4-3/+18
We shouldn't call external function, __cpu_indicator_init, while an object is being relocated since its .got.plt section hasn't been updated. It works for non-PIE since no update on .got.plt section is required. This patch creates libgcc.so as a linker script, hides __cpu_indicator_init and __cpu_model in libgcc.so.1 from linker, forces linker to resolve __cpu_indicator_init and __cpu_model to their hidden definitions in libgcc.a while providing backward binary compatibility. gcc/testsuite/ PR target/65612 * g++.dg/ext/mv18.C: New test. * g++.dg/ext/mv19.C: Likewise. * g++.dg/ext/mv20.C: Likewise. * g++.dg/ext/mv21.C: Likewise. * g++.dg/ext/mv22.C: Likewise. * g++.dg/ext/mv23.C: Likewise. libgcc/ PR target/65612 * config.host (tmake_file): Add t-slibgcc-libgcc for Linux/x86. * config/i386/cpuinfo.c (__cpu_model): Initialize. (__cpu_indicator_init@GCC_4.8.0): New. (__cpu_model@GCC_4.8.0): Likewise. * config/i386/t-linux (HOST_LIBGCC2_CFLAGS): Add -DUSE_ELF_SYMVER. From-SVN: r222178
2015-04-16rl78-opts.h (enum rl78_mul_types): Add MUL_G14 and MUL_UNINIT.Nick Clifton3-0/+910
* config/rl78/rl78-opts.h (enum rl78_mul_types): Add MUL_G14 and MUL_UNINIT. (enum rl78_cpu_type): New. * config/rl78/rl78-virt.md (attr valloc): Add divhi and divsi. (umulhi3_shift_virt): Remove m constraint from operand 1. (umulqihi3_virt): Likewise. * config/rl78/rl78.c (rl78_option_override): Add code to process -mcpu and -mmul options. (rl78_alloc_physical_registers): Add code to handle divhi and divsi valloc attributes. (set_origin): Likewise. * config/rl78/rl78.h (RL78_MUL_G14): Define. (TARGET_G10, TARGET_G13, TARGET_G14): Define. (TARGET_CPU_CPP_BUILTINS): Define __RL78_MUL_xxx__ and __RL78_Gxx__. (ASM_SPEC): Pass -mcpu on to assembler. * config/rl78/rl78.md (mulqi3): Add a clobber of AX. (mulqi3_rl78): Likewise. (mulhi3_g13): Likewise. (mulhi3): Generate the G13 or G14 versions of the insn directly. (mulsi3): Likewise. (mulhi3_g14): Add clobbers of AX and BC. (mulsi3_g14): Likewise. (mulsi3_g13): Likewise. (udivmodhi4, udivmodhi4_g14, udivmodsi4): New patterns. (udivmodsi4_g14, udivmodsi4_g13): New patterns. * config/rl78/rl78.opt (mmul): Initialise value to RL78_MUL_UNINIT. (mcpu): New option. (m13, m14, mrl78): New option aliases. * config/rl78/t-rl78 (MULTILIB_OPTIONS): Add mg13 and mg14. (MULTILIB_DIRNAMES): Add g13 and g14. * doc/invoke.texi: Document -mcpu and -mmul options. * config/rl78/divmodhi.S: Add G14 and G13 versions of the __divhi3 and __modhi3 functions. * config/rl78/divmodso.S: Add G14 and G13 versions of the __divsi3, __udivsi3, __modsi3 and __umodsi3 functions. From-SVN: r222142
2015-04-15gthr-single.h (__GTHREAD_MUTEX_INIT_FUNCTION): Use empty do-while loop as ↵Chen Gang2-1/+6
macro body to avoid warnings. 2015-04-15 Chen Gang <gang.chen.5i5j@gmail.com> * gthr-single.h (__GTHREAD_MUTEX_INIT_FUNCTION): Use empty do-while loop as macro body to avoid warnings. From-SVN: r222127
2015-04-10re PR target/65351 (libiberty's pic version contains non-pic code on m32 ↵Jakub Jelinek2-5/+15
darwin; causes bootstrap fail building libcc1.) PR target/65351 config/ * mh-darwin: Only apply -mdynamic-no-pic for m32 Darwin when the compiler in use supports -mno-dynamic-no-pic. * picflag.m4: Only append -mno-dynamic-no-pic for Darwin when -mdynamic-no-pic is present in CFLAGS. libiberty/ * configure: Regenerate. libada/ * configure: Regenerate. libgcc/ * configure: Regenerate. gcc/ * configure: Regenerate. Co-Authored-By: Iain Sandoe <iain@codesourcery.com> From-SVN: r221967
2015-04-07re PR target/65351 (libiberty's pic version contains non-pic code on m32 ↵Jakub Jelinek2-1/+9
darwin; causes bootstrap fail building libcc1.) PR target/65351 config/ * picflag.m4: Append -mno-dynamic-no-pic for Darwin. libiberty/ * configure: Regenerate. libada/ * configure: Regenerate. libgcc/ * configure: Regenerate. gcc/ * configure: Regenerate. Co-Authored-By: Iain Sandoe <iain@codesourcery.com> From-SVN: r221891
2015-03-25config.host (nios2-*-linux*): Remove 'extra_parts' setting.Chung-Lin Tang2-2/+5
2015-03-25 Chung-Lin Tang <cltang@codesourcery.com> libgcc/ * config.host (nios2-*-linux*): Remove 'extra_parts' setting. From-SVN: r221653
2015-03-03Implement call0 ABI for xtensaMax Filippov7-3/+65
call0 is an ABI that doesn't use register windows. 2015-03-03 Max Filippov <jcmvbkbc@gmail.com> gcc/ * config/xtensa/constraints.md ("a" constraint): Include stack pointer in case of call0 ABI. ("q" constraint): Make empty in case of call0 ABI. ("D" constraint): Include stack pointer in case of call0 ABI. * config/xtensa/xtensa-protos.h (xtensa_set_return_address, xtensa_expand_epilogue, xtensa_regno_to_class): Add new function prototypes. * config/xtensa/xtensa.c (xtensa_callee_save_size): New variable. (xtensa_regno_to_class): Make it a local variable in the function xtensa_regno_to_class. (xtensa_function_epilogue, TARGET_ASM_FUNCTION_EPILOGUE): Remove macro, function prototype and implementation. (reg_nonleaf_alloc_order): Make it a local variable in the function order_regs_for_local_alloc. (xtensa_conditional_register_usage): New function. (TARGET_CONDITIONAL_REGISTER_USAGE): Define macro. (xtensa_valid_move): Allow direct moves to stack pointer register in call0 ABI. (xtensa_setup_frame_addresses): Only spill register windows in windowed ABI. (xtensa_emit_call): Emit call(x)8 or call(x)0 in windowed and call0 ABI respectively. (xtensa_function_arg_1): Only mark a7 register for copying in windowed ABI. (xtensa_call_save_reg): New function. (compute_frame_size): Add space for callee saved register storage to the frame size in call0 ABI. (xtensa_expand_prologue): Generate code to set up stack frame and save callee-saved registers in call0 ABI. (xtensa_expand_epilogue): New function. (xtensa_set_return_address): New function. (xtensa_return_addr): Calculate return address in call0 ABI. (xtensa_builtin_saveregs): Only mark a7 register for copying and emit copying code in windowed ABI. (order_regs_for_local_alloc): Add preferred register allocation order for non-leaf function in call0 ABI. (xtensa_static_chain): Add atatic chain passing for call0 ABI. (xtensa_asm_trampoline_template): Add trampoline generation for call0 ABI. (xtensa_trampoline_init): Add trampoline initialization for call0 ABI. (xtensa_conditional_register_usage, xtensa_regno_to_class): New functions. * config/xtensa/xtensa.h (TARGET_WINDOWED_ABI): New macro. (TARGET_CPU_CPP_BUILTINS): Add built-in define for call0 ABI. (CALL_USED_REGISTERS): Modify to encode both windowed and call0 ABI call-used registers. (HARD_FRAME_POINTER_REGNUM): Add frame pointer for call0 ABI. (INCOMING_REGNO, OUTGOING_REGNO): Use argument unchanged in call0 ABI. (REG_CLASS_CONTENTS): Include all registers into the preferred reload registers set, adjust the set in the xtensa_conditional_register_usage. (xtensa_regno_to_class): Drop variable declaration. (REGNO_REG_CLASS): Redefine to use xtensa_regno_to_class function. (WINDOW_SIZE): Define as 8 or 0 for windowed and call0 ABI respectively. (FUNCTION_PROFILER): Add _mcount call for call0 ABI. (TRAMPOLINE_SIZE): Define trampoline size for call0 ABI. (RETURN_ADDR_IN_PREVIOUS_FRAME): Define to 0 in call0 ABI. (ASM_OUTPUT_POOL_PROLOGUE): Always generate literal pool location in call0 ABI. (EH_RETURN_STACKADJ_RTX): New definition, use a10 for passing stack adjustment size when handling exception. (CRT_CALL_STATIC_FUNCTION): Add definition for call0 ABI. * config/xtensa/xtensa.md (A9_REG, UNSPECV_BLOCKAGE): New definitions. ("return" pattern): Generate ret.n/ret in call0 ABI. ("epilogue" pattern): Expand epilogue. ("nonlocal_goto" pattern): Use default in call0 ABI. ("eh_return" pattern): Move implementation to eh_set_a0_windowed, emit eh_set_a0_* depending on ABI. ("eh_set_a0_windowed" pattern): Former eh_return pattern. ("eh_set_a0_call0", "blockage"): New patterns. libgcc/ * config/xtensa/lib2funcs.S (__xtensa_libgcc_window_spill, __xtensa_nonlocal_goto): Don't compile for call0 ABI. (__xtensa_sync_caches): Only use entry and retw in windowed ABI, use ret in call0 ABI. * config/xtensa/t-windowed: New file. * libgcc/config/xtensa/t-xtensa (LIB2ADDEH): Move to t-windowed. * libgcc/configure: Regenerated. * libgcc/configure.ac: Check if xtensa target is configured for windowed ABI and thus needs to use custom unwind code. From-SVN: r221158
2015-03-02re PR libgcc/64885 (libstdc++ all_attributes failure)Jonathan Wakely4-3/+10
PR libgcc/64885 * gthr-single.h: Use __unused__ attribute instead of unused. * config/gthr-vxworks.h: Likewise. * config/i386/gthr-win32.h: Likewise. From-SVN: r221120
2015-02-27re PR libgcc/65038 ([regression 5] Unable to find ftw.h for libgcov-util.c)Kai Tietz5-0/+316
PR target/65038 * config.in: Regenerated. * configure: Likewise. * configure.ac (AC_HEADER_STDC): Added explicit. (AC_CHECK_HEADERS): Check for default headers plus for ftw.h header. * libgcov-util.c (gcov_read_profile_dir): Disable use of ftw-function, if header is not found. (ftw_read_file): Likewise. From-SVN: r221059
2015-02-27Revert changeKai Tietz5-1290/+401
From-SVN: r221058
2015-02-27re PR libgcc/65038 ([regression 5] Unable to find ftw.h for libgcov-util.c)Kai Tietz5-401/+1290
PR target/65038 * config.in: Regenerated. * configure: Likewise. * configure.ac (AC_HEADER_STDC): Add explicit. (AC_CHECK_HEADERS): Check for default headers plus for ftw.h one. * libgcov-util.c (gcov_read_profile_dir): Disable use of ftw-function, if header not found. (ftw_read_file): Don't translate if ftw header isn't present. From-SVN: r221055
2015-02-23[PR target/65181] nvptx libgcc: Prevent building "advanced" stuff (for ↵Thomas Schwinge2-0/+11
example, gcov support) When building GCC against a proper newlib sysroot, the libgcc build will include more than what's built in the -Dinhibit_libc configuration used when building newlib as part of the GCC build process. See the inhibit_libc logic in gcc/configure.ac. To avoid... ptxas _gcov_indirect_call_topn_profiler.o, line 101; error : Type or alignment of argument does not match formal parameter 'ptr' ptxas _gcov_indirect_call_topn_profiler.o, line 101; error : Call has wrong number of parameters ptxas _gcov_indirect_call_topn_profiler.o, line 101; error : Type or alignment of argument does not match formal parameter 'size' ptxas fatal : Ptx assembly aborted due to errors nvptx-as: ptxas returned 255 exit status make[2]: *** [_gcov_indirect_call_topn_profiler.o] Error 1 ..., "dumb down" the libgcc build: libgcc/ PR target/65181 * config/nvptx/t-nvptx (INHIBIT_LIBC_CFLAGS): Define to -Dinhibit_libc. From-SVN: r220915
2015-02-17bpabi.S (test_div_by_zero): Make label names consistent between thumb2 and ↵Sandra Loosemore3-18/+35
arm mode cases. 2015-02-17 Sandra Loosemore <sandra@codesourcery.com> libgcc/ * config/arm/bpabi.S (test_div_by_zero): Make label names consistent between thumb2 and arm mode cases. Separate the signed comparison on the high word of the numerator from the unsigned comparison on the low word. * config/arm/bpabi-v6m.S (test_div_by_zero): Similarly separate signed comparison. gcc/testsuite/ * gcc.target/arm/divzero.c: New test case. From-SVN: r220765
2015-02-17Avoid dependence on libc headers in nvptx realloc.Joseph Myers2-3/+8
* config/nvptx/realloc.c: Include <stddef.h> instead of <stdlib.h> and <string.h>. (__nvptx_realloc): Call __builtin_memcpy instead of memcpy. From-SVN: r220764
2015-02-10Fixed pasto in ChangeLogKai Tietz1-1/+1
From-SVN: r220583
2015-02-10re PR gcov-profile/61889 (gcov-tool.c uses nftw, ftw.h)Rainer Emrich2-0/+8
2015-02-10 Rainer Emrich <rainer@emrich-ebersheim.de> PR gcov-profile/61889 * libgcc/libgcov-driver-system.c: undefine clashing macro for mkdir. From-SVN: r220582
2015-02-04fpmath-sf.S (__rl78_int_pack_a_r8): Fix edge case rounding up the fraction.Nick Clifton2-4/+15
* config/rl78/fpmath-sf.S (__rl78_int_pack_a_r8): Fix edge case rounding up the fraction. * config/rl78/rl78.c (rl78_note_reg_set): Note the use of REGs inside a MEM. From-SVN: r220410