aboutsummaryrefslogtreecommitdiff
path: root/libgcc
AgeCommit message (Collapse)AuthorFilesLines
2016-02-15S/390: Add -fsplit-stack supportMarcin Kościelnicki5-2/+626
libgcc/ChangeLog: * config.host: Use t-stack and t-stack-s390 for s390*-*-linux. * config/s390/morestack.S: New file. * config/s390/t-stack-s390: New file. * generic-morestack.c (__splitstack_find): Add s390-specific code. gcc/ChangeLog: * common/config/s390/s390-common.c (s390_supports_split_stack): New function. (TARGET_SUPPORTS_SPLIT_STACK): New macro. * config/s390/s390-protos.h: Add s390_expand_split_stack_prologue. * config/s390/s390.c (struct machine_function): New field split_stack_varargs_pointer. (s390_register_info): Mark r12 as clobbered if it'll be used as temp in s390_emit_prologue. (s390_emit_prologue): Use r12 as temp if r1 is taken by split-stack vararg pointer. (morestack_ref): New global. (SPLIT_STACK_AVAILABLE): New macro. (s390_expand_split_stack_prologue): New function. (s390_live_on_entry): New function. (s390_va_start): Use split-stack vararg pointer if appropriate. (s390_asm_file_end): Emit the split-stack note sections. (TARGET_EXTRA_LIVE_ON_ENTRY): New macro. * config/s390/s390.md (UNSPEC_STACK_CHECK): New unspec. (UNSPECV_SPLIT_STACK_CALL): New unspec. (UNSPECV_SPLIT_STACK_DATA): New unspec. (split_stack_prologue): New expand. (split_stack_space_check): New expand. (split_stack_data): New insn. (split_stack_call): New expand. (split_stack_call_*): New insn. (split_stack_cond_call): New expand. (split_stack_cond_call_*): New insn. From-SVN: r233421
2016-02-12config.host (tilegx*-*-linux*): remove ti from softfp_int_modes for 32-bit ↵Walter Lee2-1/+9
configs. libgcc/ChangeLog: * config.host (tilegx*-*-linux*): remove ti from softfp_int_modes for 32-bit configs. From-SVN: r233389
2016-02-10re PR go/68562 (morestack misaligns stack on x86_64)Ian Lance Taylor2-1/+10
PR go/68562 * config/i386/morestack.S (__stack_split_initialize): Align stack. From-SVN: r233273
2016-02-03re PR bootstrap/69611 (Bootstrap broken on PowerPC FreeBSD, IEEE 128-bit ↵Andreas Tobler2-2/+8
floating point support.) 2016-02-03 Andreas Tobler <andreast@gcc.gnu.org> PR bootstrap/69611 * config/rs6000/sfp-machine.h: Guard __sfp_exceptions with __FLOAT128__ to compile only for __float128 capable targets. From-SVN: r233111
2016-01-25re PR target/69444 (recent changes broke x64_64 -> powerpc crosscompiler build)Jakub Jelinek2-34/+40
PR target/69444 * config/rs6000/sfp-machine.h: Fix a typo in #ifndef - __NO_FPRS__ instead of ___NO_FPRS__. From-SVN: r232805
2016-01-21Add missing fileMichael Meissner1-0/+25
From-SVN: r232695
2016-01-21float128-sed: New files to convert TF names to KF names for PowerPC IEEE ↵Michael Meissner18-3/+1581
128-bit floating... 2016-01-21 Michael Meissner <meissner@linux.vnet.ibm.com> Steven Munroe <munroesj@linux.vnet.ibm.com> Tulio Magno Quites Machado Filho <tulioqm@br.ibm.com> * config/rs6000/float128-sed: New files to convert TF names to KF names for PowerPC IEEE 128-bit floating point support. * config/rs6000/float128-sed-hw: Likewise. * config/rs6000/float128-hw.c: New file for ISA 3.0 IEEE 128-bit floating point hardware support. * config/rs6000/float128-ifunc.c: New file to pick either IEEE 128-bit floating point software emulation or use ISA 3.0 hardware support if it is available. * config/rs6000/quad-float128.h: New file to support IEEE 128-bit floating point. * config/rs6000/extendkftf2-sw.c: New file, convert IEEE 128-bit floating point to IBM extended double. * config/rs6000/trunctfkf2-sw.c: New file, convert IBM extended double to IEEE 128-bit floating point. * config/rs6000/t-float128: New Makefile fragments to enable building __float128 emulation support. * config/rs6000/t-float128-hw: Likewise. * config/rs6000/sfp-exceptions.c: New file to provide exception support for IEEE 128-bit floating point. * config/rs6000/floattikf.c: New files for converting between IEEE 128-bit floating point and signed/unsigned 128-bit integers. * config/rs6000/fixunskfti.c: Likewise. * config/rs6000/fixkfti.c: Likewise. * config/rs6000/floatuntikf.c: Likewise. * config/rs6000/sfp-machine.h (_FP_W_TYPE_SIZE): Use 64-bit types when building on 64-bit systems, or when VSX is enabled. (_FP_W_TYPE): Likewise. (_FP_WS_TYPE): Likewise. (_FP_I_TYPE): Likewise. (TItype): Define on 64-bit systems. (UTItype): Likewise. (TI_BITS): Likewise. (_FP_MUL_MEAT_D): Add support for using 64-bit types. (_FP_MUL_MEAT_Q): Likewise. (_FP_DIV_MEAT_D): Likewise. (_FP_DIV_MEAT_Q): Likewise. (_FP_NANFRAC_D): Likewise. (_FP_NANFRAC_Q): Likewise. (ISA_BIT): Add exception support if we are being compiled on a machine with hardware floating point support to build the IEEE 128-bit emulation functions. (FP_EX_INVALID): Likewise. (FP_EX_OVERFLOW): Likewise. (FP_EX_UNDERFLOW): Likewise. (FP_EX_DIVZERO): Likewise. (FP_EX_INEXACT): Likewise. (FP_EX_ALL): Likewise. (__sfp_handle_exceptions): Likewise. (FP_HANDLE_EXCEPTIONS): Likewise. (FP_RND_NEAREST): Likewise. (FP_RND_ZERO): Likewise. (FP_RND_PINF): Likewise. (FP_RND_MINF): Likewise. (FP_RND_MASK): Likewise. (_FP_DECL_EX): Likewise. (FP_INIT_ROUNDMODE): Likewise. (FP_ROUNDMODE): Likewise. * libgcc/config.host (powerpc*-*-linux*): If compiler can compile VSX code, enable IEEE 128-bit floating point. If the compiler can compile IEEE 128-bit floating point code with ISA 3.0 IEEE 128-bit floating point hardware instructions and it supports declaring functions with the ifunc attribute, enable ifunc functions to switch between software and hardware support. * configure.ac (powerpc*-*-linux*): Likewise. * configure: Regenerate. Co-Authored-By: Steven Munroe <munroesj@linux.vnet.ibm.com> Co-Authored-By: Tulio Magno Quites Machado Filho <tulioqm@br.ibm.com> From-SVN: r232685
2016-01-15t-msp430 (lib2_mul_none.o): Only use the first dependency as the source file ↵Nick Clifton2-5/+12
to be compiled. * config/msp430/t-msp430 (lib2_mul_none.o): Only use the first dependency as the source file to be compiled. (lib2_mul_16bit.o, lib2hw_mul_16.o, lib2hw_mul_32.o) (lib2hw_mul_f5.o): Likewise. From-SVN: r232402
2016-01-14Revert 2016-01-13 change.Michael Meissner18-1460/+23
From-SVN: r232392
2016-01-13rs6000-builtin.def (BU_FLOAT128_2): Add support for pack/unpack functions ↵Michael Meissner18-5/+1535
for __ibm128. [gcc] 2016-01-13 Michael Meissner <meissner@linux.vnet.ibm.com> * config/rs6000/rs6000-builtin.def (BU_FLOAT128_2): Add support for pack/unpack functions for __ibm128. (PACK_IF): Likewise. (UNPACK_IF): Likewise. * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add support for __ibm128 pack/unpack functions. (rs6000_invalid_builtin): Likewise. (rs6000_init_builtins): Likewise. (rs6000_opt_masks): Likewise. * config/rs6000/rs6000.h (MASK_FLOAT128): Add short name. (RS6000_BTM_FLOAT128): Add support for __ibm128 pack/unpack functions (RS6000_BTM_COMMON): Likewise. * config/rs6000/rs6000.md (f128_vsx): New mode attribute. (unpack<mode>): Use FMOVE128_FPR iterator instead of FMOVE128, to disallow __builtin_{pack,unpack}_longdouble if long double is IEEE 128-bit floating point. Add support for the double values to be in Altivec registers for TF/IF packing and unpacking, but restrict TD packing sub-fields to be FPR registers. Don't allow overlapped register support for packing. Allow pack inputs to be memory locations. Don't build generator functions for unpack<mode>_dm and unpack<mode>_nodm. (unpack<mode>_dm): Likewise. (unpack<mode>_nodm): Likewise. (pack<mode>): Likewise. * config/rs6000/rs6000-builtin.def (__builtin_pack_ibm128): Add built-in functions to pack/unpack explicit __ibm128 values. (__builtin_unpack_ibm128): Likewise. * doc/extend.texi (PowerPC Built-in Functions): Document __builtin_pack_ibm128 and __builtin_unpack_ibm128. [libgcc] 2016-01-13 Michael Meissner <meissner@linux.vnet.ibm.com> Steven Munroe <munroesj@linux.vnet.ibm.com> Tulio Magno Quites Machado Filho <tulioqm@br.ibm.com> * config/rs6000/sfp-exceptions.c: New file to provide exception support for IEEE 128-bit floating point. * config/rs6000/float128-hw.c: New file for ISA 3.0 IEEE 128-bit floating point hardware support. * config/rs6000/floattikf.c: New files for IEEE 128-bit floating point conversions. * config/rs6000/fixunskfti.c: Likewise. * config/rs6000/fixkfti.c: Likewise. * config/rs6000/floatuntikf.c: Likewise. * config/rs6000/extendkftf2-sw.c: Likewise. * config/rs6000/trunctfkf2-sw.c: Likewise. * config/rs6000/float128-ifunc.c: New file to pick either IEEE 128-bit floating point software emulation or use ISA 3.0 hardware support if it is available. * config/rs6000/quad-float128.h: New file to support IEEE 128-bit floating point. * config/rs6000/t-float128: New Makefile fragments to enable building __float128 emulation support. * config/rs6000/t-float128-hw: Likewise. * config/rs6000/float128-sed: New file to convert TF names to KF names for PowerPC IEEE 128-bit floating point support. * config/rs6000/sfp-machine.h (_FP_W_TYPE_SIZE): Use 64-bit types when building on 64-bit systems, or when VSX is enabled. (_FP_W_TYPE): Likewise. (_FP_WS_TYPE): Likewise. (_FP_I_TYPE): Likewise. (TItype): Define on 64-bit systems. (UTItype): Likewise. (TI_BITS): Likewise. (_FP_MUL_MEAT_D): Add support for using 64-bit types. (_FP_MUL_MEAT_Q): Likewise. (_FP_DIV_MEAT_D): Likewise. (_FP_DIV_MEAT_Q): Likewise. (_FP_NANFRAC_D): Likewise. (_FP_NANFRAC_Q): Likewise. (ISA_BIT): Add exception support if we are being compiled on a machine with hardware floating point support to build the IEEE 128-bit emulation functions. (FP_EX_INVALID): Likewise. (FP_EX_OVERFLOW): Likewise. (FP_EX_UNDERFLOW): Likewise. (FP_EX_DIVZERO): Likewise. (FP_EX_INEXACT): Likewise. (FP_EX_ALL): Likewise. (__sfp_handle_exceptions): Likewise. (FP_HANDLE_EXCEPTIONS): Likewise. (FP_RND_NEAREST): Likewise. (FP_RND_ZERO): Likewise. (FP_RND_PINF): Likewise. (FP_RND_MINF): Likewise. (FP_RND_MASK): Likewise. (_FP_DECL_EX): Likewise. (FP_INIT_ROUNDMODE): Likewise. (FP_ROUNDMODE): Likewise. * configure.ac (powerpc*-*-linux*): Check whether the PowerPC compiler can do __float128. * configure: Regenerate. * libgcc/config.host (powerpc*-*-linux*): If compiler can compile VSX code, enable IEEE 128-bit floating point. From-SVN: r232346
2016-01-05aix-unwind.h (ucontext_for): Handle AIX 7.1 specificities.Olivier Hainque2-3/+13
2016-01-05 Olivier Hainque <hainque@adacore.com> * config/rs6000/aix-unwind.h (ucontext_for): Handle AIX 7.1 specificities. From-SVN: r232082
2016-01-04Update copyright years.Jakub Jelinek979-977/+997
From-SVN: r232055
2015-12-18Add *-*-msdosdjgpp to lists of i[34567]86-*-* soft-fp targetsAndris Pavenis2-0/+6
* config.host: Add *-*-msdosdjgpp to lists of i[34567]86-*-* soft-fp targets From-SVN: r231803
2015-12-16unwind-generic.h (_Unwind_GetTextRelBase): Call __builtin_abort instead of ↵Bernd Edlinger2-3/+6
abort to avoid dependency on stdlib.h. 2015-12-16 Bernd Edlinger <bernd.edlinger@hotmail.de> * unwind-generic.h (_Unwind_GetTextRelBase): Call __builtin_abort instead of abort to avoid dependency on stdlib.h. From-SVN: r231697
2015-12-10fptr.c (__canonicalize_funcptr_for_compare): Remove code to initialize call ↵John David Anglin2-42/+33
to __dl_fixup once. * config/pa/fptr.c (__canonicalize_funcptr_for_compare): Remove code to initialize call to __dl_fixup once. From-SVN: r231486
2015-12-04gcc * config.gcc (extra_gcc_objs): Define for MSP430.Nick Clifton7-53/+293
* common/config/msp430/msp430-common.c (msp430_handle_option): Pass both -mmcu and -mcpu on to the back end if they are both defined. * config/msp430/msp430.c (hwmult_name): New function. (msp430_option_override): If an unrecognised MCU name is detected only warn if the user has not provided suitable -mhwmult and -mcpu options. Use msp430_warn_mcu to control warning messages. Generate warnings about conflicts between -mmcu and -mcpu and -mhwmult options. If neither -mcpu nor -mmcu have been specified but -mhwmult= f5series has the select the 430X isa. (msp430_no_hwmult): If -mmcu has not been specified and msp430_hwmult_type is AUTO then return true. * config/msp430/msp430.h (EXTRA_SPEC_FUNCTIONS): Define. (LIB_SPEC): Add hardware multiply library selection. * config/msp430/t-msp430: Delete hardware multiply multilibs. Add rule to build driver-msp430.o * config/msp430/driver-msp430.c: New file. * config/msp430/msp430.opt (warn-mcu): New option. * doc/invoke.texi: Update description of -mhwmult=auto. Document -mwarn-mcu option. tests * gcc.target/msp430/msp_abi_div_funcs.c: New test. * gcc.target/msp430/mul_main.h: New test support file. * gcc.target/msp430/mul_none.c: New test. * gcc.target/msp430/mul_16bit.c: New test. * gcc.target/msp430/mul_32bit.c: New test. * gcc.target/msp430/mul_f5.c: New test. libgcc * config/msp430/mpy.c (__mulhi3): Use a faster algorithm. Allow for the second argument being negative. * config.host (extra_parts): Define for MSP430. Create separate libraries for each of the hardware multiply formats. * config/msp430/lib2hw_mul.S: Build only the multiply routines that are needed. * config/msp430/lib2mul.c: Likewise. * config/msp430/t-msp430 (LIB2ADD): Remove lib2hw_mul.S. Add rules to build hardware multiply libraries. * config/msp430/lib2divSI.c: (__mspabi_divlu): Alias for __mspabi_divul function. (__mspabi_divllu): New stub function. From-SVN: r231286
2015-12-01fptr.c (__canonicalize_funcptr_for_compare): Initialize fixup values if ↵John David Anglin2-4/+16
saved GOT address doesn't match runtime address. * config/pa/fptr.c (__canonicalize_funcptr_for_compare): Initialize fixup values if saved GOT address doesn't match runtime address. (fixup_branch_offset): Reorder list. From-SVN: r231135
2015-11-25Port libvtv to SolarisRainer Orth3-4/+21
libstdc++-v3: * acinclude.m4 (GLIBCXX_ENABLE_VTABLE_VERIFY) <solaris2*>: Use -Wl,-R in VTV_CXXLINKFLAGS. * configure: Regenerate. * testsuite/18_support/bad_exception/23591_thread-1.c: Use -fvtable-verify=none on Solaris 12+. libgcc: * Makefile.in (VTV_CFLAGS): New variable. (vtv_start$(objext), vtv_end$(objext), vtv_end$(objext)) (vtv_start_preinit$(objext), vtv_end_preinit$(objext)): Use it. * config.host (*-*-solaris2*): Add t-crtstuff-pic to tmake_file. Add vtv_start.o, vtv_end.o, vtv_start_preinit.o, vtv_end_preinit.o to extra_parts if $enable_vtable_verify = yes. libvtv: * configure.tgt (*-*-solaris2.[1-9]*): Declare supported. * configure.ac: Call AC_USE_SYSTEM_EXTENSIONS. <*-*-solaris2*>: Check for init priority support. Check for getexecname, __fortify_fail, _obstack_begin. (VTV_NO_OBSTACK): New conditional. * configure: Regenerate. * Makefile.am [VTV_NO_OBSTACK] (obstack.c): Use new condition. Create empty config.h * Makefile.in: Regenerate. * vtv_rts.cc [HAVE_GETEXECNAME] (program_invocation_name): New variable. (read_section_offset_and_length) [HAVE_GETEXECNAME]: Set it. (dl_iterate_phdr_callback) [HAVE_GETEXECNAME]: Set it. (__fortify_fail): Wrap in HAVE___FORTIFY_FAIL [!HAVE___FORTIFY_FAIL]: Provide non-Cygwin implementation. (read_section_offset_and_length): Assert sh_size >= VTV_PAGE_SIZE. (iterate_modules): Fix typo. Use VTV_PAGE_SIZE. (dl_iterate_phdr_callback): Fix typo. Use VTV_PAGE_SIZE. (__VLTChangePermission): Fix typos. include: * vtv-change-permission.h (VTV_PAGE_SIZE) [__sun__ && __svr4__ && __sparc__]: Define. gcc: * config/sol2.h (SUPPORTS_INIT_PRIORITY): Move up. (STARTFILE_VTV_SPEC, ENDFILE_VTV_SPEC): Define. (STARTFILE_SPEC): Use %(startfile_vtv). (ENDFILE_SPEC): Use %(endfile_vtv). (SUBTARGET_EXTRA_SPECS): Handle STARTFILE_VTV_SPEC, ENDFILE_VTV_SPEC. * gcc.c (LINK_COMMAND_SPEC): Move VTABLE_VERIFICATION_SPEC after %{L*}. From-SVN: r230865
2015-11-23[ARM] PR target/68059 libgcc should not use __write for printing fatal errorSzabolcs Nagy2-2/+8
libgcc/ PR target/68059 * config/arm/linux-atomic-64bit.c (__write): Rename to... (write): ...this and fix the return type. From-SVN: r230762
2015-11-19* config/msp430/lib2hw_mul.S: Fix alignment.DJ Delorie2-1/+5
From-SVN: r230633
2015-11-18nvptx.c (global_lock_var): New.Nathan Sidwell3-1/+38
gcc/ * config/nvptx/nvptx.c (global_lock_var): New. (nvptx_global_lock_addr): New. (nvptx_lockless_update): Recomment and adjust for clarity. (nvptx_lockfull_update): New. (nvptx_reduction_update): New. (nvptx_goacc_reduction_fini): Call it. libgcc/ * config/nvptx/reduction.c: New. * config/nvptx/t-nvptx (LIB2ADD): Add it. libgomp/ * testsuite/libgomp.oacc-c-c++-common/reduction-cplx-flt.c: Add worker & gang cases. * testsuite/libgomp.oacc-c-c++-common/reduction-cplx-dbl.c: Likewise. From-SVN: r230545
2015-11-15on_exit.c: New file.David Edelsohn4-1/+58
* config/rs6000/on_exit.c: New file. * config/rs6000/t-aix-cxa (LIB2ADDEH): Build on_exit.c. * config/rs6000/libgcc-aix-cxa.ver (on_exit): Add symbol to exports. From-SVN: r230398
2015-11-11dp-hack.h: Add support for ARCHS.Claudiu Zissulescu11-31/+91
2015-11-11 Claudiu Zissulescu <claziss@synopsys.com> * config/arc/dp-hack.h: Add support for ARCHS. * config/arc/ieee-754/divdf3.S: Likewise. * config/arc/ieee-754/divsf3-stdmul.S: Likewise. * config/arc/ieee-754/muldf3.S: Likewise. * config/arc/ieee-754/mulsf3.S: Likewise * config/arc/lib1funcs.S: Likewise * config/arc/gmon/dcache_linesz.S: Don't read the build register for ARCv2 cores. * config/arc/gmon/profil.S (__profil, __profil_irq): Don't profile for ARCv2 cores. * config/arc/ieee-754/arc-ieee-754.h (MPYHU, MPYH): Define. * config/arc/t-arc700-uClibc: Remove hard selection for ARC 700 cores. From-SVN: r230151
2015-11-09Support init priority on SolarisRainer Orth3-2/+8
libgcc: * config/ia64/crtbegin.S: Check HAVE_INITFINI_ARRAY_SUPPORT value. * config/ia64/crtend.S: Likewise. gcc: * acinclude.m4 (gcc_AC_INITFINI_ARRAY): Allow for differences in assembler syntax. Support Solaris ld. Define HAVE_INITFINI_ARRAY_SUPPORT as 0/1. * config/sol2.h (SUPPORTS_INIT_PRIORITY): Define to HAVE_INITFINI_ARRAY_SUPPORT. * config/initfini-array.h: Check HAVE_INITFINI_ARRAY_SUPPORT value. * configure.ac (gcc_cv_as_sparc_nobits): Remove. * config/sparc/sparc.c (sparc_solaris_elf_asm_named_section): Don't check HAVE_AS_SPARC_NOBITS. Heed SECTION_NOTYPE. * configure: Regenerate. * config.in: Regenerate. From-SVN: r230013
2015-11-07replace BITS_PER_UNIT with __CHAR_BIT__ in target libsTrevor Saunders7-26/+37
libgcc/ChangeLog: 2015-11-07 Trevor Saunders <tbsaunde+gcc@tbsaunde.org> * config/visium/lib2funcs.c (__set_trampoline_parity): Use __CHAR_BIT__ instead of BITS_PER_UNIT. * fixed-bit.h: Likewise. * fp-bit.h: Likewise. * libgcc2.c (__popcountSI2): Likewise. (__popcountDI2): Likewise. * libgcc2.h: Likewise. * libgcov.h: Likewise. libobjc/ChangeLog: 2015-11-07 Trevor Saunders <tbsaunde+gcc@tbsaunde.org> PR libobjc/24775 * encoding.c (_darwin_rs6000_special_round_type_align): Use __CHAR_BIT__ instead of BITS_PER_UNIT. (objc_sizeof_type): Likewise. (objc_layout_structure): Likewise. (objc_layout_structure_next_member): Likewise. (objc_layout_finish_structure): Likewise. (objc_layout_structure_get_info): Likewise. From-SVN: r229936
2015-11-07atexit.c: New file.David Edelsohn5-3/+60
* config/rs6000/atexit.c: New file. * config/rs6000/t-aix-cxa (LIB2ADDEH): Build atexit.c. * config/rs6000/libgcc-aix-cxa.ver (atexit): Add symbol to exports. * config/rs6000/cxa_finalize.c (catomic_compare_and_exchange_bool_acq): Negate return value. From-SVN: r229932
2015-10-30libgcc changes for AMD znver1.Venkataramanan Kumar2-0/+14
2015-10-30 Venkataramanan Kumar <venkataramanan.kumar@amd.com> * config/i386/i386.c (get_builtin_code_for_version): Set priority for PROCESSOR_ZNVER1. (enum processor_model): Add M_AMDFAM17H_znver1. (struct arch_names_table): Likewise. * doc/extend.texi: ADD znver1. 2015-10-30 Venkataramanan Kumar <venkataramanan.kumar@amd.com> * config/i386/cpuinfo.c (enum processor_types): Add AMDFAM17H. (processor_subtypes): Add znver1. (get_amd_cpu): Detect znver1. From-SVN: r229575
2015-10-29config.host (arm*-*-eabi*, [...]): Include crtfastmath.o.Christophe Lyon2-1/+7
2015-10-29 Christophe Lyon <christophe.lyon@linaro.org> * config.host (arm*-*-eabi*, arm*-*-symbianelf*, arm*-*-rtems*): Include crtfastmath.o. From-SVN: r229529
2015-10-23re PR libgcc/66883 (config/epiphany/udivsi3-float.c:52: bad if test ?)Joern Rennecke2-2/+7
PR libgcc/66883 * config/epiphany/udivsi3-float.c: Fix CONCISE test, and comment typo. N.B., this is not active code, just documenting a previous approach for this function in C. From-SVN: r229236
2015-10-16divmodqi.S: Return 0x00 by default for div by 0.Kaushik Phatak4-2/+18
* config/rl78/divmodqi.S: Return 0x00 by default for div by 0. * config/rl78/divmodsi.S: Update return register to r8. * config/rl78/divmodhi.S: Update return register to r8,r9. Branch to main_loop_done_himode to pop registers before return. From-SVN: r228926
2015-10-11Add bdver4 for multiversioning and fix AMD model detection.Venkataramanan Kumar2-1/+9
2015-10-09 Venkataramanan kumar <venkataramanan.kumar@amd.com> * config/i386/cpuinfo.c (get_amd_cpu): Detect bdver4. (__cpu_indicator_init): Fix model selection for AMD CPUs. From-SVN: r228691
2015-10-05cpuinfo.c (get_intel_cpu): Detect "skylake-avx512".Kirill Yukhin2-0/+10
libgcc/ * config/i386/cpuinfo.c (get_intel_cpu): Detect "skylake-avx512". gcc/testsuite/ * gcc.target/i386/builtin_target.c: Add check for "skylake-avx512". From-SVN: r228481
2015-10-03xtensa: add uclinux supportMax Filippov2-0/+9
2015-10-03 Max Filippov <jcmvbkbc@gmail.com> gcc/ * config.gcc (xtensa*-*-uclinux*): New configuration. * config/xtensa/uclinux.h: New file. * config/xtensa/uclinux.opt: New file. libgcc/ * config.host (xtensa*-*-uclinux*): New configuration. From-SVN: r228450
2015-10-02AVX-512.Kirill Yukhin2-1/+12
AVX-512. Add missing features to cpuinfo.c gcc/ * config/i386/i386.c (processor_features): Add F_AVX512VBMI, F_AVX512IFMA. (isa_names_table): Handle F_AVX512VBMI and F_AVX512IFMA. libgcc/ * config/i386/cpuinfo.c (processor_features): Add FEATURE_AVX512VBMI and FEATURE_AVX512VBMI. testsuite/ * gcc.target/i386/builtin_target.c: Handle "avx512ifma" and "avx512vbmi". From-SVN: r228399
2015-09-28Update soft-fp from glibc.Joseph Myers82-136/+587
This patch updates the soft-fp code in libgcc from glibc. There are no changes here of significance to the use of soft-fp in GCC (and so no testsuite additions); it's simply an update to bring in the latest soft-fp version (which will also hopefully go into Linux 4.4 to replace the 15-year-old copy currently in Linux). Bootstrapped with no regressions on x86_64-pc-linux-gnu. * soft-fp/adddf3.c: Update from glibc. * soft-fp/addsf3.c: Likewise. * soft-fp/addtf3.c: Likewise. * soft-fp/divdf3.c: Likewise. * soft-fp/divsf3.c: Likewise. * soft-fp/divtf3.c: Likewise. * soft-fp/double.h: Likewise. * soft-fp/eqdf2.c: Likewise. * soft-fp/eqsf2.c: Likewise. * soft-fp/eqtf2.c: Likewise. * soft-fp/extenddftf2.c: Likewise. * soft-fp/extended.h: Likewise. * soft-fp/extendsfdf2.c: Likewise. * soft-fp/extendsftf2.c: Likewise. * soft-fp/extendxftf2.c: Likewise. * soft-fp/fixdfdi.c: Likewise. * soft-fp/fixdfsi.c: Likewise. * soft-fp/fixdfti.c: Likewise. * soft-fp/fixsfdi.c: Likewise. * soft-fp/fixsfsi.c: Likewise. * soft-fp/fixsfti.c: Likewise. * soft-fp/fixtfdi.c: Likewise. * soft-fp/fixtfsi.c: Likewise. * soft-fp/fixtfti.c: Likewise. * soft-fp/fixunsdfdi.c: Likewise. * soft-fp/fixunsdfsi.c: Likewise. * soft-fp/fixunsdfti.c: Likewise. * soft-fp/fixunssfdi.c: Likewise. * soft-fp/fixunssfsi.c: Likewise. * soft-fp/fixunssfti.c: Likewise. * soft-fp/fixunstfdi.c: Likewise. * soft-fp/fixunstfsi.c: Likewise. * soft-fp/fixunstfti.c: Likewise. * soft-fp/floatdidf.c: Likewise. * soft-fp/floatdisf.c: Likewise. * soft-fp/floatditf.c: Likewise. * soft-fp/floatsidf.c: Likewise. * soft-fp/floatsisf.c: Likewise. * soft-fp/floatsitf.c: Likewise. * soft-fp/floattidf.c: Likewise. * soft-fp/floattisf.c: Likewise. * soft-fp/floattitf.c: Likewise. * soft-fp/floatundidf.c: Likewise. * soft-fp/floatundisf.c: Likewise. * soft-fp/floatunditf.c: Likewise. * soft-fp/floatunsidf.c: Likewise. * soft-fp/floatunsisf.c: Likewise. * soft-fp/floatunsitf.c: Likewise. * soft-fp/floatuntidf.c: Likewise. * soft-fp/floatuntisf.c: Likewise. * soft-fp/floatuntitf.c: Likewise. * soft-fp/gedf2.c: Likewise. * soft-fp/gesf2.c: Likewise. * soft-fp/getf2.c: Likewise. * soft-fp/ledf2.c: Likewise. * soft-fp/lesf2.c: Likewise. * soft-fp/letf2.c: Likewise. * soft-fp/muldf3.c: Likewise. * soft-fp/mulsf3.c: Likewise. * soft-fp/multf3.c: Likewise. * soft-fp/negdf2.c: Likewise. * soft-fp/negsf2.c: Likewise. * soft-fp/negtf2.c: Likewise. * soft-fp/op-1.h: Likewise. * soft-fp/op-2.h: Likewise. * soft-fp/op-4.h: Likewise. * soft-fp/op-8.h: Likewise. * soft-fp/op-common.h: Likewise. * soft-fp/quad.h: Likewise. * soft-fp/single.h: Likewise. * soft-fp/soft-fp.h: Likewise. * soft-fp/subdf3.c: Likewise. * soft-fp/subsf3.c: Likewise. * soft-fp/subtf3.c: Likewise. * soft-fp/truncdfsf2.c: Likewise. * soft-fp/trunctfdf2.c: Likewise. * soft-fp/trunctfsf2.c: Likewise. * soft-fp/trunctfxf2.c: Likewise. * soft-fp/unorddf2.c: Likewise. * soft-fp/unordsf2.c: Likewise. * soft-fp/unordtf2.c: Likewise. From-SVN: r228223
2015-09-24ARM: fp16 Fix PR 67624 - Incorrect conversion of float Infinity to __fp16Richard Earnshaw2-2/+10
PR libgcc/67624 libgcc: * config/arm/fp16.c (__gnu_f2h_internal): Handle infinity correctly. gcc/testsuite: * gcc.target/arm/fp16-inf.c: New test. From-SVN: r228082
2015-09-24Support PIE on SolarisRainer Orth5-8/+23
gcc/testsuite: * lib/target-supports.exp (check_effective_target_pie): Check for PIE support on Solaris 11.x and 12. libgcc: * config.host (*-*-solaris2*): Add t-crtstuff-pic to tmake_file. Add crtbeginS.o, crtendS.o to extra_parts if libgcc_cv_solaris_crts. * config/sol2/gmon.c: (monstartup): Don't write trailing NUL of messages. (internal_mcount): Likewise. * config/sol2/t-sol2 (crtp.o, crtpg.o, gmon.o): Compile with crt_compile, add CRTSTUFF_T_CFLAGS_S. gcc: * configure.ac (gcc_cv_ld_pie): Check for gld >= 2.26 on Solaris. Check for ld -type pie on Solaris 11.x and 12. * configure: Regenerate. * config.in: Regenerate. * gcc.c (LD_PIE_SPEC): Allow redefinition. * config/sol2.h (STARTFILE_CRTBEGIN_SPEC): Define. (STARTFILE_SPEC): Use it. (ENDFILE_CRTEND_SPEC): Define. (ENDFILE_SPEC): Use it and ENDFILE_ARCH_SPEC. (SUBTARGET_EXTRA_SPECS): Add STARTFILE_CRTBEGIN_SPEC, ENDFILE_ARCH_SPEC, ENDFILE_CRTEND_SPEC. [HAVE_LD_PIE && HAVE_SOLARIS_CRTS] (LD_PIE_SPEC): Define. (!(HAVE_LD_PIE && HAVE_SOLARIS_CRTS)] (LINK_PIE_SPEC): Define. * config/i386/sol2.h (ENDFILE_SPEC): Remove. (ENDFILE_ARCH_SPEC): Define. * config/sparc/sol2.h (ENDFILE_ARCH_SPEC): Define. From-SVN: r228078
2015-09-24Use CRTs provided by SolarisRainer Orth9-16/+190
gcc: * configure.ac (gcc_cv_solaris_crts): New test. * configure. Regenerate. * config.in: Regenerate. * config/sol2.h (STARTFILE_SPEC): Simplify, provide HAVE_SOLARIS_CRTS variant. libgcc: * configure.ac (libgcc_cv_solaris_crts): New test. * configure: Regenerate. * config.in: Regenerate. * config/sol2/crtp.c, config/sol2/crtpg.c: New files. * config/gmon-sol2.c: Rename to ... * config/sol2/gmon.c: ... this. Include auto-target.h. (internal_mcount): Wrap setup handling in !HAVE_SOLARIS_CRTS. * config/t-sol2: Rename to ... * config/sol2/t-sol2: ... this. (gmon.o): Reflect renaming. (crtp.o, crtpg.o): New rules. * config.host (*-*-solaris2*): Reflect renaming. Use system CRTs if present. Remove default CRT case. From-SVN: r228077
2015-09-23linux-atomic.c (__kernel_cmpxchg2): Reorder error checks.John David Anglin2-16/+68
* config/pa/linux-atomic.c (__kernel_cmpxchg2): Reorder error checks. (__sync_fetch_and_##OP##_##WIDTH): Change result to match type of __kernel_cmpxchg2. (__sync_##OP##_and_fetch_##WIDTH): Likewise. (__sync_val_compare_and_swap_##WIDTH): Likewise. (__sync_bool_compare_and_swap_##WIDTH): Likewise. (__sync_lock_test_and_set_##WIDTH): Likewise. (__sync_lock_release_##WIDTH): Likewise. (__sync_fetch_and_##OP##_4): Change result to match type of __kernel_cmpxchg. (__sync_##OP##_and_fetch_4): Likewise. (__sync_val_compare_and_swap_4): Likewise. (__sync_bool_compare_and_swap_4): likewise. (__sync_lock_test_and_set_4): Likewise. (__sync_lock_release_4): Likewise. (FETCH_AND_OP_2): Add long long variants. (OP_AND_FETCH_2): Likewise. (COMPARE_AND_SWAP_2 ): Likewise. (SYNC_LOCK_TEST_AND_SET_2): Likewise. (SYNC_LOCK_RELEASE_2): Likewise. (__sync_bool_compare_and_swap_##WIDTH): Correct return. From-SVN: r228065
2015-09-22AVX-512. Introduce SKylake server CPU.Kirill Yukhin2-2/+27
gcc/ * config.gcc: Support "skylake-avx512". * config/i386/i386-c.c (ix86_target_macros_internal): Handle PROCESSOR_SKYLAKE_AVX512. * config/i386/i386.c (m_SKYLAKE_AVX512): Define. (processor_target_table): Add "skylake-avx512". (PTA_SKYLAKE_AVX512): Define. (ix86_option_override_internal): Add "skylake_avx512". (fold_builtin_cpu): Handle "skylake_avx512", add F_AVX512VL F_AVX512BW, F_AVX512DQ, F_AVX512ER, F_AVX512PF, F_AVX512CD. * config/i386/i386.h (TARGET_SKYLAKE_AVX512): Define. (processor_type): Add PROCESSOR_SKYLAKE_AVX512. * doc/invoke.texi (skylake-avx512): New. libgcc/ * libgcc/config/i386/cpuinfo.c (enum processor_features): Add FEATURE_AVX512VL, FEATURE_AVX512BW, FEATURE_AVX512DQ, FEATURE_AVX512CD, FEATURE_AVX512ER, FEATURE_AVX512PF. (get_available_features): Habdle new features. gcc/testsuite/ * gcc.target/i386/funcspec-5.c: Test avx512vl, avx512bw, avx512dq, avx512cd, avx512er, avx512pf and skylake-avx512. * gcc.target/i386/builtin_target.c: Test avx512vl, avx512bw, avx512dq, avx512cd, avx512er and avx512pf. From-SVN: r228009
2015-09-21[FT32] fixes for the default hardware startupJames Bowman2-27/+33
libgcc/ * config/ft32/crti-hw.S: Use __PMSIZE to allow configurable memory layout. Deal correctly with BSS region larger than 32K. Handle a watchdog reset like a power-on reset. Clean up unused code. From-SVN: r227986
2015-09-18Update copyright.David Edelsohn1-1/+1
From-SVN: r227912
2015-09-18config.host (powerpc-ibm-aix*): Add crtdbase.o to extra_parts.Andrew Dixie4-1/+42
libgcc/ * config.host (powerpc-ibm-aix*): Add crtdbase.o to extra_parts. * config/rs6000/crtdbase.S: New file. * config/rs6000/t-aix-cxa: Build crtdbase.o. gcc/ * defaults.h (EH_FRAME_SECTION_NAME): Depend on EH_FRAME_THROUGH_COLLECT2. * dwarf2asm.c (dw2_asm_output_encoded_addr_rtx): Add case for DW_EH_PE_datarel. * dwarf2out.c (switch_to_eh_frame_section): Use a read-only section even if EH_FRAME_SECTION_NAME is undefined. Restrict special collect2 labels to EH_FRAME_THROUGH_COLLECT2. * except.c (switch_to_exception_section): Use a read-only section even if EH_FRAME_SECTION_NAME is undefined. * system.h (EH_FRAME_IN_DATA_SECTION): Poison. * collect2.c (write_c_file_stat): Provide dbase on AIX. (scan_prog_file): Don't export __dso_handle nor __gcc_unwind_dbase. * config/rs6000/aix.h (ASM_PREFERRED_EH_DATA_FORMAT): Define. (EH_TABLES_CAN_BE_READ_ONLY): Define. (ASM_OUTPUT_DWARF_PCREL): Define. (ASM_OUTPUT_DWARF_DATAREL): Define. (EH_FRAME_THROUGH_COLLECT2): Define. (EH_FRAME_IN_DATA_SECTION): Delete. * config/rs6000/rs6000.c (rs6000_aix_asm_output_dwarf_pcrel): New. (rs6000_aix_asm_output_dwarf_datarel): New. (rs6000_xcoff_asm_init_sections): Don't set exception_section. * config/spu/spu-elf.h (EH_FRAME_IN_DATA_SECTION): Delete. (EH_FRAME_THROUGH_COLLECT2): Define. * config/i386/i386-interix.h (EH_FRAME_IN_DATA_SECTION): Delete. (EH_FRAME_THROUGH_COLLECT2): Define. (EH_TABLES_CAN_BE_READ_ONLY): Define. * doc/tm.texi.in (EH_FRAME_IN_DATA_SECTION): Delete. (EH_FRAME_THROUGH_COLLECT2): New. (ASM_OUTPUT_DWARF_DATAREL): New. * doc/tm.texi: Regenerate. Co-Authored-By: David Edelsohn <dje.gcc@gmail.com> From-SVN: r227906
2015-09-15xtensa: fix xtensa_fallback_frame_state for call0 ABIMax Filippov2-2/+33
2015-09-15 Max Filippov <jcmvbkbc@gmail.com> gcc/ * config/xtensa/xtensa.h (DWARF_ALT_FRAME_RETURN_COLUMN): New definition. (DWARF_FRAME_REGISTERS): Reserve space for one extra register in call0 ABI. libgcc/ * config/xtensa/linux-unwind.h (xtensa_fallback_frame_state): Add support for call0 ABI. From-SVN: r227809
2015-09-13fptr.c (SIGN_EXTEND): Cast -1 to unsigned.John David Anglin2-1/+5
* config/pa/fptr.c (SIGN_EXTEND): Cast -1 to unsigned. From-SVN: r227717
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