Commit Graph

859 Commits

Author SHA1 Message Date
Sandra Loosemore 6befaff666 cygming.h (DWARF2_UNWIND_INFO): Allow --disable-sjlj-exceptions for TARGET_BI_ARCH to select DWARF-2 EH for...
2016-05-19  Sandra Loosemore  <sandra@codesourcery.com>

	gcc/
	* config/i386/cygming.h (DWARF2_UNWIND_INFO): Allow 
	--disable-sjlj-exceptions for TARGET_BI_ARCH to select DWARF-2 EH
	for 32-bit mode and SEH for 64-bit.
	* config/i386/mingw32.h (SHARED_LIBGCC_UNDEFS_SPEC): Handle
	TARGET_64BIT_DEFAULT.

	libgcc/
	* config.host [x86_64-*-cygwin*]: Handle tmake_eh_file for mixed 
	dw2/seh configuration.
	[x86_64-*-mingw*]: Likewise.

From-SVN: r236490
2016-05-19 17:59:45 -04:00
Joel Sherrill ad251dfd97 [RTEMS] Fix moxie libgcc support
libgcc/

	PR libgcc/70720
	* config.host (moxie-*-rtems*): Merge this stanza with other moxie
	targets so the same extra_parts are built.  Also have tmake_file add
	on to its value rather than override.

From-SVN: r236064
2016-05-10 07:11:00 +00:00
Oleg Endo bc6d901463 config.guess: Remove SH5 support.
/
	* config.guess:  Remove SH5 support.
	* config.sub: Likewise.
	* configure: Likewise.
	* configure.ac: Likewise.

config/
	* picflag.m4:  Remove SH5 support.

gcc/
	* config/sh/t-sh: Remove SH5 support.
	* config.gcc: Likewise.
	* configure: Likewise.

contrib/
	* compare-all-tests: Remove SH5 support.
	* config-list.mk: Likewise.

libada/
	* configure: Remove SH5 support.

libgcc/
	* config.host: Remove SH5 support.
	* configure: Likewise.

libiberty/
	* configure: Remove SH5 support.

libjava/
	* classpath/config.guess: Remove SH5 support.
	* classpath/config.sub: Likewise.

From-SVN: r235676
2016-04-30 09:11:03 +00:00
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
Joseph Myers 30954527b7 Update soft-fp from glibc.
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-28 22:50:22 +01:00
Richard Earnshaw 4dfe21acc2 ARM: fp16 Fix PR 67624 - Incorrect conversion of float Infinity to __fp16
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-24 09:40:06 +00:00
Rainer Orth df2a1cc48b Support PIE on Solaris
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-24 09:00:22 +00:00
Rainer Orth 2d11044217 Use CRTs provided by Solaris
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-24 08:51:39 +00:00
John David Anglin d572e4397d linux-atomic.c (__kernel_cmpxchg2): Reorder error checks.
* 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-23 23:27:15 +00:00
Kirill Yukhin 06caf59d7f AVX-512. Introduce SKylake server CPU.
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-22 11:10:21 +00:00
James Bowman 131314e14a [FT32] fixes for the default hardware startup
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-21 22:31:53 +00:00
David Edelsohn 54f0c25b30 Update copyright.
From-SVN: r227912
2015-09-18 14:14:45 -04:00
Andrew Dixie 04218b3564 config.host (powerpc-ibm-aix*): Add crtdbase.o to extra_parts.
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-18 10:10:36 -04:00
Max Filippov c8338173d7 xtensa: fix xtensa_fallback_frame_state for call0 ABI
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-15 19:30:32 +00:00
John David Anglin 7a84bf7192 fptr.c (SIGN_EXTEND): Cast -1 to unsigned.
* config/pa/fptr.c (SIGN_EXTEND): Cast -1 to unsigned.

From-SVN: r227717
2015-09-13 15:05:57 +00:00
Sebastian Huber 4efab40251 RTEMS: Update RTEMS thread model
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-09-03 05:28:46 +00:00
Max Filippov 991995c4e7 xtensa: fix _Unwind_GetCFA
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-18 01:08:22 +00:00
Max Filippov 0e19db59e2 xtensa: use unwind-dw2-fde-dip instead of unwind-dw2-fde
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-18 01:07:10 +00:00
Max Filippov b6ac5f6231 xtensa: reimplement register spilling
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-18 01:05:44 +00:00
Yuri Rumyantsev 3e0f334989 driver-i386.c (host_detect_local_cpu): Add support for skylake.
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-14 09:11:01 +00:00
H.J. Lu 51c728b17d Add Knights Landing support to __builtin_cpu_is
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-12 07:52:22 -07:00
Uros Bizjak aff4eeac68 re PR target/66954 (function multiversioning fails for target "aes")
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-11 19:53:41 +02:00
H.J. Lu 736e56dac0 Treat model == 0x4f as Broadwell
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-08-10 12:19:05 -07:00
Uros Bizjak 54d22142b1 re PR target/66954 (function multiversioning fails for target "aes")
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-22 20:01:33 +02:00
Chung-Lin Tang 20ca17e480 linux-atomic.c (<asm/unistd.h>): Remove #include.
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-22 11:39:30 +00:00
Nathan Sidwell ebe4a56073 mkoffload.c (process): Constify host data.
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-17 17:12:01 +00:00
Jan Beulich 180744c0cf libgcc: fix build with older make
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-17 07:14:25 +00:00
Sandra Loosemore a03c6ae388 tramp.c (MOVHI, ORI, JMP): Conditionalize for __nios2_arch__ level.
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-14 18:43:46 -04:00
John Marino 73358db5d1 t-dragonfly: New.
2015-07-13  John Marino  <gnugcc@marino.st>

	* config/i386/t-dragonfly: New.

From-SVN: r225738
2015-07-13 15:53:16 +01:00
John David Anglin f9a12f7b8f linux-atomic.c (__kernel_cmpxchg): Reorder arguments to better match 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-07-01 17:42:20 +00:00
H.J. Lu cb78b51ca0 IA MCU psABI support: changes to libraries
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-30 09:42:07 -07:00
James Lemke 4fa0f9ea8c lib1funcs.S (aeabi_idiv0, [...]): Add CFI entries.
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-23 17:45:18 +00:00
Jeff Law 368054069f Fix FT32 ChangeLogs
From-SVN: r224080
2015-06-03 07:39:45 -06:00
H.J. Lu 428b381275 Add --enable-default-pie option to GCC configure
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-27 19:36:55 -07:00
John Marino 89c54dd357 config.host (i[34567]86-*-freebsd*, [...]): Set md_unwind_header
* config.host (i[34567]86-*-freebsd*, x86_64-*-freebsd*): Set
        md_unwind_header
        * config/i386/freebsd-unwind.h: New.

From-SVN: r223765
2015-05-27 10:14:10 -06:00
Uros Bizjak 9b789cc15c config.host (i[34567]-*-*, x86_64-*-*): Add t-crtfm instead of i386/t-crtfm 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-22 16:39:22 +02:00
Alan Modra 3dafb2207e re PR libgcc/66225 (libgcc/config/rs6000/morecore.S will not build on systems with an older assembler)
PR libgcc/66225
	* config/rs6000/morestack.S: Remove ".abiversion 1".

From-SVN: r223464
2015-05-21 09:25:08 +09:30
Alan Modra 0f0fd74525 rs6000-common.c (TARGET_SUPPORTS_SPLIT_STACK): Define.
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-20 10:56:28 +09:30
Eric Botcazou 515ae71b1c Makefile.in (LIBUNWIND): Move dependency for shared libgcc.
* Makefile.in (LIBUNWIND): Move dependency for shared libgcc.
	Remove useless endif/ifneq ($(enable_shared),yes) pair.

From-SVN: r223412
2015-05-19 19:02:55 +00:00
James Bowman fef939d6a9 FT32 target added. Approved by Jeff Law [law@redhat.com]
From-SVN: r223261
2015-05-16 23:49:08 +00:00
Martin Galvan ff935d0c3d Add support for CFI directives in fp emulation routines for ARM.
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-15 16:57:10 +00:00
Eric Botcazou 9b92a9f3b6 sjlj.m4: New file.
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-13 21:15:31 +00:00
Uros Bizjak 98b5dc6118 libgcov-util.c: Add space between string literal and macro name.
* libgcov-util.c: Add space between string literal and macro name.

From-SVN: r223073
2015-05-12 16:40:49 +02:00
Sandra Loosemore 5a0ff57c48 unknown-elf.h (STARTFILE_SPEC): Add conditional linking of crtfastmath.o.
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-05-06 12:01:05 -04:00
Bernd Schmidt d28ad5d4c5 Fix libgcc installation for offload targets.
* 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-29 16:52:45 +00:00
Uros Bizjak cc86234f0f elf-lib.h: New file.
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-28 11:23:40 +02:00
Yoshinori Sato 2f6bd6eb67 config.gcc: Add h8300-*-linux.
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-27 13:16:27 -06:00
Gregor Richards 15aa7b4472 unwind fix for musl
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-22 14:20:01 +00:00
H.J. Lu abd0cdc9c0 Hide __cpu_indicator_init/__cpu_model from linker
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-17 05:58:07 -07:00
Nick Clifton 72ed112686 rl78-opts.h (enum rl78_mul_types): Add MUL_G14 and MUL_UNINIT.
* 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-16 07:57:56 +00:00
Chen Gang d26b2237b3 gthr-single.h (__GTHREAD_MUTEX_INIT_FUNCTION): Use empty do-while loop as 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-15 09:29:12 -06:00