Commit Graph

806 Commits

Author SHA1 Message Date
Oleg Endo 9129c8cfcd crt1.S: Remove SH5 support.
libgcc/
	* config/sh/crt1.S: Remove SH5 support.
	* config/sh/crti.S: Likewise.
	* config/sh/crtn.S: Likewise.
	* config/sh/lib1funcs-4-300.S: Likewise.
	* config/sh/lib1funcs-Os-4-200.S: Likewise.
	* config/sh/lib1funcs.S: Likewise.
	* config/sh/linux-unwind.h: Likewise.
	* config/sh/t-sh64: Delete.

From-SVN: r235640
2016-04-29 14:10:26 +00:00
Claudiu Zissulescu 39d5046452 [ARC] Handle FPX NaN within optimized floating point library.
gcc/
2016-04-29  Claudiu Zissulescu  <claziss@synopsys.com>

	* testsuite/gcc.target/arc/ieee_eq.c: New test.

libgcc/
2016-04-29  Claudiu Zissulescu  <claziss@synopsys.com>

	* config/arc/ieee-754/eqdf2.S: Handle FPX NaN.

From-SVN: r235633
2016-04-29 12:49:26 +02:00
Claudiu Zissulescu 8b48923bac [ARC/LIBGCC] Add TLS support.
libgcc/
2016-04-28  Claudiu Zissulescu  <claziss@synopsys.com>
	    Joern Rennecke  <joern.rennecke@embecosm.com>

	* config/arc/crttls.S: New file.
	* config/arc/t-arc: New rule.
	* config.host (arc*-*-elf*, arc*-*-linux*): Add crttls.o.

Co-Authored-By: Joern Rennecke <joern.rennecke@embecosm.com>

From-SVN: r235558
2016-04-28 13:53:34 +02:00
Nick Clifton 2de1cf8c4b cmpd.c (__mspabi_cmpf): Add prototype.
* config/msp430/cmpd.c (__mspabi_cmpf): Add prototype.
	(__mspabi_cmpd): Likewise.
	* config/msp430/floathidf.c (__floathidf): Likewise.
	* config/msp430/floathisf.c (__floathisf): Likewise
	* config/msp430/floatunhidf.c (__floatunssidf): Likewise.
	* config/msp430/floatunhisf.c (__floatunshisf): Likewise.
	* config/msp430/lib2shift.c (__ashlsi3): Take a signed char as the
	second parameter.
	(__ashrsi3): Likewise.

From-SVN: r235409
2016-04-25 11:13:35 +00:00
Waldemar Brodkorb b8ce3fe29d * config/m68k/linux-atomic.c: Do not include unistd.h
From-SVN: r235358
2016-04-21 23:43:43 -06:00
Martin Galvan 4986f823a2 ieee754-df.S: Fix typos in comments.
2016-04-20  Martin Galvan  <martin.galvan@tallertechnologies.com>

	libgcc/
	* config/arm/ieee754-df.S: Fix typos in comments.

From-SVN: r235291
2016-04-20 11:49:13 -04:00
Michael Meissner 35fbda430d re PR target/70381 (On powerpc, -mfloat128 is on by default for all VSX systems)
[gcc]
2016-04-11  Michael Meissner  <meissner@linux.vnet.ibm.com>

	PR target/70381
	* config/rs6000/rs6000.c (rs6000_opt_masks): Disable using the
	target attribute and pragma from changing the -mfloat128
	and -mfloat128-hardware options.

	* doc/extend.texi (Additional Floating Types): Document PowerPC
	__float128 restrictions.

[libgcc]
2016-04-11  Michael Meissner  <meissner@linux.vnet.ibm.com>

	PR target/70381
	* configure.ac (powerpc*-*-linux*): Rework tests to build
	__float128 emulation routines to not depend on using #pragma GCC
	target to enable -mfloat128.
	* configure: Regnerate.

[gcc/testsuite]
2016-04-11  Michael Meissner  <meissner@linux.vnet.ibm.com>

	PR target/70381
	* gcc.target/powerpc/float128-1.c: New tests to make sure the
	__float128 emulator is built and runs.
	* gcc.target/powerpc/float128-1.c: Likewise.

	* lib/target-supports.exp (check_ppc_float128_sw_available):
	Rework tests for __float128 software and hardware
	availability. Fix exit condition to return 0 on success.

From-SVN: r234884
2016-04-11 19:45:35 +00:00
Eric Botcazou 72d1a48d2b re PR target/67172 (i686-w64-mingw32 dwarf2 bootstrap fails with undefined reference to __EH_FRAME_BEGIN__)
PR target/67172
	* libgcc2.c (L__main): Undefine __LIBGCC_EH_FRAME_SECTION_NAME__ if
	__MINGW32__ is defined.

From-SVN: r234727
2016-04-04 22:29:02 +00:00
James Bowman dc2e899536 ft32.opt (mnodiv): New.
* config/ft32/ft32.opt (mnodiv): New.
	* config/ft32/ft32.md (*divsi3, *modsi3): Qualify with
	TARGET_NODIV.
	* doc/invoke.texi (FT32 Options -mnodiv): New.
        * libgcc/config/ft32/lib1funcs.S (*divsi3, *modsi3): New.

From-SVN: r234516
2016-03-29 00:37:26 +00:00
Michael Meissner 104cdaf14f re PR libgcc/70363 (PowerPC __float128 to long double doesn't link if built with an assember without ISA 3.0 support)
2016-03-22  Michael Meissner  <meissner@linux.vnet.ibm.com>

	PR libgcc/70363
	* config/rs6000/extendkftf2-sw.c (__extendkftf2_sw): If libgcc was
	built with an assembler that does not support ISA 3.0
	instructions, rename __extendkftf2_sw to __extendkftf2.

From-SVN: r234408
2016-03-22 21:05:43 +00:00
Rainer Orth a5046f48b3 Save call-clobbered registers in _mcount on 32-bit Solaris/x86 (PR target/38239)
PR target/38239
	* config/sol2/gmon.c [__i386__] (_mcount): Save and restore
	call-clobbered registers.
	(internal_mcount): Remove __i386__ handling.

From-SVN: r234256
2016-03-16 11:57:02 +00:00
Joel Sherrill df674f74a5 config.host: Add x86_64-*-rtems*.
2016-02-26  Joel Sherrill <joel@rtems.org>

	* config.host: Add x86_64-*-rtems*.

From-SVN: r233762
2016-02-26 20:02:28 +00:00
Joel Sherrill 7cb065d6a3 config.host: Add aarch64-*-rtems*.
2016-02-26  Joel Sherrill <joel@rtems.org>

	* libgcc/config.host: Add aarch64-*-rtems*.

From-SVN: r233759
2016-02-26 19:59:04 +00:00
Paul E. Murphy 47dfdc53cd sfp-machine.h (_FP_DECL_EX): Declare _fpsr as a union of u64 and double.
2016-02-26  Paul E. Murphy  <murphyp@linux.vnet.ibm.com>
	    Bill Schmidt  <wschmidt@linux.vnet.ibm.com>

	* config/rs6000/sfp-machine.h (_FP_DECL_EX): Declare _fpsr as a
	union of u64 and double.
	(FP_TRAPPING_EXCEPTIONS): Return a bitmask of trapping exceptions.
	(FP_INIT_ROUNDMODE): Read the fpscr instead of writing a mystery
	value.
	(FP_ROUNDMODE): Update the usage of _fpscr.


Co-Authored-By: Bill Schmidt <wschmidt@linux.vnet.ibm.com>

From-SVN: r233756
2016-02-26 19:20:54 +00:00
Ilya Verbin e6861a99f8 re PR driver/68463 (Offloading fails when some objects are compiled with LTO and some without)
gcc/
	PR driver/68463
	* config/gnu-user.h (CRTOFFLOADBEGIN): Define.  Add crtoffloadbegin.o if
	offloading is enabled and -fopenacc or -fopenmp is specified.
	(CRTOFFLOADEND): Likewise.
	(GNU_USER_TARGET_STARTFILE_SPEC): Add CRTOFFLOADBEGIN.
	(GNU_USER_TARGET_ENDFILE_SPEC): Add CRTOFFLOADEND.
	* lto-wrapper.c (offloadbegin, offloadend): Remove static vars.
	(offload_objects_file_name): New static var.
	(tool_cleanup): Remove offload_objects_file_name file.
	(find_offloadbeginend): Replace with ...
	(find_crtoffloadtable): ... this.
	(run_gcc): Remove offload_argc and offload_argv.
	Get offload_objects_file_name from -foffload-objects=... option.
	Read names of object files with offload from this file, pass them to
	compile_images_for_offload_targets.  Don't call find_offloadbeginend and
	don't pass offloadbegin and offloadend to the linker.  Don't pass
	offload non-LTO files to the linker, because now they're not claimed.
libgcc/
	PR driver/68463
	* Makefile.in (crtoffloadtable$(objext)): New rule.
	* configure.ac (extra_parts): Add crtoffloadtable$(objext) if
	enable_offload_targets is not empty.
	* configure: Regenerate.
	* offloadstuff.c: Move __OFFLOAD_TABLE__ from crtoffloadend to
	crtoffloadtable.
libgomp/
	PR driver/68463
	* testsuite/libgomp.oacc-c-c++-common/parallel-dims-2.c: Remove.
lto-plugin/
	PR driver/68463
	* lto-plugin.c (struct plugin_offload_file): New.
	(offload_files): Change type.
	(offload_files_last, offload_files_last_obj): New.
	(offload_files_last_lto): New.
	(free_2): Adjust accordingly.
	(all_symbols_read_handler): Don't add offload files to lto_arg_ptr.
	Don't call free_1 for offload_files.  Write names of object files with
	offloading to the temporary file.  Add new option to lto_arg_ptr.
	(claim_file_handler): Don't claim file if it contains offload sections
	without LTO sections.  If it contains offload sections, add to the list.

From-SVN: r233712
2016-02-25 12:23:52 +00:00
Max Filippov 9bfcbdeecf xtensa: fix libgcc build with --text-section-literals
Functions __muldf3_aux, __divdf3_aux, __mulsf3_aux and __divsf3_aux
don't start with leaf_entry, so they need explicit .literal_position,
otherwise libgcc build fails in the presence of --text-section-literals.

2016-02-17  Max Filippov  <jcmvbkbc@gmail.com>
libgcc/
	* config/xtensa/ieee754-df.S (__muldf3_aux, __divdf3_aux): Add
	.literal_position before the function.
	* config/xtensa/ieee754-sf.S (__mulsf3_aux, __divsf3_aux):
	Likewise.

From-SVN: r233505
2016-02-17 20:21:48 +00:00
Marcin Kościelnicki 4cb4721f93 S/390: Add -fsplit-stack support
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-15 10:20:18 +00:00
Walter Lee b29d9a29a1 config.host (tilegx*-*-linux*): remove ti from softfp_int_modes for 32-bit configs.
libgcc/ChangeLog:
        * config.host (tilegx*-*-linux*): remove ti from
          softfp_int_modes for 32-bit configs.

From-SVN: r233389
2016-02-12 21:15:43 +00:00
Ian Lance Taylor 03a0ae7d98 re PR go/68562 (morestack misaligns stack on x86_64)
PR go/68562
	* config/i386/morestack.S (__stack_split_initialize): Align
	stack.

From-SVN: r233273
2016-02-10 15:14:05 +00:00
Andreas Tobler 68750bce88 re PR bootstrap/69611 (Bootstrap broken on PowerPC FreeBSD, IEEE 128-bit 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-02-03 23:15:21 +01:00
Jakub Jelinek 7d29695329 re PR target/69444 (recent changes broke x64_64 -> powerpc crosscompiler build)
PR target/69444
	* config/rs6000/sfp-machine.h: Fix a typo in #ifndef - __NO_FPRS__
	instead of ___NO_FPRS__.

From-SVN: r232805
2016-01-25 22:37:08 +01:00
Michael Meissner e271cba1f5 Add missing file
From-SVN: r232695
2016-01-21 18:45:26 +00:00
Michael Meissner a71c0334f7 float128-sed: New files to convert TF names to KF names for PowerPC IEEE 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-21 17:52:33 +00:00
Nick Clifton bdc27e509c t-msp430 (lib2_mul_none.o): Only use the first dependency as the source file 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-15 08:18:13 +00:00
Michael Meissner 006df05d5c Revert 2016-01-13 change.
From-SVN: r232392
2016-01-14 21:54:16 +00:00
Michael Meissner 29176d57e6 rs6000-builtin.def (BU_FLOAT128_2): Add support for pack/unpack functions 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-13 20:07:12 +00:00
Olivier Hainque a22189835a aix-unwind.h (ucontext_for): Handle AIX 7.1 specificities.
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-05 18:10:31 +00:00
Jakub Jelinek 818ab71a41 Update copyright years.
From-SVN: r232055
2016-01-04 15:30:50 +01:00
Andris Pavenis 5a6c8ffaad Add *-*-msdosdjgpp to lists of i[34567]86-*-* soft-fp targets
* config.host: Add *-*-msdosdjgpp to lists of i[34567]86-*-*
	soft-fp targets

From-SVN: r231803
2015-12-18 06:46:11 +02:00
Bernd Edlinger 077067a5f3 unwind-generic.h (_Unwind_GetTextRelBase): Call __builtin_abort instead of 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-16 15:24:52 +00:00
John David Anglin 787c102712 fptr.c (__canonicalize_funcptr_for_compare): Remove code to initialize call 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-10 01:32:10 +00:00
Nick Clifton 04a9ae287f gcc * config.gcc (extra_gcc_objs): Define for MSP430.
* 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-04 17:24:30 +00:00
John David Anglin 9a32d4374e fptr.c (__canonicalize_funcptr_for_compare): Initialize fixup values if 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-12-01 23:59:20 +00:00
Rainer Orth e5ef217c3e Port libvtv to Solaris
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-25 10:30:25 +00:00
Szabolcs Nagy 78cc43a2ab [ARM] PR target/68059 libgcc should not use __write for printing fatal error
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-23 15:17:55 +00:00
DJ Delorie 9afebea2d5 * config/msp430/lib2hw_mul.S: Fix alignment.
From-SVN: r230633
2015-11-19 19:08:50 -05:00
Nathan Sidwell 33f47f4279 nvptx.c (global_lock_var): New.
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-18 13:49:17 +00:00
David Edelsohn d9adb4761a on_exit.c: New file.
* 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-15 18:41:44 -05:00
Claudiu Zissulescu c0ab1970b9 dp-hack.h: Add support for ARCHS.
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-11 12:04:32 +01:00
Rainer Orth e6b6bf09dd Support init priority on Solaris
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-09 11:33:30 +00:00
Trevor Saunders a153644f75 replace BITS_PER_UNIT with __CHAR_BIT__ in target libs
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-07 19:36:26 +00:00
David Edelsohn 3dee689d8f atexit.c: New file.
* 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-11-07 09:23:32 -05:00
Venkataramanan Kumar 2ef543e470 libgcc changes for AMD znver1.
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-30 13:20:42 +00:00
Christophe Lyon 1300f017c8 config.host (arm*-*-eabi*, [...]): Include crtfastmath.o.
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-29 15:22:56 +01:00
Joern Rennecke 3e5bb7eece re PR libgcc/66883 (config/epiphany/udivsi3-float.c:52: bad if test ?)
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-23 12:57:26 +01:00
Kaushik Phatak 793aa938bd divmodqi.S: Return 0x00 by default for div by 0.
* 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-16 17:47:07 -04:00
Venkataramanan Kumar fac812f0bd Add bdver4 for multiversioning and fix AMD model detection.
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-11 08:06:14 +00:00
Kirill Yukhin 6a192b5a9a cpuinfo.c (get_intel_cpu): Detect "skylake-avx512".
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-05 13:16:07 +00:00
Max Filippov 4a0a945785 xtensa: add uclinux support
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-03 16:09:07 +00:00
Kirill Yukhin ab91c076b7 AVX-512.
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-10-02 15:25:26 +00:00