Commit Graph

859 Commits

Author SHA1 Message Date
Joern Rennecke c1dd979024 avr-c.c (avr_cpu_cpp_builtins): Don't define __MEMX for avrtiny.
gcc:

2014-10-21  Joern Rennecke  <joern.rennecke@embecosm.com>
	    Vidya Praveen <vidya.praveen@atmel.com>
	    Praveen Kumar Kaushik <Praveen_Kumar.Kaushik@atmel.com>
	    Senthil Kumar Selvaraj <Senthil_Kumar.Selvaraj@atmel.com>
	    Pitchumani Sivanupandi <Pitchumani.S@atmel.com>

	* config/avr/avr-c.c (avr_cpu_cpp_builtins): Don't define
	__MEMX for avrtiny.
	* config/avr/avr.c (avr_insert_attributes): Reject __memx for avrtiny.
	(avr_nonconst_pointer_addrspace): Likewise.
	* config/avr/avr.h (AVR_HAVE_LPM): Define.

	Added AVRTINY architecture to avr target.
	* config/avr/avr-arch.h (avr_arch): Added AVRTINY architecture.
	(base_arch_s): member added for AVRTINY architecture.
	* config/avr/avr.c: Added TINY_ADIW, TINY_SBIW macros as AVRTINY
	alternate for adiw/sbiw instructions. Added AVR_TMP_REGNO and
	AVR_ZERO_REGNO macros for tmp and zero registers. Replaced TMP_REGNO
	and ZERO_REGNO occurrences by AVR_TMP_REGNO and AVR_ZERO_REGNO
	respectively. LAST_CALLEE_SAVED_REG macro added for the last register
	in callee saved register list.
	(avr_option_override): CCP address updated for AVRTINY.
	(avr_init_expanders): tmp and zero rtx initialized as per arch.
	Reset avr_have_dimode if AVRTINY.
	(sequent_regs_live): Use LAST_CALLEE_SAVED_REG instead magic number.
	(emit_push_sfr): Use AVR_TMP_REGNO for tmp register number.
	(avr_prologue_setup_frame): Don't minimize prologue if AVRTINY.
	Use LAST_CALLEE_SAVED_REG to refer last callee saved register.
	(expand_epilogue): Likewise.
	(avr_print_operand): Print CCP address in case of AVRTINY also.
	<TBD>bad address
	(function_arg_regno_p): Check different register list for arguments
	if AVRTINY.
	(init_cumulative_args): Check for AVRTINY to update number of argument
	registers.
	(tiny_valid_direct_memory_access_range): New function. Return false if
	direct memory access range is not in accepted range for AVRTINY.
	(avr_out_movqi_r_mr_reg_disp_tiny): New function to handle register
	indirect load (with displacement) for AVRTINY.
	(out_movqi_r_mr): Updated instruction length for AVRTINY. Call
	avr_out_movqi_r_mr_reg_disp_tiny for load from reg+displacement.
	(avr_out_movhi_r_mr_reg_no_disp_tiny): New function to handle register
	indirect load (no displacement) for AVRTINY.
	(avr_out_movhi_r_mr_reg_disp_tiny): New function to handle register
	indirect load (with displacement) for AVRTINY.
	(avr_out_movhi_r_mr_pre_dec_tiny): New function to handle register
	indirect load for pre-decrement address.
	(out_movhi_r_mr): In case of AVRTINY, call tiny register indirect load
	functions. Update instruction length for AVRTINY.
	(avr_out_movsi_r_mr_reg_no_disp_tiny): New function. Likewise, for
	SImode.
	(avr_out_movsi_r_mr_reg_disp_tiny): New function. Likewise, for SImode.
	(out_movsi_r_mr): Likewise, for SImode.
	(avr_out_movsi_mr_r_reg_no_disp_tiny): New function to handle register
	indirect store (no displacement) for AVRTINY.
	(avr_out_movsi_mr_r_reg_disp_tiny): New function to handle register
	indirect store (with displacement) for AVRTINY.
	(out_movsi_mr_r): Emit out insn for IO address store. Update store
	instruction's size for AVRTINY. For AVRTINY, call tiny SImode indirect
	store functions.
	(avr_out_load_psi_reg_no_disp_tiny): New function to handle register
	indirect load (no displacement) for PSImode in AVRTINY.
	(avr_out_load_psi_reg_disp_tiny): New function to handle register
	indirect load (with displacement) for PSImode in AVRTINY.
	(avr_out_load_psi): Call PSImode register indirect load functions for
	AVRTINY. Update instruction length for AVRTINY.
	(avr_out_store_psi_reg_no_disp_tiny): New function to handle register
	indirect store (no displacement) for PSImode in AVRTINY.
	(avr_out_store_psi_reg_disp_tiny): New function to handle register
	indirect store (with displacement) for PSImode in AVRTINY.
	(avr_out_store_psi): Update instruction length for AVRTINY. Call tiny
	register indirect store functions for AVRTINY.
	(avr_out_movqi_mr_r_reg_disp_tiny): New function to handle QImode
	register indirect store (with displacement) for AVRTINY.
	(out_movqi_mr_r): Update instruction length for AVRTINY. Call tiny
	register indirect store function for QImode in AVRTINY.
	(avr_out_movhi_mr_r_xmega): Update instruction length for AVRTINY.
	(avr_out_movhi_mr_r_reg_no_disp_tiny): New function to handle register
	indirect store (no displacement) for HImode in AVRTINY.
	(avr_out_movhi_mr_r_reg_disp_tiny): New function to handle register
	indirect store (with displacement) for HImode in AVRTINY.
	(avr_out_movhi_mr_r_post_inc_tiny): New function to handle register
	indirect store for post-increment address in HImode.
	(out_movhi_mr_r): Update instruction length for AVRTINY. Call tiny
	register indirect store function for HImode in AVRTINY.
	(avr_out_compare): Use TINY_SBIW/ TINY_ADIW in place of sbiw/adiw
	in case of AVRTINY.
	(order_regs_for_local_alloc): Updated register allocation order for
	AVRTINY.
	(avr_conditional_register_usage): New function. It is a target hook
	(TARGET_CONDITIONAL_REGISTER_USAGE) function which updates fixed, call
	used registers list and register allocation order for AVRTINY.
	(avr_return_in_memory): Update return value size for AVRTINY.
	* config/avr/avr-c.c (avr_cpu_cpp_builtins): Added builtin macros
	for AVRTINY arch and tiny program memory base address.
	* config/avr/avr-devices.c (avr_arch_types): Added AVRTINY arch.
	(avr_texinfo): Added description for AVRTINY arch.
	* config/avr/avr.h: Added macro to identify AVRTINY arch. Updated
	STATIC_CHAIN_REGNUM for AVRTINY.
	* config/avr/avr-mcus.def: Added AVRTINY arch devices.
	* config/avr/avr.md: Added constants for tmp/ zero registers in
	AVRTINY. Attributes for AVRTINY added.
	(mov<mode>): Move src/ dest address to register if it is not in AVRTINY
	memory access range.
	(mov<mode>_insn): Avoid QImode direct load for AVRTINY if address not
	in AVRTINY memory access range.
	(*mov<mode>): Likewise for HImode and SImode.
	(*movsf): Likewise for SFmode.
	(delay_cycles_2): Updated instructions to be emitted as AVRTINY does
	not have sbiw.
	* config/avr/avr-protos.h: Added function prototype for
	tiny_valid_direct_memory_access_range.
	* config/avr/avr-tables.opt: Regenerate.
	* gcc/config/avr/t-multilib: Regenerate.
	* doc/avr-mmcu.texi: Regenerate.

gcc/testsuite:

2014-10-21  Joern Rennecke  <joern.rennecke@embecosm.com>

	* gcc.target/avr/tiny-memx.c: New test.

	* gcc.target/avr/tiny-caller-save.c: New test.

libgcc:

2014-10-21  Joern Rennecke  <joern.rennecke@embecosm.com>
	    Vidya Praveen <vidya.praveen@atmel.com>
	    Praveen Kumar Kaushik <Praveen_Kumar.Kaushik@atmel.com>
	    Senthil Kumar Selvaraj <Senthil_Kumar.Selvaraj@atmel.com>
	    Pitchumani Sivanupandi <Pitchumani.S@atmel.com>

	* config/avr/lib1funcs.S (__do_global_dtors): Go back to descending
	order.

	Updated library functions for AVRTINY arch.
	* config/avr/lib1funcs.S: Updated zero/tmp regs for AVRTINY.
	Replaced occurrences of r0/r1 with tmp/zero reg macros.
	Added wsubi/ wadi macros that expands conditionally as sbiw/ adiw
	or AVRTINY equivalent. Replaced occurrences of sbiw/adiw with
	wsubi/wadi macors.
	(__mulsi3_helper): Update stack, preserve callee saved regs and
	argument from stack. Restore callee save registers.
	(__mulpsi3): Likewise.
	(__muldi3, __udivmodsi4, __divmodsi4, __negsi2, __umoddi3, __udivmod64,
	__moddi3, __adddi3, __adddi3_s8, __subdi3, __cmpdi2, __cmpdi2_s8,
	__negdi2, __prologue_saves__, __epilogue_restores__): Excluded for 
	AVRTINY.
	(__tablejump2__): Added lpm equivalent instructions for AVRTINY.
	(__do_copy_data): Added new definition for AVRTINY.
	(__do_clear_bss): Replace r17 by r18 to preserve zero reg for AVRTINY.
	(__load_3, __load_4, __xload_1, __xload_2, __xload_3,
	__xload_4, __movmemx_qi, __movmemx_hi): Excluded for AVRTINY.
	* config/avr/lib1funcs-fixed.S: Replaced occurrences of r0/r1 with
	tmp/zero reg macros. Replaced occurrences of sbiw/adiw with wsubi/wadi
	macors.
	   * config/avr/t-avr (LIB1ASMFUNCS): Remove unsupported functions for
	AVRTINY.

	Fix broken long multiplication on tiny arch.         


Co-Authored-By: Pitchumani Sivanupandi <pitchumani.s@atmel.com>
Co-Authored-By: Praveen Kumar Kaushik <Praveen_Kumar.Kaushik@atmel.com>
Co-Authored-By: Senthil Kumar Selvaraj <Senthil_Kumar.Selvaraj@atmel.com>
Co-Authored-By: Vidya Praveen <vidya.praveen@atmel.com>

From-SVN: r216525
2014-10-21 21:12:01 +01:00
Joseph Myers 5f60643158 Update soft-fp from glibc.
This patch updates libgcc's copy of soft-fp from glibc, adding a
testcase for a bug fix this brings in.

Bootstrapped with no regressions on x86_64-unknown-linux-gnu.

libgcc:
	* soft-fp/double.h: Update from glibc.
	* 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/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/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/unorddf2.c: Likewise.
	* soft-fp/unordsf2.c: Likewise.
	* soft-fp/unordtf2.c: Likewise.
	* config/c6x/eqd.c (__c6xabi_eqd): Update call to FP_CMP_EQ_D.
	* config/c6x/eqf.c (__c6xabi_eqf): Update call to FP_CMP_EQ_S.
	* config/c6x/ged.c (__c6xabi_ged): Update call to FP_CMP_D.
	* config/c6x/gef.c (__c6xabi_gef): Update call to FP_CMP_S.
	* config/c6x/gtd.c (__c6xabi_gtd): Update call to FP_CMP_D.
	* config/c6x/gtf.c (__c6xabi_gtf): Update call to FP_CMP_S.
	* config/c6x/led.c (__c6xabi_led): Update call to FP_CMP_D.
	* config/c6x/lef.c (__c6xabi_lef): Update call to FP_CMP_S.
	* config/c6x/ltd.c (__c6xabi_ltd): Update call to FP_CMP_D.
	* config/c6x/ltf.c (__c6xabi_ltf): Update call to FP_CMP_S.

gcc/testsuite:
	* gcc.dg/torture/float128-extendxf-underflow.c: New test.

From-SVN: r216048
2014-10-09 19:21:30 +01:00
Rong Xu 9b84e7a836 Add overlap functionality to gcov-tool.
2014-10-08  Rong Xu  <xur@google.com>

	* gcc/gcov-tool.c (profile_overlap): New driver function
        to compute profile overlap. 
	(print_overlap_usage_message): New.
	(overlap_usage): New.
	(do_overlap): New.
	(print_usage): Add calls to overlap function.
	(main): Ditto.
	* libgcc/libgcov-util.c (read_gcda_file): Fix format.
	(find_match_gcov_info): Ditto.
	(calculate_2_entries): New.
	(compute_one_gcov): Ditto.
	(gcov_info_count_all_cold): Ditto.
	(gcov_info_count_all_zero): Ditto.
	(extract_file_basename): Ditto.
	(get_file_basename): Ditto.
	(set_flag): Ditto.
	(matched_gcov_info): Ditto.
	(calculate_overlap): Ditto.
	(gcov_profile_overlap): Ditto.
	* libgcc/libgcov-driver.c (compute_summary): Make
        it avavilable for external calls.
	* gcc/doc/gcov-tool.texi: Add documentation.

From-SVN: r216015
2014-10-08 21:51:41 +00:00
Rong Xu fe1090c16e Update the ChangeLog for r215962 and r215963.
From-SVN: r215976
2014-10-07 16:26:51 +00:00
Rong Xu afe0c5ee91 Makefile.in: Fix dependence.
2014-10-06  Rong Xu  <xur@google.com>

	* gcc/Makefile.in: Fix dependence.
	* gcc/gcov-counter.def (GCOV_COUNTER_ICALL_TOPNV): Add
        indirect call topn profiler.
	* gcc/gcov-io.h: Ditto.
	* libgcc/Makefile.in: Ditto.
	* libgcc/libgcov-driver.c (gcov_sort_n_vals): New utility function.
	(gcov_sort_icall_topn_counter): Ditto.
	(gcov_sort_topn_counter_arrays): Ditto.
	(dump_one_gcov): Sort indirect_call topn counters.
	* libgcc/libgcov-merge.c (__gcov_merge_icall_topn): New merge
        function.
	* libgcc/libgcov-profiler.c (__gcov_topn_value_profiler_body): New
        utility function.
	(__gcov_indirect_call_topn_profiler): New profiler function.
	* libgcc/libgcov-util.c (__gcov_icall_topn_counter_op): New.
	* libgcc/libgcov.h: New decls.

From-SVN: r215962
2014-10-07 04:02:31 +00:00
Trevor Saunders 3daa7bbf79 remove score-* support
libgcc/ChangeLog:

2014-10-04  Trevor Saunders  <tsaunders@mozilla.com>

	* config.host: Remove support for score-*.

contrib/ChangeLog:

2014-10-04  Trevor Saunders  <tsaunders@mozilla.com>

	* compare-all-tests: Don't test score-*.
	* config-list.mk: Likewise.

gcc/ChangeLog:

2014-10-04  Trevor Saunders  <tsaunders@mozilla.com>

	* common/config/score/score-common.c: Remove.
	* config.gcc: Remove support for score-*.
	* config/score/constraints.md: Remove.
	* config/score/elf.h: Remove.
	* config/score/predicates.md: Remove.
	* config/score/score-conv.h: Remove.
	* config/score/score-generic.md: Remove.
	* config/score/score-modes.def: Remove.
	* config/score/score-protos.h: Remove.
	* config/score/score.c: Remove.
	* config/score/score.h: Remove.
	* config/score/score.md: Remove.
	* config/score/score.opt: Remove.
	* doc/md.texi: Don't document score-*.

From-SVN: r215889
2014-10-04 14:53:41 +00:00
Joseph Myers 9a79452d4c Remove LIBGCC2_LONG_DOUBLE_TYPE_SIZE target macro.
This patch removes the target macro LIBGCC2_LONG_DOUBLE_TYPE_SIZE.

After recent changes, this macro was used in two ways in libgcc: to
determine the mode of long double in dfp-bit.h, and to determine
whether a particular mode has excess precision for use in complex
multiplication.

The former is concerned specifically with long double: it relates to
use of strtold for converting between decimal and binary floating
point.  This is replaced by comparing __LDBL_MANT_DIG__ with the
appropriate __LIBGCC_*_MANT_DIG__ macro.  The latter is replaced
__LIBGCC_*_EXCESS_PRECISION__ predefined macros.

Remarks:

* Comparing (__LDBL_MANT_DIG__ == __LIBGCC_XF_MANT_DIG__) is more
  fragile than it looks; it's possible for XFmode to have 53-bit
  mantissa (TARGET_96_ROUND_53_LONG_DOUBLE, on FreeBSD and
  DragonFlyBSD 32-bit), in which case such a comparison would not
  distinguish XFmode and DFmode as possible modes for long double.
  Fortunately, no target supporting that form of XFmode also supports
  long double = double (but if some target did, we'd need e.g. an
  additional macro giving the exponent range of each mode).

  Furthermore, this code doesn't actually get used for x86 (or any
  other target with XFmode support), because x86 uses BID not DPD and
  BID has its own conversion code (which handles conversions for both
  XFmode and TFmode without needing to go via strtold).  And FreeBSD
  and DragonFlyBSD aren't among the targets with DFP support.  So
  while in principle this code is fragile and it's a deficiency that
  it can't support both XFmode and TFmode at once (something that
  can't be solved with the string conversion approach without libc
  having TS 18661 functions such as strtof128), all these issues
  should not be a problem in practice.

* If other cases of excess precision are supported in future, the code
  for defining __LIBGCC_*_EXCESS_PRECISION__ may need updating.
  Although the most likely such cases might not actually involve
  excess precision for any mode used in libgcc - FLT_EVAL_METHOD being
  32 to do _Float16 arithmetic on _Float32 should have the effect of
  _Complex _Float16 arithmetic using __mulsc3 and __divsc3, rather
  than currently nonexistent __mulhc3 and __divhc3 as in bug 63250 for
  ARM.

* As has been noted in the context of simultaneous support for
  __float128 and __ibm128 on Power, the semantics of macros such as
  LONG_DOUBLE_TYPE_SIZE are problematic because they rely on a
  poorly-defined precision value for floating-point modes (which seems
  to be intended as the number of significant bits in the
  representation, e.g. 80 for XFmode which may be either 12 or 16
  bytes) uniquely identifying a mode (although defining an arbitrarily
  different value for one of the modes you wish to distinguish may
  work as a hack).  It would be cleaner to have a target hook that
  gives a machine mode directly for float, double and long double,
  rather than going via these precision values.  By eliminating all
  use of these macros (FLOAT_TYPE_SIZE, DOUBLE_TYPE_SIZE,
  LONG_DOUBLE_TYPE_SIZE) from code built for the target, this patch
  facilitates such a conversion to a hook (which I suppose would take
  some suitable enum as an argument to identify which of the three
  types to return a mode for).

  (The issue of multiple type support for DFP conversions would apply
  in that Power case.
  <https://gcc.gnu.org/ml/gcc-patches/2014-07/msg01084.html> doesn't
  seem to touch on it, but it would seem reasonable to punt on it
  initially as hard to fix.  There would also be the issue of getting
  functions such as __powikf2, __mulkc3, __divkc3 defined, but that's
  rather easier to address.)

Bootstrapped with no regressions on x86_64-unknown-linux-gnu.

gcc:
	* doc/tm.texi.in (LIBGCC2_LONG_DOUBLE_TYPE_SIZE): Remove.
	* doc/tm.texi: Regenerate.
	* system.h (LIBGCC2_LONG_DOUBLE_TYPE_SIZE): Poison.
	* config/alpha/alpha.h (LIBGCC2_LONG_DOUBLE_TYPE_SIZE): Remove.
	* config/i386/i386-interix.h (LIBGCC2_LONG_DOUBLE_TYPE_SIZE):
	Remove.
	* config/i386/i386.h (LIBGCC2_LONG_DOUBLE_TYPE_SIZE): Remove.
	* config/i386/rtemself.h (LIBGCC2_LONG_DOUBLE_TYPE_SIZE): Remove.
	* config/ia64/ia64.h (LIBGCC2_LONG_DOUBLE_TYPE_SIZE): Remove.
	* config/m68k/m68k.h (LIBGCC2_LONG_DOUBLE_TYPE_SIZE): Remove.
	* config/m68k/netbsd-elf.h (LIBGCC2_LONG_DOUBLE_TYPE_SIZE):
	Remove.
	* config/mips/mips.h (LIBGCC2_LONG_DOUBLE_TYPE_SIZE): Remove.
	* config/mips/n32-elf.h (LIBGCC2_LONG_DOUBLE_TYPE_SIZE): Remove.
	* config/msp430/msp430.h (LIBGCC2_LONG_DOUBLE_TYPE_SIZE): Remove.
	* config/rl78/rl78.h (LIBGCC2_LONG_DOUBLE_TYPE_SIZE): Remove.
	* config/rs6000/rs6000.h (LIBGCC2_LONG_DOUBLE_TYPE_SIZE): Remove.
	* config/rx/rx.h (LIBGCC2_LONG_DOUBLE_TYPE_SIZE): Remove.
	* config/s390/s390.h (LIBGCC2_LONG_DOUBLE_TYPE_SIZE): Remove.
	* config/sparc/freebsd.h (LIBGCC2_LONG_DOUBLE_TYPE_SIZE): Remove.
	* config/sparc/linux.h (LIBGCC2_LONG_DOUBLE_TYPE_SIZE): Remove.
	* config/sparc/linux64.h (LIBGCC2_LONG_DOUBLE_TYPE_SIZE): Remove.
	* config/sparc/netbsd-elf.h (LIBGCC2_LONG_DOUBLE_TYPE_SIZE):
	Remove.

gcc/c-family:
	* c-cppbuiltin.c (c_cpp_builtins): Define
	__LIBGCC_*_EXCESS_PRECISION__ macros for supported floating-point
	modes.

libgcc:
	* dfp-bit.h (LIBGCC2_LONG_DOUBLE_TYPE_SIZE): Remove.
	(__LIBGCC_XF_MANT_DIG__): Define if not already defined.
	(LONG_DOUBLE_HAS_XF_MODE): Define in terms of
	__LIBGCC_XF_MANT_DIG__.
	(__LIBGCC_TF_MANT_DIG__): Define if not already defined.
	(LONG_DOUBLE_HAS_TF_MODE): Define in terms of
	__LIBGCC_TF_MANT_DIG__.
	* libgcc2.c (NOTRUNC): Define in terms of
	__LIBGCC_*_EXCESS_PRECISION__, not LIBGCC2_LONG_DOUBLE_TYPE_SIZE.
	* libgcc2.h (LIBGCC2_LONG_DOUBLE_TYPE_SIZE): Remove.

From-SVN: r215491
2014-09-23 01:48:46 +01:00
Joseph Myers 1a849e50d7 re PR target/63312 (FAIL: gcc.dg/torture/float128-exact-underflow.c -O0 execution test)
PR target/63312
	* config/ia64/sfp-machine.h (FE_EX_ALL, FP_TRAPPING_EXCEPTIONS):
	New macros.

From-SVN: r215458
2014-09-22 12:08:03 +01:00
Hans-Peter Nilsson 598a158681 crtstuff.c (USE_EH_FRAME_REGISTRY): Let USE_EH_FRAME_REGISTRY_ALWAYS override USE_PT_GNU_EH_FRAME.
* crtstuff.c (USE_EH_FRAME_REGISTRY): Let USE_EH_FRAME_REGISTRY_ALWAYS
	override USE_PT_GNU_EH_FRAME.
	[__LIBGCC_EH_FRAME_SECTION_NAME__ && !USE_PT_GNU_EH_FRAME]: Sanity-
	check USE_EH_FRAME_REGISTRY_ALWAYS against
	__LIBGCC_EH_FRAME_SECTION_NAME__, emit error if unsane.
	* Makefile.in (FORCE_EXPLICIT_EH_REGISTRY): New
	variable for substituted force_explicit_eh_registry.
	(CRTSTUFF_CFLAGS): Add FORCE_EXPLICIT_EH_REGISTRY.
	* configure.ac (explicit-exception-frame-registration):
	New AC_ARG_ENABLE.
	* configure: Regenerate.

From-SVN: r215443
2014-09-22 00:49:01 +00:00
Olivier Hainque 3a8fe7c660 config.gcc (powerpc-wrs-vxworksmils): New configuration.
2014-09-18  Olivier Hainque  <hainque@adacore.com>

gcc/
	* config.gcc (powerpc-wrs-vxworksmils): New configuration.
	* config/rs6000/t-vxworksmils: New file.
	* config/rs6000/vxworksmils.h: New file.

libgcc/
	* config.host (powerpc-wrs-vxworksmils): New configuration,
	same as vxworksae.

contrib/
	* config-list.mk (LIST): Add powerpc-wrs-vxworksmils.

From-SVN: r215377
2014-09-19 08:11:55 +00:00
Joseph Myers dd69f0471d Remove LIBGCC2_TF_CEXT target macro.
This patch removes the (undocumented) LIBGCC2_TF_CEXT target macro,
replacing it by -fbuilding-libgcc predefines (and thereby gets rid of
another LIBGCC2_LONG_DOUBLE_TYPE_SIZE conditional, though some more
patches are needed before that target macro can be eliminated).  This
macro indicated the suffix used on __builtin_huge_val,
__builtin_copysign, __builtin_fabs built-in function names to produce
the names for a given floating-point mode.

Predefines are added for all floating-point modes supported for
libgcc, not just TFmode.  These are fully accurate for modes
corresponding to float, double and long double.  For other modes, the
suffix for *constants* is determined by the targetm.c.mode_for_suffix
hook (the limit to two possible suffixes 'w' and 'q' being hardcoded
in various places).  This is in fact the suffix for built-in functions
as well where such functions exist.

* For i386, the *q functions always exist (whether or not TFmode is
  used for long double).  The *w functions never exist (but this
  doesn't matter for libgcc, since no i386 configuration treats XFmode
  as a supported scalar mode if long double is TFmode; if __float80
  were to be supported for 64-bit Android, properly such functions
  ought to be added).

* For ia64, the *q functions exist for non-HP-UX (under HP-UX, long
  double is TFmode, so they aren't needed).  The *w functions never
  exist.  This is an issue for this libgcc code for the XFmode complex
  functions in libgcc on HP-UX; as I understand it, right now those
  will accidentally be using TFmode versions of those three functions,
  so involving unnecessary conversions, while the sanity check on CEXT
  accidentally passes because all it tests is the sizes of the types.

Because of the lack of 'w' functions, the patch uses 'l' when the
constant suffix is 'w', matching what the existing libgcc code would
do for IA64 HP-UX in that case.

Ideally there would be generic code to create such built-in functions
for all supported floating-point types.  That may be something to
consider if support for TS 18661-3 (standard bindings for IEEE
754-2008, defining names such as _Float128, and function names such as
copysignf128) is added in future.

Bootstrapped with no regressions on x86_64-unknown-linux-gnu.

gcc:
	* system.h (LIBGCC2_TF_CEXT): Poison.
	* config/i386/cygming.h (LIBGCC2_TF_CEXT): Remove.
	* config/i386/darwin.h (LIBGCC2_TF_CEXT): Likewise.
	* config/i386/dragonfly.h (LIBGCC2_TF_CEXT): Likewise.
	* config/i386/freebsd.h (LIBGCC2_TF_CEXT): Likewise.
	* config/i386/gnu-user-common.h (LIBGCC2_TF_CEXT): Likewise.
	* config/i386/openbsdelf.h (LIBGCC2_TF_CEXT): Likewise.
	* config/i386/sol2.h (LIBGCC2_TF_CEXT): Likewise.
	* config/ia64/ia64.h (LIBGCC2_TF_CEXT): Likewise.
	* config/ia64/linux.h (LIBGCC2_TF_CEXT): Likewise.

gcc/c-family:
	* c-cppbuiltin.c (c_cpp_builtins): Define __LIBGCC_*_FUNC_EXT__
	for supported floating-point modes.

libgcc:
	* libgcc2.c (CEXT): Define using __LIBGCC_*_FUNC_EXT__.

From-SVN: r215368
2014-09-19 00:27:26 +01:00
Joseph Myers e770bfd997 Fix i386 FP_TRAPPING_EXCEPTIONS.
The i386 sfp-machine.h defines FP_TRAPPING_EXCEPTIONS in a way that is
always wrong: it treats a set bit as indicating the exception is
trapping, when actually a set bit (both for 387 and SSE floating
point) indicates it is masked, and a clear bit indicates it is
trapping.  This patch fixes this bug.

Bootstrapped with no regressions on x86_64-unknown-linux-gnu.

libgcc:
	* config/i386/sfp-machine.h (FP_TRAPPING_EXCEPTIONS): Treat clear
	bits not set bits as indicating trapping exceptions.

gcc/testsuite:
	* gcc.dg/torture/float128-exact-underflow.c: New test.

From-SVN: r215347
2014-09-18 13:00:21 +01:00
Nathan Sidwell cadb2b9689 Makefile.in (LIBGCOV_INTERFACE): Add _gcov_dump from ...
* Makefile.in (LIBGCOV_INTERFACE): Add _gcov_dump from ...
	(LIBGCOV_DRIVER): ... here.
	* libgcov-driver.c (gcov_master): New.
	(gcov_exit): Remove from master chain.
	(__gcov_init): Add to master chain if version compatible.  Don't
	clear the version.
	* libgcov_interface (__gcov_flust): Call gcov_dump_int.
	(gcov_reset_int): Clear master chain, if compatible.
	(gcov_dump_int): New internal interface.  Dump master chain, if
	compatible.
	(gcov_dump): Alias for gcov_dump_int.
	* libgcov.h (struct gcov_root): Add next and prev fields.
	(struct gcov_master): New struct.
	(__gcov_master): New.
	(gcov_dump_int): Declare.

From-SVN: r215337
2014-09-17 20:13:17 +00:00
Olivier Hainque 580d22a375 config.host (x86_64-*-mingw*): Add i386/t-cygming to tmake_file and crtbegin.o + crtend.o to extra_parts.
2014-09-17  Olivier Hainque  <hainque@adacore.com>

        * config.host (x86_64-*-mingw*): Add i386/t-cygming to tmake_file
        and crtbegin.o + crtend.o to extra_parts.

From-SVN: r215323
2014-09-17 13:04:49 +00:00
Joseph Myers 8cc4b7a26d Remove LIBGCC2_HAS_?F_MODE target macros.
This patch removes the LIBGCC2_HAS_{SF,DF,XF,TF}_MODE target macros,
replacing them by predefines with -fbuilding-libgcc, together with a
target hook that can influence those predefines when needed.

The new default is that a floating-point mode is supported in libgcc
if (a) it passes the scalar_mode_supported_p hook (otherwise it's not
plausible for it to be supported in libgcc) and (b) it's one of those
four modes (since those are the modes for which libgcc hardcodes the
possibility of support).  The target hook can override the default
choice (in either direction) for modes that pass
scalar_mode_supported_p (although overriding in the direction of
returning true when the default would return false only makes sense if
all relevant functions are specially defined in libgcc for that
particular target).

The previous default settings depended on various settings such as
LIBGCC2_LONG_DOUBLE_TYPE_SIZE, as well as targets defining the above
target macros if the default wasn't correct.

The default scalar_mode_supported_p only declares a floating-point
mode to be supported if it matches one of float / double / long
double.  This means that in most cases where a mode is only supported
conditionally in libgcc (TFmode only supported if it's the mode of
long double, most commonly), the default gets things right.  Overrides
were needed in the following cases:

* SFmode would always have been supported in libgcc (the condition was
  BITS_PER_UNIT == 8, true for all current targets), but pdp11
  defaults to 64-bit float, and in that case SFmode would fail
  scalar_mode_supported_p.  I don't know if libgcc actually built for
  pdp11 (and the port may well no longer be being used), but this
  patch adds a scalar_mode_supported_p hook to it to ensure SFmode is
  treated as supported.

* Certain i386 and ia64 targets need the new hook to match the
  existing cases for when XFmode or TFmode support is present in
  libgcc.  For i386, the hook can always declare XFmode to be
  supported - the cases where it's not are the cases where long double
  is TFmode, in which case XFmode fails scalar_mode_supported_p[*] -
  but TFmode support needs to be conditional.  (And of the targets not
  defining LIBGCC2_HAS_TF_MODE before this patch, some defined
  LONG_DOUBLE_TYPE_SIZE to 64, so ensuring LIBGCC2_HAS_TF_MODE would
  always be false, while others did not define it, so allowing it to
  be true in the -mlong-double-128 case.  This patch matches that
  logic, although I suspect all the latter targets would have been
  broken if you tried to enable -mlong-double-128 by default, for lack
  of the soft-fp TFmode support in libgcc, which is separately
  configured.)

  [*] I don't know if it's deliberate not to support __float80 at all
  with -mlong-double-128.

In order to implement the default version of the new hook,
insn-modes.h was made to contain macros such as HAVE_TFmode for each
machine mode, so the default hook can contain conditionals on whether
XFmode and TFmode exist (to match the hardcoding of a list of modes in
libgcc).  This is also used in fortran/trans-types.c; previously it
had a conditional on defined(LIBGCC2_HAS_TF_MODE) (a bit dubious,
since it ignored the value of the macro), which is replaced by testing
defined(HAVE_TFmode), in conjunction with requiring
targetm.libgcc_floating_mode_supported_p.

(Fortran is testing something stronger than that hook: not only is
libgcc support required, but also libm or equivalent.  Thus, it has a
test for ENABLE_LIBQUADMATH_SUPPORT in the case that the mode is
TFmode and that's not the same as any of the three standard types.
The old and new tests are intended to accept exactly the same set of
modes for all targets.)

Apart from the four target macros eliminated by this patch, it gets us
closer to eliminating LIBGCC2_LONG_DOUBLE_TYPE_SIZE as well, though a
few more places using that macro need changing first.

Bootstrapped with no regressions on x86_64-unknown-linux-gnu; also
built cc1 for crosses to ia64-elf and pdp11-none as a minimal test of
changes for those targets.

gcc:
	* target.def (libgcc_floating_mode_supported_p): New hook.
	* targhooks.c (default_libgcc_floating_mode_supported_p): New
	function.
	* targhooks.h (default_libgcc_floating_mode_supported_p): Declare.
	* doc/tm.texi.in (LIBGCC2_HAS_DF_MODE, LIBGCC2_HAS_XF_MODE)
	(LIBGCC2_HAS_TF_MODE): Remove.
	(TARGET_LIBGCC_FLOATING_MODE_SUPPORTED_P): New @hook.
	* doc/tm.texi: Regenerate.
	* genmodes.c (emit_insn_modes_h): Define HAVE_%smode for each
	machine mode.
	* system.h (LIBGCC2_HAS_SF_MODE, LIBGCC2_HAS_DF_MODE)
	(LIBGCC2_HAS_XF_MODE, LIBGCC2_HAS_TF_MODE): Poison.
	* config/i386/cygming.h (LIBGCC2_HAS_TF_MODE): Remove.
	* config/i386/darwin.h (LIBGCC2_HAS_TF_MODE): Remove.
	* config/i386/djgpp.h (IX86_MAYBE_NO_LIBGCC_TFMODE): Define.
	* config/i386/dragonfly.h (LIBGCC2_HAS_TF_MODE): Remove.
	* config/i386/freebsd.h (LIBGCC2_HAS_TF_MODE): Remove.
	* config/i386/gnu-user-common.h (LIBGCC2_HAS_TF_MODE): Remove.
	* config/i386/i386-interix.h (IX86_NO_LIBGCC_TFMODE): Define.
	* config/i386/i386.c (ix86_libgcc_floating_mode_supported_p): New
	function.
	(TARGET_LIBGCC_FLOATING_MODE_SUPPORTED_P): Define.
	* config/i386/i386elf.h (IX86_MAYBE_NO_LIBGCC_TFMODE): Define.
	* config/i386/lynx.h (IX86_MAYBE_NO_LIBGCC_TFMODE): Define.
	* config/i386/netbsd-elf.h (IX86_MAYBE_NO_LIBGCC_TFMODE): Define.
	* config/i386/netbsd64.h (IX86_MAYBE_NO_LIBGCC_TFMODE): Define.
	* config/i386/nto.h (IX86_MAYBE_NO_LIBGCC_TFMODE): Define.
	* config/i386/openbsd.h (IX86_MAYBE_NO_LIBGCC_TFMODE): Define.
	* config/i386/openbsdelf.h (LIBGCC2_HAS_TF_MODE): Remove.
	* config/i386/rtemself.h (IX86_NO_LIBGCC_TFMODE): Define.
	* config/i386/sol2.h (LIBGCC2_HAS_TF_MODE): Remove.
	* config/i386/vx-common.h (IX86_MAYBE_NO_LIBGCC_TFMODE): Define.
	* config/ia64/elf.h (IA64_NO_LIBGCC_TFMODE): Define.
	* config/ia64/freebsd.h (IA64_NO_LIBGCC_TFMODE): Define.
	* config/ia64/hpux.h (LIBGCC2_HAS_XF_MODE, LIBGCC2_HAS_TF_MODE):
	Remove.
	* config/ia64/ia64.c (TARGET_LIBGCC_FLOATING_MODE_SUPPORTED_P):
	New macro.
	(ia64_libgcc_floating_mode_supported_p): New function.
	* config/ia64/linux.h (LIBGCC2_HAS_TF_MODE): Remove.
	* config/ia64/vms.h (IA64_NO_LIBGCC_XFMODE)
	(IA64_NO_LIBGCC_TFMODE): Define.
	* config/msp430/msp430.h (LIBGCC2_HAS_DF_MODE): Remove.
	* config/pdp11/pdp11.c (TARGET_SCALAR_MODE_SUPPORTED_P): New
	macro.
	(pdp11_scalar_mode_supported_p): New function.
	* config/rl78/rl78.h (LIBGCC2_HAS_DF_MODE): Remove.
	* config/rx/rx.h (LIBGCC2_HAS_DF_MODE): Remove.

gcc/c-family:
	* c-cppbuiltin.c (c_cpp_builtins): Define __LIBGCC_HAS_%s_MODE__
	macros for floating-point modes.

gcc/fortran:
	* trans-types.c (gfc_init_kinds): Check
	targetm.libgcc_floating_mode_supported_p for floating-point
	modes.  Check HAVE_TFmode instead of LIBGCC2_HAS_TF_MODE.

libgcc:
	* libgcc2.h (LIBGCC2_HAS_SF_MODE): Define using
	__LIBGCC_HAS_SF_MODE__.
	(LIBGCC2_HAS_DF_MODE): Define using __LIBGCC_HAS_DF_MODE__.
	(LIBGCC2_HAS_XF_MODE): Define using __LIBGCC_HAS_XF_MODE__.
	(LIBGCC2_HAS_TF_MODE): Define using __LIBGCC_HAS_TF_MODE__.
	* config/libbid/bid_gcc_intrinsics.h
	(LIBGCC2_LONG_DOUBLE_TYPE_SIZE): Do not define.
	(LIBGCC2_HAS_XF_MODE): Define using __LIBGCC_HAS_XF_MODE__.
	(LIBGCC2_HAS_TF_MODE): Define using __LIBGCC_HAS_TF_MODE__.
	* fixed-bit.h (LIBGCC2_LONG_DOUBLE_TYPE_SIZE): Do not define.
	(LIBGCC2_HAS_SF_MODE): Define using __LIBGCC_HAS_SF_MODE__.
	(LIBGCC2_HAS_DF_MODE): Define using __LIBGCC_HAS_DF_MODE__.

From-SVN: r215215
2014-09-12 13:05:18 +01:00
Georg-Johann Lay ea3f2b240f re PR target/63223 ([avr] Make jumptables work with -Wl,--section-start,.text=)
gcc/
	PR target/63223
	* config/avr/avr.md (*tablejump.3byte-pc): New insn.
	(*tablejump): Restrict to !AVR_HAVE_EIJMP_EICALL.  Add void clobber.
	(casesi): Expand to *tablejump.3byte-pc if AVR_HAVE_EIJMP_EICALL.
libgcc/
	PR target/63223
	* config/avr/libgcc.S (__tablejump2__): Rewrite to use RAMPZ, ELPM
	and R24 as needed.  Make work for all devices and .text locations.
	(__do_global_ctors, __do_global_dtors): Use word addresses.
	(__tablejump__, __tablejump_elpm__): Remove functions.
	* t-avr (LIB1ASMFUNCS): Remove _tablejump, _tablejump_elpm.
	Add _tablejump2.
	(XICALL, XIJMP): New macros.

From-SVN: r215152
2014-09-11 08:08:17 +00:00
Marcus Shawcroft b677236af0 Add crtfastmath for AArch64.
gcc/Changelog

2014-09-09  Marcus Shawcroft  <marcus.shawcroft@arm.com>
            Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>

     * config/aarch64/aarch64-elf-raw.h (ENDFILE_SPEC): Add crtfastmath.o.
     * config/aarch64/aarch64-linux.h (GNU_USER_TARGET_MATH_ENDFILE_SPEC): Define.
      (ENDFILE_SPEC): Define and use GNU_USER_TARGET_MATH_ENDFILE_SPEC.

libgcc/Changelog

2014-09-09  Marcus Shawcroft  <marcus.shawcroft@arm.com>
            Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>

    * config.host (aarch64*): Include crtfastmath and t-crtfm.
    * config/aarch64/crtfastmath.c: New file. 

Co-Authored-By: Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>

From-SVN: r215086
2014-09-09 15:53:01 +00:00
Trevor Saunders 157e859ffe remove picochip
contrib/ChangeLog:

2014-09-08  Trevor Saunders  <tsaunders@mozilla.com>

	* compare-all-tests: Don't test picochip.
	* config-list.mk: Likewise.

gcc/ChangeLog:

2014-09-08  Trevor Saunders  <tsaunders@mozilla.com>

	* common/config/picochip/picochip-common.c: Remove.
	* config.gcc: Remove support for picochip.
	* config/picochip/constraints.md: Remove.
	* config/picochip/dfa_space.md: Remove.
	* config/picochip/dfa_speed.md: Remove.
	* config/picochip/picochip-protos.h: Remove.
	* config/picochip/picochip.c: Remove.
	* config/picochip/picochip.h: Remove.
	* config/picochip/picochip.md: Remove.
	* config/picochip/picochip.opt: Remove.
	* config/picochip/predicates.md: Remove.
	* config/picochip/t-picochip: Remove.
	* doc/md.texi: Don't document picochi.

libgcc/ChangeLog:

2014-09-08  Trevor Saunders  <tsaunders@mozilla.com>

	* config.host: Remove picochip support.
	* config/picochip/adddi3.S: Remove.
	* config/picochip/ashlsi3.S: Remove.
	* config/picochip/ashlsi3.c: Remove.
	* config/picochip/ashrsi3.S: Remove.
	* config/picochip/ashrsi3.c: Remove.
	* config/picochip/clzsi2.S: Remove.
	* config/picochip/cmpsi2.S: Remove.
	* config/picochip/divmod15.S: Remove.
	* config/picochip/divmodhi4.S: Remove.
	* config/picochip/divmodsi4.S: Remove.
	* config/picochip/lib1funcs.S: Remove.
	* config/picochip/longjmp.S: Remove.
	* config/picochip/lshrsi3.S: Remove.
	* config/picochip/lshrsi3.c: Remove.
	* config/picochip/parityhi2.S: Remove.
	* config/picochip/popcounthi2.S: Remove.
	* config/picochip/setjmp.S: Remove.
	* config/picochip/subdi3.S: Remove.
	* config/picochip/t-picochip: Remove.
	* config/picochip/ucmpsi2.S: Remove.
	* config/picochip/udivmodhi4.S: Remove.
	* config/picochip/udivmodsi4.S: Remove.

From-SVN: r215039
2014-09-09 02:11:06 +00:00
Joseph Myers 66bb34c090 Remove SF_SIZE etc. target macros.
gcc:
	* config/i386/cygming.h (TF_SIZE): Remove.
	* config/i386/darwin.h (TF_SIZE): Remove.
	* config/i386/dragonfly.h (TF_SIZE): Remove.
	* config/i386/freebsd.h (TF_SIZE): Remove.
	* config/i386/gnu-user-common.h (TF_SIZE): Remove.
	* config/i386/openbsdelf.h (TF_SIZE): Remove.
	* config/i386/sol2.h (TF_SIZE): Remove.
	* config/ia64/hpux.h (XF_SIZE, TF_SIZE): Remove.
	* config/ia64/linux.h (TF_SIZE): Remove.
	* doc/tm.texi.in (SF_SIZE, DF_SIZE, XF_SIZE, TF_SIZE): Remove.
	* doc/tm.texi: Regenerate.
	* system.h (SF_SIZE, DF_SIZE, XF_SIZE, TF_SIZE): Poison.

gcc/c-family:
	* c-cppbuiltin.c (c_cpp_builtins): Define macros for mantissa
	digits of floating-point modes if -fbuilding-libgcc.

libgcc:
	* libgcc2.c (SF_SIZE): Change all uses to __LIBGCC_SF_MANT_DIG__.
	(DF_SIZE): Change all uses to __LIBGCC_DF_MANT_DIG__.
	(XF_SIZE): Change all uses to __LIBGCC_XF_MANT_DIG__.
	(TF_SIZE): Change all uses to __LIBGCC_TF_MANT_DIG__.
	* libgcc2.h (SF_SIZE): Change to __LIBGCC_SF_MANT_DIG__.  Give
	error if not defined and LIBGCC2_HAS_SF_MODE is defined.
	(DF_SIZE): Change to __LIBGCC_DF_MANT_DIG__.  Give error if not
	defined and LIBGCC2_HAS_DF_MODE is defined.
	(XF_SIZE): Change to __LIBGCC_XF_MANT_DIG__.  Give error if not
	defined and LIBGCC2_HAS_XF_MODE is defined.
	(TF_SIZE): Change to __LIBGCC_TF_MANT_DIG__.  Give error if not
	defined and LIBGCC2_HAS_TF_MODE is defined.

From-SVN: r215014
2014-09-08 13:25:35 +01:00
Joseph Myers 9686a2e668 Remove no-longer-needed fp-bit target macros.
gcc:
	* defaults.h (LARGEST_EXPONENT_IS_NORMAL, ROUND_TOWARDS_ZERO):
	Remove.
	* doc/tm.texi.in (ROUND_TOWARDS_ZERO, LARGEST_EXPONENT_IS_NORMAL):
	Remove.
	* doc/tm.texi: Regenerate.
	* system.h (LARGEST_EXPONENT_IS_NORMAL, ROUND_TOWARDS_ZERO):
	Poison.
	* config/arm/arm.h (LARGEST_EXPONENT_IS_NORMAL): Remove.
	* config/cris/cris.h (__make_dp): Remove.

libgcc:
	* fp-bit.c (pack_d, unpack_d): Remove LARGEST_EXPONENT_IS_NORMAL
	and ROUND_TOWARDS_ZERO conditionals.

From-SVN: r215013
2014-09-08 13:22:56 +01:00
Nathan Sidwell 71c3e2ef09 libgcov-interface.c (STRONG_ALIAS): Rename to ...
* libgcov-interface.c (STRONG_ALIAS): Rename to ...
	(ALIAS_weak): ... here. Use forwarding function.  Adjust uses.

From-SVN: r215005
2014-09-07 18:09:34 +00:00
Joseph Myers 53d68b9f05 Use -fbuilding-libgcc for more target macros used in libgcc.
gcc/c-family:
	* c-cppbuiltin.c (c_cpp_builtins): Also define
	__LIBGCC_EH_TABLES_CAN_BE_READ_ONLY__,
	__LIBGCC_EH_FRAME_SECTION_NAME__, __LIBGCC_JCR_SECTION_NAME__,
	__LIBGCC_CTORS_SECTION_ASM_OP__, __LIBGCC_DTORS_SECTION_ASM_OP__,
	__LIBGCC_TEXT_SECTION_ASM_OP__, __LIBGCC_INIT_SECTION_ASM_OP__,
	__LIBGCC_INIT_ARRAY_SECTION_ASM_OP__,
	__LIBGCC_STACK_GROWS_DOWNWARD__,
	__LIBGCC_DONT_USE_BUILTIN_SETJMP__,
	__LIBGCC_DWARF_ALT_FRAME_RETURN_COLUMN__,
	__LIBGCC_DWARF_FRAME_REGISTERS__,
	__LIBGCC_EH_RETURN_STACKADJ_RTX__, __LIBGCC_JMP_BUF_SIZE__,
	__LIBGCC_STACK_POINTER_REGNUM__ and
	__LIBGCC_VTABLE_USES_DESCRIPTORS__ for -fbuilding-libgcc.
	(builtin_define_with_value): Handle backslash-escaping in string
	macro values.

libgcc:
	* Makefile.in (CRTSTUFF_CFLAGS): Add -fbuilding-libgcc.
	* config/aarch64/linux-unwind.h (STACK_POINTER_REGNUM): Change all
	uses to __LIBGCC_STACK_POINTER_REGNUM__.
	(DWARF_ALT_FRAME_RETURN_COLUMN): Change all uses to
	__LIBGCC_DWARF_ALT_FRAME_RETURN_COLUMN__.
	* config/alpha/vms-unwind.h (DWARF_ALT_FRAME_RETURN_COLUMN):
	Change use to __LIBGCC_DWARF_ALT_FRAME_RETURN_COLUMN__.
	* config/cr16/unwind-cr16.c (STACK_GROWS_DOWNWARD): Change all
	uses to __LIBGCC_STACK_GROWS_DOWNWARD__.
	(DWARF_FRAME_REGISTERS): Change all uses to
	__LIBGCC_DWARF_FRAME_REGISTERS__.
	(EH_RETURN_STACKADJ_RTX): Change all uses to
	__LIBGCC_EH_RETURN_STACKADJ_RTX__.
	* config/cr16/unwind-dw2.h (DWARF_FRAME_REGISTERS): Change use to
	__LIBGCC_DWARF_FRAME_REGISTERS__.  Remove conditional definition.
	* config/i386/cygming-crtbegin.c (EH_FRAME_SECTION_NAME): Change
	use to __LIBGCC_EH_FRAME_SECTION_NAME__.
	(JCR_SECTION_NAME): Change use to __LIBGCC_JCR_SECTION_NAME__.
	* config/i386/cygming-crtend.c (EH_FRAME_SECTION_NAME): Change use
	to __LIBGCC_EH_FRAME_SECTION_NAME__.
	(JCR_SECTION_NAME): Change use to __LIBGCC_JCR_SECTION_NAME__
	* config/mips/linux-unwind.h (STACK_POINTER_REGNUM): Change use to
	__LIBGCC_STACK_POINTER_REGNUM__.
	(DWARF_ALT_FRAME_RETURN_COLUMN): Change all uses to
	__LIBGCC_DWARF_ALT_FRAME_RETURN_COLUMN__.
	* config/nios2/linux-unwind.h (STACK_POINTER_REGNUM): Change use
	to __LIBGCC_STACK_POINTER_REGNUM__.
	* config/pa/hpux-unwind.h (DWARF_ALT_FRAME_RETURN_COLUMN): Change
	all uses to __LIBGCC_DWARF_ALT_FRAME_RETURN_COLUMN__.
	* config/pa/linux-unwind.h (DWARF_ALT_FRAME_RETURN_COLUMN): Change
	all uses to __LIBGCC_DWARF_ALT_FRAME_RETURN_COLUMN__.
	* config/rs6000/aix-unwind.h (DWARF_ALT_FRAME_RETURN_COLUMN):
	Change all uses to __LIBGCC_DWARF_ALT_FRAME_RETURN_COLUMN__.
	(STACK_POINTER_REGNUM): Change all uses to
	__LIBGCC_STACK_POINTER_REGNUM__.
	* config/rs6000/darwin-fallback.c (STACK_POINTER_REGNUM): Change
	use to __LIBGCC_STACK_POINTER_REGNUM__.
	* config/rs6000/linux-unwind.h (STACK_POINTER_REGNUM): Change all
	uses to __LIBGCC_STACK_POINTER_REGNUM__.
	* config/sparc/linux-unwind.h (DWARF_FRAME_REGISTERS): Change use
	to __LIBGCC_DWARF_FRAME_REGISTERS__.
	* config/sparc/sol2-unwind.h (DWARF_FRAME_REGISTERS): Change use
	to __LIBGCC_DWARF_FRAME_REGISTERS__.
	* config/tilepro/linux-unwind.h (STACK_POINTER_REGNUM): Change use
	to __LIBGCC_STACK_POINTER_REGNUM__.
	* config/xtensa/unwind-dw2-xtensa.h (DWARF_FRAME_REGISTERS):
	Remove conditional definition.
	* crtstuff.c (TEXT_SECTION_ASM_OP): Change all uses to
	__LIBGCC_TEXT_SECTION_ASM_OP__.
	(EH_FRAME_SECTION_NAME): Change all uses to
	__LIBGCC_EH_FRAME_SECTION_NAME__.
	(EH_TABLES_CAN_BE_READ_ONLY): Change all uses to
	__LIBGCC_EH_TABLES_CAN_BE_READ_ONLY__.
	(CTORS_SECTION_ASM_OP): Change all uses to
	__LIBGCC_CTORS_SECTION_ASM_OP__.
	(DTORS_SECTION_ASM_OP): Change all uses to
	__LIBGCC_DTORS_SECTION_ASM_OP__.
	(JCR_SECTION_NAME): Change all uses to
	__LIBGCC_JCR_SECTION_NAME__.
	(INIT_SECTION_ASM_OP): Change all uses to
	__LIBGCC_INIT_SECTION_ASM_OP__.
	(INIT_ARRAY_SECTION_ASM_OP): Change all uses to
	__LIBGCC_INIT_ARRAY_SECTION_ASM_OP__.
	* generic-morestack.c (STACK_GROWS_DOWNWARD): Change all uses to
	__LIBGCC_STACK_GROWS_DOWNWARD__.
	* libgcc2.c (INIT_SECTION_ASM_OP): Change all uses to
	__LIBGCC_INIT_SECTION_ASM_OP__.
	(INIT_ARRAY_SECTION_ASM_OP): Change all uses to
	__LIBGCC_INIT_ARRAY_SECTION_ASM_OP__.
	(EH_FRAME_SECTION_NAME): Change all uses to
	__LIBGCC_EH_FRAME_SECTION_NAME__.
	* libgcov-profiler.c (VTABLE_USES_DESCRIPTORS): Remove conditional
	definitions.  Change all uses to
	__LIBGCC_VTABLE_USES_DESCRIPTORS__.
	* unwind-dw2.c (STACK_GROWS_DOWNWARD): Change all uses to
	__LIBGCC_STACK_GROWS_DOWNWARD__.
	(DWARF_FRAME_REGISTERS): Change all uses to
	__LIBGCC_DWARF_FRAME_REGISTERS__.
	(EH_RETURN_STACKADJ_RTX): Change all uses to
	__LIBGCC_EH_RETURN_STACKADJ_RTX__.
	* unwind-dw2.h (DWARF_FRAME_REGISTERS): Remove conditional
	definition.  Change use to __LIBGCC_DWARF_FRAME_REGISTERS__.
	* unwind-sjlj.c (DONT_USE_BUILTIN_SETJMP): Change all uses to
	__LIBGCC_DONT_USE_BUILTIN_SETJMP__.
	(JMP_BUF_SIZE): Change use to __LIBGCC_JMP_BUF_SIZE__.

From-SVN: r214954
2014-09-05 13:03:46 +01:00
Nathan Sidwell b20ee094df libgcov-interface.c (STRONG_ALIAS): New.
* libgcov-interface.c (STRONG_ALIAS): New.
	(__gcov_flush): Call __gcov_reset_int.
	(__gcov_reset): Strong alias for ...
	(__gcov_reset_ing): ... this renamed hidden version.
	* libgcov.h (__gcov_reset_int): New declaration.

From-SVN: r214840
2014-09-03 00:43:00 +00:00
Yaakov Selkowitz 25efdb9f92 cygming-crtend.c (register_frame_ctor): Move atexit call from here...
2014-08-19  Yaakov Selkowitz  <yselkowi@redhat.com>

	* config/i386/cygming-crtend.c (register_frame_ctor): Move atexit
	call from here...
	* config/i386/cygming-crtbegin.c (__gcc_register_frame): to here.
	(__dso_handle): Define on Cygwin.
	* config/i386/t-cygming (crtbeginS.o): New rule.
	* config.host (*-*-cygwin*): Add crtbeginS.o to extra_parts.

From-SVN: r214162
2014-08-19 17:22:59 +02:00
Yaakov Selkowitz 1ac8397612 cygming-crtbegin.c (deregister_frame_fn): Fix declaration syntax.
2014-08-19  Yaakov Selkowitz  <yselkowi@redhat.com>

        * config/i386/cygming-crtbegin.c (deregister_frame_fn): Fix
        declaration syntax.

From-SVN: r214153
2014-08-19 16:52:17 +02:00
Steve Ellcey c6f9ea3b5e crtstuff.c: Undef caddr_t.
2014-08-13  Steve Ellcey  <sellcey@mips.com>

	* crtstuff.c: Undef caddr_t.

From-SVN: r213931
2014-08-13 22:23:16 +00:00
Steve Ellcey 5b1ea7c568 mips16.S: Skip when __mips_soft_float is defined.
2014-08-12  Steve Ellcey  <sellcey@mips.com>

	* config/mips/mips16.S:  Skip when __mips_soft_float is defined.

From-SVN: r213870
2014-08-12 15:28:41 +00:00
Nathan Sidwell 4303c58196 Makefile.in (LIBGCOV_INTERFACE): Move _gcov_dump ...
* Makefile.in (LIBGCOV_INTERFACE): Move _gcov_dump ...
	(LIBGCOV_DRIVER): ... to here.
	* libgcov.h (gcov_do_dump): New #define.
	(struct gcov_root): New.
	(__gcov_root): New declaration.
	(__gcov_dump_one): Declare.
	* libgcov-driver.c (gcov_list, gcov_dump_complete,
	run_accounted): Delete.
	(gcov_compute_histogram): Add LIST argument, adjust.
	(compute_summary): Adjust gcov_compute_histogram call.
	(gcov_do_dump): Not hidden, static in libgcov.
	(gcov_clear): Move  to interface.c.
	(__gcov_dump_one): New, broken out of ...
	(gcov_exit): ... here.  Make static.
	(__gcov_root): New.
	(__gcov_init): Adjust.
	* libgcov-interface.c (gcov_clear, gcov_exit): Remove
	declarations.
	(__gcov_flush): Use __gcov_dump_one and __gcov_reset.
	(gcov_clear): Moved from driver.c.   Add LIST argument.
	(__gcov_reset): Adjust for changed interfaces.
	(__gcov_fork): Remove local declaration of __gcov_flush_mx.

From-SVN: r213719
2014-08-07 18:02:06 +00:00
Edmar Wienskoski d406ae470c Fixed text formatting
From-SVN: r213640
2014-08-05 14:44:36 +00:00
Rohit Arul Raj 23742a9e1b re PR middle-end/60102 (powerpc fp-bit ices at dwf_regno)
PR target/60102

[libgcc]
2014-07-31  Rohit  <rohitarulraj@freescale.com>
	* config/rs6000/linux-unwind.h (ppc_fallback_frame_state): Update
	  based on change in SPE high register numbers and 3 HTM registers.

[gcc]
2014-07-31  Rohit  <rohitarulraj@freescale.com>
	* config/rs6000/rs6000.c
	  (rs6000_reg_names) : Add SPE high register names.
	  (alt_reg_names) : Likewise.
	  (rs6000_dwarf_register_span) : For SPE high registers, replace
	  dwarf register numbers with GCC hard register numbers.
	  (rs6000_init_dwarf_reg_sizes_extra) : Likewise.
	  (rs6000_dbx_register_number): For SPE high registers, return dwarf
	  register number for the corresponding GCC hard register number.

	* config/rs6000/rs6000.h
	  (FIRST_PSEUDO_REGISTER) : Update based on 32 newly added GCC hard
	  register numbers for SPE high registers.
	  (DWARF_FRAME_REGISTERS) :  Likewise.
	  (DWARF_REG_TO_UNWIND_COLUMN) : Likewise.
	  (DWARF_FRAME_REGNUM) : Likewise.
	  (FIXED_REGISTERS) : Likewise.
	  (CALL_USED_REGISTERS) : Likewise.
	  (CALL_REALLY_USED_REGISTERS) : Likewise.
	  (REG_ALLOC_ORDER) : Likewise.
	  (enum reg_class) : Likewise.
	  (REG_CLASS_NAMES) : Likewise.
	  (REG_CLASS_CONTENTS) : Likewise.
	  (SPE_HIGH_REGNO_P) : New macro to identify SPE high registers.	

	* gcc.target/powerpc/pr60102.c: New testcase.

From-SVN: r213596
2014-08-04 16:34:34 +00:00
Nathan Sidwell b98a872b22 Makefile.in (LIBGCOV_MERGE, [...]): Reformat.
* Makefile.in (LIBGCOV_MERGE, LIBGCOV_PROFILER,
	LIBGCOV_INTERFACE): Reformat.
	* libgcov-driver.c (gcov_exit, __gcov_init): Disable when
	IN_GCOV_TOOL.
	* libgcov-interface.c: Reformat some comments.
	(__gcov_flush_mx): Add declaration.  Tidy up definition.

From-SVN: r213442
2014-08-01 10:05:42 +00:00
Alan Modra 6adaaa1d3f ibm-ldouble.c (typedef union longDblUnion): Delete.
* config/rs6000/ibm-ldouble.c (typedef union longDblUnion): Delete.
	(pack_ldouble): New function.
	(__gcc_qadd): Use it.
	(__gcc_qmul): Likewise.
	(__gcc_qdiv): Likewise.
	(__gcc_qneg): Likewise.
	(__gcc_stoq): Likewise.
	(__gcc_dtoq): Likewise.

Co-Authored-By: Peter Bergner <bergner@vnet.ibm.com>

From-SVN: r213380
2014-07-31 11:22:58 -05:00
Ulrich Weigand 87cb0c0cdb s390.c (s390_emit_tpf_eh_return): Pass original return address as second parameter to __tpf_eh_return routine.
gcc/

2014-07-30  Ulrich Weigand  <Ulrich.Weigand@de.ibm.com>

	* config/s390/s390.c (s390_emit_tpf_eh_return): Pass original return
	address as second parameter to __tpf_eh_return routine.

libgcc/

2014-07-30  J. D. Johnston  <jjohnst@us.ibm.com>

	* config/s390/tpf-unwind.h: Include <stdbool.h>.
	(__tpf_eh_return): Add original return address as second parameter.
	Handle cases where unwinder routines were called directly, instead
	of from within the C++ library.

From-SVN: r213305
2014-07-30 16:26:15 +00:00
Nathan Sidwell 1992616143 libgcov.h: Move renaming of entry points to lib gcov specific portion.
libgcc/
	* libgcov.h: Move renaming of entry points to lib gcov specific
	portion.
	(gcov_do_dump): New rename.
	(gcov_rewrite): Remove inline, make HIDDEN.
	* libgcov-driver.c (gcov_clear, gcov_exit): Remove declarations.
	(gcov_exit_compute_summary): Rename to ...
	(compute_summary): ... here.  Add LIST argument.
	(gcov_exit_merge_gcda): Rename to ...
	(merge_one_data): ... here.
	(gcov_exit_write_gcda): Rename to ...
	(write_one_data): ... here.
	(gcov_exit_merge_summary): Rename to ...
	(merge_summary): Add RUN_COUNTED argument.
	(gcov_exit_dump_gcov): Rename to ...
	(dump_one_gcov): Add RUN_COUNTED argument.
	(gcov_do_dump): New function, broken out of ...
	(gcov_exit): ... here.  Call it.

	gcc/
	* gcov-io.c (gcov_var): Make hidden.
	* gcov-tool.c (gcov_list, gcov_exit): Remove declarations.
	(gcov_do_dump): Declare.
	(gcov_output_files): Call gcov_do_dump, not gcov_exit).

From-SVN: r213188
2014-07-29 13:48:38 +00:00
Anthony Green fa42c489de Add missing change from moxiebox patch posted earlier today.
From-SVN: r213108
2014-07-28 04:36:29 +00:00
Anthony Green 17522262ea Add moxiebox target.
From-SVN: r213098
2014-07-27 13:17:38 +00:00
Nathan Sidwell 6dc33097cc libgcov-driver.c (struct gcov_filename_aux): Rename ...
* libgcov-driver.c (struct gcov_filename_aux): Rename ...
	(struct gcov_filename): ... here.  Include buffer and max length
	fields.
	(gcov_max_filename): Remove.
	(gi_filename): Remove.
	(gcov_exit_compute_summary): Compute max filename here.
	(gcov_exit_merge_gcda): Add filename parm, adjust.
	(gcov_exit_merge_summary): Likewise.
	(gcov_exit_dump_gcov): Adjust for struct gcov_filename changes.
	(gcov_exit): Likewise.
	(__gcov_init): Don't calculate max length here.
	* libgcov_util.c (max_filename_len): Remove.
	(read_gcda_file): Don't calculate max length here.
	(gcov_read_profile_dir): Don't propagate here.
	* libgcov-driver-system.c (alloc_filename_struct): Adjust for
	struct gcov_filename changes.
	(gcov_exit_open_gcda_file): Likewise.

From-SVN: r213092
2014-07-27 07:22:47 +00:00
Nathan Sidwell 770f687ddb libgcov-driver.c (set_gcov_dump_complete, [...]): Remove global functions polluting user's namespace.
* libgcov-driver.c (set_gcov_dump_complete,
	reset_gcov_dump_complete, get_gcov_dump_complete): Remove global
	functions polluting user's namespace.
	(gcov_exit): Set variable directly.
	(gcov_clear): Reset variable directly.
	* libgcov-interface.c (get_gcov_dymp_complete,
	reset_gov_dump_complete): Remove declarations.
	(__gcov_reset, __gcov_dump): Don't call them.

From-SVN: r213058
2014-07-25 15:02:17 +00:00
DJ Delorie fabf71ba2c cygming-crtbegin.c (deregister_frame_fn): Newly public.
* config/i386/cygming-crtbegin.c (deregister_frame_fn): Newly public.
(__gcc_deregister_frame): Move logic to detect deregister function to...
(__gcc_register_frame): here, so it's consistent with the register logic.

From-SVN: r213009
2014-07-24 12:41:01 -04:00
Marius Cornea 0f8f303baf Remove redundant tests
PR libgcc/61685
	* bid128_fma.c (rounding_correction): Remove redundant tests.

From-SVN: r212942
2014-07-23 07:27:55 -07:00
Nathan Sidwell d10ee722fd gcov-tool.c (gcov_list): Declare here.
gcc/
	* gcov-tool.c (gcov_list): Declare here.
	(set_gcov_list): Remove.
	(gcov_output_files): Set gcov_list directly.

	libgcc/
	* libgcov-driver.c (set_gcov_list): Remove.
	(gcov_list): Make non-static in GCOV_TOOL.
	* libgcov.h (GCOV_TOOL_LINKAGE): Remove unused #define.

From-SVN: r212931
2014-07-23 12:08:31 +00:00
John David Anglin a41370902e linux-atomic.c (__sync_lock_release_4): New.
* config/pa/linux-atomic.c (__sync_lock_release_4): New.
	(SYNC_LOCK_RELEASE): Update to use __kernel_cmpxchg for release.
	Don't use SYNC_LOCK_RELEASE for int type.

From-SVN: r212767
2014-07-17 23:18:50 +00:00
Richard Biener 72602c6cb4 libgcov.h (struct gcov_fn_info): Make ctrs size 1.
2014-07-14  Richard Biener  <rguenther@suse.de>

	* libgcov.h (struct gcov_fn_info): Make ctrs size 1.

From-SVN: r212520
2014-07-14 13:22:02 +00:00
Rong Xu d5313205ef libgcov-util.c (gcov_max_filename): Fix declartion.
2014-07-11  Rong Xu  <xur@google.com>

	* libgcov-util.c (gcov_max_filename): Fix declartion.

From-SVN: r212463
2014-07-11 17:02:18 +00:00
Rong Xu c77556a5d1 Add gcov-tool: an offline gcda profile processing tool Support.
2014-07-10  Rong Xu  <xur@google.com>

	Add gcov-tool: an offline gcda profile processing tool
	Support.
	* gcc/gcov-io.c (gcov_position): Make avaialble to gcov-tool.
	(gcov_is_error): Ditto.
	(gcov_read_string): Ditto.
	(gcov_read_sync): Ditto.
	* gcc/gcov-io.h: Move counter defines to gcov-counter.def.
	* gcc/gcov-dump.c (tag_counters): Use gcov-counter.def.
	* gcc/coverage.c: Ditto.
	* gcc/gcov-tool.c: Offline gcda profile processing tool.
        (unlink_gcda_file): Remove one gcda file.
	(unlink_profile_dir): Remove gcda files from the profile path.
	(gcov_output_files): Output gcda files to an output dir.
	(profile_merge): Merge two profiles in directory.
	(print_merge_usage_message): Print merge usage.
	(merge_usage): Print merge usage and exit.
	(do_merge): Driver for profile merge sub-command.
	(profile_rewrite): Rewrite profile.
	(print_rewrite_usage_message): Print rewrite usage.
	(rewrite_usage): Print rewrite usage and exit.
	(do_rewrite): Driver for profile rewrite sub-command.
	(print_usage): Print gcov-info usage and exit.
	(print_version): Print gcov-info version.
	(process_args): Process arguments.
	(main): Main routine for gcov-tool.
	* gcc/Makefile.in: Build and install gcov-tool.
	* gcc/gcov-counter.def: New file split from gcov-io.h.
	* libgcc/libgcov-driver.c (gcov_max_filename): Make available
        to gcov-tool.
	* libgcc/libgcov-merge.c (__gcov_merge_add): Replace
        gcov_read_counter() with a Macro.
	(__gcov_merge_ior): Ditto.
	(__gcov_merge_time_profile): Ditto.
	(__gcov_merge_single): Ditto.
	(__gcov_merge_delta): Ditto.
	* libgcc/libgcov-util.c (void gcov_set_verbose): Set the verbose flag
        in the utility functions.
	(set_fn_ctrs): Utility function for reading gcda files to in-memory
        gcov_list object link lists.
	(tag_function): Ditto.
	(tag_blocks): Ditto.
	(tag_arcs): Ditto.
	(tag_lines): Ditto.
	(tag_counters): Ditto.
	(tag_summary): Ditto.
	(read_gcda_finalize): Ditto.
	(read_gcda_file): Ditto.
	(ftw_read_file): Ditto.
	(read_profile_dir_init): Ditto.
	(gcov_read_profile_dir): Ditto.
	(gcov_read_counter_mem): Ditto.
	(gcov_get_merge_weight): Ditto.
	(merge_wrapper): A wrapper function that calls merging handler.
	(gcov_merge): Merge two gcov_info objects with weights.
	(find_match_gcov_info): Find the matched gcov_info in the list.
	(gcov_profile_merge): Merge two gcov_info object lists.
	(__gcov_add_counter_op): Process edge profile counter values.
	(__gcov_ior_counter_op): Process IOR profile counter values.
	(__gcov_delta_counter_op): Process delta profile counter values.
	(__gcov_single_counter_op): Process single  profile counter values.
	(fp_scale): Callback function for float-point scaling.
	(int_scale): Callback function for integer fraction scaling. 
	(gcov_profile_scale): Scaling profile counters.
	(gcov_profile_normalize): Normalize profile counters.
	* libgcc/libgcov.h: Add headers and functions for gcov-tool use.
        (gcov_get_counter): New.
        (gcov_get_counter_target): Ditto.
        (struct gcov_info): Make the functions field mutable in gcov-tool
        compilation.
	* gcc/doc/gcc.texi: Include gcov-tool.texi.
	* gcc/doc/gcov-tool.texi: Document for gcov-tool.

From-SVN: r212448
2014-07-11 05:48:07 +00:00
Kai Tietz 5c7dac8aa1 re PR libgcc/61585 (Subscript-out-of-range in unwind-seh.c?)
PR libgcc/61585
	* unwind-seh.c (_Unwind_GetGR): Check for proper
	index range.
	(_Unwind_SetGR): Likewise.

From-SVN: r211900
2014-06-23 18:20:31 +02:00
Charles Baylis 4b9fcb37ba bpabi.c (__gnu_uldivmod_helper): Remove.
2014-06-18  Charles Baylis  <charles.baylis@linaro.org>

	* config/arm/bpabi.c (__gnu_uldivmod_helper): Remove.

From-SVN: r211797
2014-06-18 15:44:45 +00:00
Charles Baylis a7a7d3c8f0 bpabi-v6m.S (__aeabi_uldivmod): Perform division using __udivmoddi4.
2014-06-18  Charles Baylis  <charles.baylis@linaro.org>

	* config/arm/bpabi-v6m.S (__aeabi_uldivmod): Perform division using
	__udivmoddi4.

From-SVN: r211796
2014-06-18 15:44:10 +00:00
Charles Baylis 158ef346fd bpabi.S (__aeabi_ldivmod, [...]): Use .cfi_* directives for DWARF annotations.
2014-06-18  Charles Baylis  <charles.baylis@linaro.org>

	* config/arm/bpabi.S (__aeabi_ldivmod, __aeabi_uldivmod,
	push_for_divide, pop_for_divide): Use .cfi_* directives for DWARF
	annotations. Fix DWARF information.

From-SVN: r211795
2014-06-18 15:43:35 +00:00
Charles Baylis 1338118928 bpabi.S (__aeabi_ldivmod): Perform division using __udivmoddi4, and fixups for negative operands.
2014-06-18  Charles Baylis  <charles.baylis@linaro.org>

	* config/arm/bpabi.S (__aeabi_ldivmod): Perform division using
	__udivmoddi4, and fixups for negative operands.

From-SVN: r211794
2014-06-18 15:42:53 +00:00
Charles Baylis f493def153 bpabi.S (__aeabi_ldivmod): Optimise stack manipulation.
2014-06-18  Charles Baylis  <charles.baylis@linaro.org>

	* config/arm/bpabi.S (__aeabi_ldivmod): Optimise stack manipulation.

From-SVN: r211793
2014-06-18 15:42:21 +00:00
Charles Baylis 0b227df4e5 bpabi.S (__aeabi_uldivmod): Perform division using call to __udivmoddi4.
2014-06-18  Charles Baylis  <charles.baylis@linaro.org>

	* config/arm/bpabi.S (__aeabi_uldivmod): Perform division using call
	to __udivmoddi4.

From-SVN: r211792
2014-06-18 15:41:27 +00:00
Charles Baylis c9dae335f5 bpabi.S (__aeabi_uldivmod): Optimise stack pointer manipulation.
2014-06-18  Charles Baylis  <charles.baylis@linaro.org>

	* config/arm/bpabi.S (__aeabi_uldivmod): Optimise stack pointer
	manipulation.

From-SVN: r211791
2014-06-18 15:40:31 +00:00
Charles Baylis 6857b807c2 bpabi.S (__aeabi_uldivmod, [...]): Add comment describing register usage on function entry and exit.
2014-06-18  Charles Baylis  <charles.baylis@linaro.org>

	* config/arm/bpabi.S (__aeabi_uldivmod, __aeabi_ldivmod): Add comment
	describing register usage on function entry and exit.

From-SVN: r211790
2014-06-18 15:39:56 +00:00
Charles Baylis f21d8faab0 bpabi.S (__aeabi_uldivmod): Fix whitespace.
2014-06-18  Charles Baylis  <charles.baylis@linaro.org>

	* config/arm/bpabi.S (__aeabi_uldivmod): Fix whitespace.
	(__aeabi_ldivmod): Fix whitespace.

From-SVN: r211789
2014-06-18 15:38:48 +00:00
Uros Bizjak 0b6df8243c bid128_div.c (BID128_FUNCTION_ARG2): Remove unused variable 'Ql'.
* bid128_div.c (BID128_FUNCTION_ARG2): Remove unused variable 'Ql'.
	Call __mul_128x128_high instead of __mul_128x128_full.
	(TYPE0_FUNCTION_ARGTYPE1_ARGTYPE2): Ditto.
	(BID128_FUNCTION_ARGTYPE1_ARG128): Ditto.
	(BID128_FUNCTION_ARG128_ARGTYPE2): Ditto.
	* bid64_div.c (TYPE0_FUNCTION_ARGTYPE1_ARG128): Ditto.
	(TYPE0_FUNCTION_ARG128_ARGTYPE2): Ditto.
	(TYPE0_FUNCTION_ARG128_ARG128): Ditto.

From-SVN: r211424
2014-06-10 20:27:02 +02:00
Nick Clifton 161c931207 t-msp430 (HOST_LIBGCC2_CFLAGS): Add -mhwmult=none.
* config/msp430/t-msp430 (HOST_LIBGCC2_CFLAGS): Add
	-mhwmult=none.

From-SVN: r210811
2014-05-22 15:15:36 +00:00
Teresa Johnson e3f0315f88 gcov-io.c (gcov_position): Use gcov_nonruntime_assert.
2014-05-22  Teresa Johnson  <tejohnson@google.com>

	* gcov-io.c (gcov_position): Use gcov_nonruntime_assert.
	(gcov_is_error): Remove gcc_assert from IN_LIBGCOV code.
	(gcov_rewrite): Use gcov_nonruntime_assert.
	(gcov_open): Ditto.
	(gcov_write_words): Ditto.
	(gcov_write_length): Ditto.
	(gcov_read_words): Use gcov_nonruntime_assert, and remove
	gcc_assert from IN_LIBGCOV code.
	(gcov_read_summary): Use gcov_error to flag profile corruption.
	(gcov_sync): Use gcov_nonruntime_assert.
	(gcov_seek): Remove gcc_assert from IN_LIBGCOV code.
	(gcov_histo_index): Use gcov_nonruntime_assert.
	(static void gcov_histogram_merge): Ditto.
	(compute_working_sets): Ditto.
	* gcov-io.h (gcov_nonruntime_assert): Define.
	(gcov_error): Define for !IN_LIBGCOV


	* libgcov-driver.c (gcov_error): Move declaration before gcov-io.c
	include.

From-SVN: r210805
2014-05-22 14:06:08 +00:00
John Marino dbed5a9bff config.gcc (*-*-dragonfly*): New target.
2014-05-21  John Marino  <gnugcc@marino.st>

gcc:

	* config.gcc (*-*-dragonfly*): New target.
	* configure.ac: Detect dl_iterate_phdr (*freebsd*, *dragonfly*).
	* configure: Regenerate.
	* config/dragonfly-stdint.h: New.
	* config/dragonfly.h: New.
	* config/dragonfly.opt: New.
	* config/i386/dragonfly.h: New.
	* ginclude/stddef.h: Detect _PTRDIFF_T_DECLARED for DragonFly.

include:

	* liberty.h: Use basename function on DragonFly.

libcilkrts:

	* runtime/os-unix.c (__DragonFly__): New target.

libgcc:

	* config.host (*-*-dragonfly*): New target.
	* crtstuff.c: Make dl_iterate_support generic on *bsd.
	* enable-execute-stack-mprotect.c: Always mprotect on FreeBSD.
	* unwind-dw2-fde-dip.c: Add dl_iterate_phr support for DragonFly.
	* config/i386/dragonfly-unwind.h: New.

libitm:

	* configure.tgt (*-*-dragonfly*): New target.

libstdc++-v3:

	* acinclude.m4 (*-*-dragonfly*): New target.
	* configure: Regenerate.
	* configure.host (*-*-dragonfly*): New target.
	* config/locale/dragonfly/c_locale.cc: New.
	* config/locale/dragonfly/ctype_members.cc: New.
	* config/os/bsd/dragonfly/ctype_base.h: New.
	* config/os/bsd/dragonfly/ctype_configure_char.cc: New.
	* config/os/bsd/dragonfly/ctype_inline.h: New.
	* config/os/bsd/dragonfly/os_defines.h: New.

From-SVN: r210694
2014-05-21 12:08:58 +01:00
Maciej W. Rozycki 1ec380e5f5 re PR libgcc/60166 (ARM default NAN encoding violates EABI)
PR libgcc/60166
	* config/arm/sfp-machine.h (_FP_NANFRAC_H, _FP_NANFRAC_S)
	(_FP_NANFRAC_D, _FP_NANSIGN_Q): Set the quiet bit.

From-SVN: r210668
2014-05-21 01:24:05 +00:00
Bernd Edlinger 54fde020cc Enable Java on Cygwin-64
Currently it is not possible to build GCC's libjava support on Cygwin-64.

This patch fixes the current build-problems on Cygwin-64 and the most
fundamental bugs on that platform.

Note you must still add --enable-threads=posix to successfully build the
java language support.


boehm-gc/ChangeLog:

2014-05-13  Bernd Edlinger  <bernd.edlinger@hotmail.de>

        Fix current cygwin-64 build problems.
        * include/gc_config_macros.h (GC_PTHREADS): Use __CYGWIN__ instead
        of __CYGWIN32__ here.
        * win32_threads.c (GC_push_all_stacks): Push all X86_64 registers.
        (GC_get_thread_stack_base): Get the stack base for X86_64.

libffi/ChangeLog:

2014-05-13  Bernd Edlinger  <bernd.edlinger@hotmail.de>

        Fix current cygwin-64 build problems.
        * src/java_raw_api.c: Remove if !defined(FFI_NO_RAW_API).
        * src/x86/ffi.c: Add if defined(__CYGWIN__).
        * src/x86/win64.S (ffi_closure_win64, ffi_call_win64): Added
        handling for FFI_TYPE_UINT64, FFI_TYPE_POINTER and FFI_TYPE_INT.
        Added SEH information.  Fixed formatting.

libgcc/ChangeLog:

2014-05-13  Bernd Edlinger  <bernd.edlinger@hotmail.de>

        * unwind-seh.c (_Unwind_Backtrace): Uncommented, finished
        implementation.

libjava/ChangeLog:

2014-05-13  Bernd Edlinger  <bernd.edlinger@hotmail.de>

        Fix current cygwin-64 build problems.
        * configure.host: Added handling for x86_64-*-cygwin/mingw.
        * boehm.cc (_Jv_GCAttachThread, _Jv_GCDetachThread): Don't compile if
        GC_WIN32_THREADS is defined.
        * java/lang/natClass.cc (_Jv_InterfaceAssignableFrom): Rename interface
        to source_interface.

libjava/classpath/ChangeLog:

2014-05-13  Bernd Edlinger  <bernd.edlinger@hotmail.de>

        Fix current cygwin-64 build problems.
        * native/fdlibm/mprec.c (_REENT_CHECK_MP, _REENT_MP_FREELIST,
        _REENT_MP_P5S, __ULong, __Long): Undefine previous definitions.

From-SVN: r210386
2014-05-13 16:23:11 +00:00
Georg-Johann Lay 999db1252c arm.h (License): Add GCC Runtime Library Exception.
gcc/
	* config/arm/arm.h (License): Add GCC Runtime Library Exception.
	* config/arm/aout.h (License): Same.
	* config/arm/bpabi.h (License): Same.
	* config/arm/elf.h (License): Same.
	* config/arm/linux-elf.h (License): Same.
	* config/arm/linux-gas.h (License): Same.
	* config/arm/netbsd-elf.h (License): Same.
	* config/arm/uclinux-eabi.h (License): Same.
	* config/arm/uclinux-elf.h (License): Same.
	* config/arm/vxworks.h (License): Same.

libgcc/
	* config/arm/bpabi-lib.h (License): Add GCC Runtime Library Exception.

From-SVN: r210322
2014-05-12 09:02:36 +00:00
Rainer Orth cceaf54a4a Don't build libgcc-unwind.map with --disable-shared (PR libgcc/61097)
PR libgcc/61097
	* config/t-slibgcc-sld: Only build and install libgcc-unwind.map
	if --enable-shared.

From-SVN: r210210
2014-05-08 12:11:14 +00:00
Bernd Edlinger e3fe9b5b5a Work around for current cygwin32 build problems.
2014-04-30  Bernd Edlinger  <bernd.edlinger@hotmail.de>

        Work around for current cygwin32 build problems.
        * config/i386/cygming-crtbegin.c (__register_frame_info,
        __deregister_frame_info, _Jv_RegisterClasses): Compile weak default
        functions only for 64-bit systems.

From-SVN: r209942
2014-04-30 16:53:51 +00:00
Rainer Orth 54cf37e9bf Remove SSE execution test in crtfastmath.c
* config/i386/crtfastmath.c [!__x86_64__ && __sun__ && __svr4__]
	(sigill_caught, sigill_hdlr): Remove.

From-SVN: r209783
2014-04-25 08:01:09 +00:00
Rainer Orth d9f069ab4f Remove obsolete Solaris 9 support
libstdc++-v3:
	* configure.host: Remove solaris2.9 handling.
	Change os_include_dir to os/solaris/solaris2.10.
	* acinclude.m4 (ac_has_gthreads): Remove solaris2.9* handling.
	* crossconfig.m4: Remove *-solaris2.9 handling, simplify.
	* configure: Regenerate.
	* config/abi/post/solaris2.9: Remove.
	* config/os/solaris/solaris2.9: Rename to ...
	* config/os/solaris/solaris2.10: ... this.
	* config/os/solaris/solaris2.10/os_defines.h (CLOCK_MONOTONIC):
	Remove.

	* doc/xml/manual/configure.xml (--enable-libstdcxx-threads):
	Remove Solaris 9 reference.
	* doc/html/manual/configure.html: Regenerate.

	* testsuite/27_io/basic_istream/extractors_arithmetic/char/12.cc:
	Remove *-*-solaris2.9 xfail.
	* testsuite/27_io/basic_istream/extractors_arithmetic/wchar_t/12.cc:
	Likewise.

	* testsuite/ext/enc_filebuf/char/13598.cc: Remove *-*-solaris2.9
	xfail.

	libjava:
	* configure.ac (THREADLIBS, THREADSPEC): Remove *-*-solaris2.9
	handling.
	* configure: Regenerate.

	libgfortran:
	* config/fpu-387.h [__sun__ && __svr4__]: Remove SSE execution
	check.

	libgcc:
	* config/i386/crtfastmath.c (set_fast_math): Remove SSE execution
	check.
	* config/i386/sol2-unwind.h (x86_fallback_frame_state): Remove
	Solaris 9 single-threaded support.
	* config/sparc/sol2-unwind.h (sparc64_is_sighandler): Remove
	Solaris 9 single-threaded support.  Add call_user_handler code
	sequences.
	(sparc_is_sighandler): Likewise.

	libcpp:
	* lex.c: Remove Solaris 9 reference.

	gcc/testsuite:
	* gcc.c-torture/compile/pr28865.c: Remove dg-xfail-if.

	* gcc.dg/c99-stdint-6.c: Remove dg-options for *-*-solaris2.9.
	* gcc.dg/lto/20090210_0.c: Remove dg-extra-ld-options for
	*-*-solaris2.9.
	* gcc.dg/torture/pr47917.c: Remove dg-options for *-*-solaris2.9.
	* gcc.target/i386/pr22076.c: Remove i?86-*-solaris2.9 handling
	from dg-options.
	* gcc.target/i386/pr22152.c: Remove i?86-*-solaris2.9 handling
	from dg-additional-options.
	* gcc.target/i386/vect8-ret.c: Remove i?86-*-solaris2.9 handling
	from dg-options.

	* gcc.dg/vect/tree-vect.h (check_vect): Remove Solaris 9 SSE2
	execution check.
	* gcc.target/i386/sse-os-support.h [__sun__ && __svr4__]
	(sigill_hdlr): Remove.
	(sse_os_support) [__sun__ && __svr4__]: Remove SSE execution
	check.

	* gfortran.dg/erf_3.F90: Remove sparc*-*-solaris2.9* handling.
	* gfortran.dg/fmt_en.f90: Remove i?86-*-solaris2.9* handling.
	* gfortran.dg/round_4.f90: Remove *-*-solaris2.9* handling.

	* lib/target-supports.exp (add_options_for_tls): Remove
	*-*-solaris2.9* handling.

	gcc:
	* config.gcc (enable_obsolete): Remove *-*-solaris2.9*.
	(*-*-solaris2.[0-9] | *-*-solaris2.[0-9].*): Mark unsupported.
	(*-*-solaris2*): Simplify.
	(i[34567]86-*-solaris2* | x86_64-*-solaris2.1[0-9]*): Likewise.
	(i[34567]86-*-solaris2* | x86_64-*-solaris2.1[0-9]*): Remove
	*-*-solaris2.9* handling.

	* configure.ac (gcc_cv_as_hidden): Remove test for Solaris 9/x86
	as bug.
	(gcc_cv_ld_hidden): Remove *-*-solaris2.9* handling.
	(ld_tls_support): Remove i?86-*-solaris2.9, sparc*-*-solaris2.9
	handling, simplify.
	(gcc_cv_as_gstabs_flag): Remove workaround for Solaris 9/x86 as bug.
	* configure: Regenerate.

	* config/i386/sol2-9.h: Remove.

	* doc/install.texi (Specific, i?86-*-solaris2.9): Remove.
	(Specific, *-*-solaris2*): Mention Solaris 9 support removal.
	Remove Solaris 9 references.

	fixincludes:
	* inclhack.def (math_exception): Bypass on *-*-solaris2.1[0-9]*.
	(solaris_int_types): Remove.
	(solaris_longjmp_noreturn): Remove.
	(solaris_mutex_init_2): Remove.
	(solaris_once_init_2): Remove.
	(solaris_sys_va_list): Remove.
	* fixincl.x: Regenerate.
	* tests/base/iso/setjmp_iso.h: Remove.
	* tests/base/pthread.h [SOLARIS_MUTEX_INIT_2_CHECK]: Remove.
	[SOLARIS_ONCE_INIT_1_CHECK]: Remove wrapping done by
	solaris_once_init_2.
	[SOLARIS_ONCE_INIT_2_CHECK]: Remove.
	* tests/base/sys/int_types.h: Remove.
	* tests/base/sys/va_list.h: Remove.

	contrib:
	* config-list.mk (LIST): Remove sparc-sun-solaris2.9, i686-solaris2.9.

From-SVN: r209621
2014-04-22 12:30:59 +00:00
Andreas Krebbel 59976ef878 config.host: Append t-floattodi to tmake_file depending on host_address.
2014-03-27  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>

	* config.host: Append t-floattodi to tmake_file depending on
	host_address.

From-SVN: r208868
2014-03-27 15:40:31 +00:00
Joel Sherrill 31466bc083 ChangeLog: Fix typo
From-SVN: r208714
2014-03-20 16:15:39 +00:00
Joel Sherrill d02bbcf3f1 config.host (v850*-*-*): Add to tmake_file instead of resetting it.
2014-03-20  Joel Sherrill  <joel.sherrill@oarcorp.com>

	* config.host (v850*-*-*): Add to tmake_file instead of resetting
	it. This was removing the v850*-*-rtems* settings.

From-SVN: r208708
2014-03-20 16:11:10 +00:00
Uros Bizjak c2e7e5974b re PR libgcc/60472 (Warning: array subscript is above array bounds when compiling crtstuff.c)
PR libgcc/60472
	* crtstuff.c (frame_dummy): Use void **jcr_list temporary
	variable to avoid array subscript is above array bounds warnings.
	Use __builtin_expect when checking *jcr_list for NULL.

From-SVN: r208457
2014-03-10 19:31:20 +01:00
Rainer Orth 227a7dc8fb Don't install vtv_*.o unless --enable-vtable-verify (PR libgcc/59339)
PR libgcc/59339
	* config.host (*-*-linux*, frv-*-*linux*, *-*-kfreebsd*-gnu)
	(*-*-knetbsd*-gnu, *-*-gnu*, *-*-kopensolaris*-gnu): Only add
	vtv_*.o to extra_parts if enable_vtable_verify.

From-SVN: r208381
2014-03-06 12:24:11 +00:00
Nick Clifton df2b279c5c t-msp430 (LIB2ADD): Add lib2hw_mul.S
* config/msp430/t-msp430 (LIB2ADD): Add lib2hw_mul.S
	* config/msp430/lib2hw_mul.S: New: Hardware multiply routines.

From-SVN: r208374
2014-03-06 08:35:40 +00:00
Joey Ye dc11d79b74 re PR libgcc/60166 (ARM default NAN encoding violates EABI)
2014-02-28  Joey Ye  <joey.ye@arm.com>

        PR libgcc/60166
        * config/arm/sfp-machine.h (_FP_NANFRAC_H,
        _FP_NANFRAC_S, _FP_NANFRAC_D, _FP_NANFRAC_Q):
        Set to zero.

From-SVN: r208229
2014-02-28 21:53:40 +00:00
Walter Lee 341c653c70 TILE-Gx big endian support.
/:
	* configure.ac (tilepro-*-*) Change to tilepro*-*-*.
	(tilegx-*-*): Change to tilegx*-*-*.
	* configure: Regenerate.

contrib/:
	* config-list.mk (LIST): Add tilegxbe-linux-gnu.

libcpp/:
	* configure.ac: Change "tilepro" triplet to "tilepro*".
	* configure: Regenerate.

libgcc/:
	* config.host: Support "tilegx*" and "tilepro*" triplets.
	* config/tilegx/sfp-machine32.h (__BYTE_ORDER): Handle big endian.
	* config/tilegx/sfp-machine64.h (__BYTE_ORDER): Handle big endian.

gcc/:
	* config.gcc (tilepro-*-*): Change to tilepro*-*-*.
	(tilegx-*-linux*): Change to tilegx*-*-linux*; Support tilegxbe
	triplet.
	* common/config/tilegx/tilegx-common.c
	(TARGET_DEFAULT_TARGET_FLAGS): Define.
	* config/tilegx/linux.h (ASM_SPEC): Add endian_spec.
	(LINK_SPEC): Ditto.
	* config/tilegx/sync.md (atomic_test_and_set): Handle big endian.
	* config/tilegx/tilegx.c (tilegx_return_in_msb): New.
	(tilegx_gimplify_va_arg_expr): Handle big endian.
	(tilegx_expand_unaligned_load): Ditto.
	(tilegx_expand_unaligned_store): Ditto.
	(TARGET_RETURN_IN_MSB): New.
	* config/tilegx/tilegx.h (TARGET_DEFAULT): New.
	(TARGET_ENDIAN_DEFAULT): New.
	(TARGET_BIG_ENDIAN): Handle big endian.
	(BYTES_BIG_ENDIAN): Ditto.
	(WORDS_BIG_ENDIAN): Ditto.
	(FLOAT_WORDS_BIG_ENDIAN): Ditto.
	(ENDIAN_SPEC): New.
	(EXTRA_SPECS): New.
	* config/tilegx/tilegx.md (extv): Handle big endian.
	(extzv): Ditto.
	(insn_st<n>): Ditto.
	(insn_st<n>_add<bitsuffix>): Ditto.
	(insn_stnt<n>): Ditto.
	(insn_stnt<n>_add<bitsuffix>):Ditto.
	(vec_interleave_highv8qi): Handle big endian.
	(vec_interleave_highv8qi_be): New.
	(vec_interleave_highv8qi_le): New.
	(insn_v1int_h): Handle big endian.
	(vec_interleave_lowv8qi): Handle big endian.
	(vec_interleave_lowv8qi_be): New.
	(vec_interleave_lowv8qi_le): New.
	(insn_v1int_l): Handle big endian.
	(vec_interleave_highv4hi): Handle big endian.
	(vec_interleave_highv4hi_be): New.
	(vec_interleave_highv4hi_le): New.
	(insn_v2int_h): Handle big endian.
	(vec_interleave_lowv4hi): Handle big endian.
	(vec_interleave_lowv4hi_be): New.
	(vec_interleave_lowv4hi_le): New.
	(insn_v2int_l): Handle big endian.
	(vec_interleave_highv2si): Handle big endian.
	(vec_interleave_highv2si_be): New.
	(vec_interleave_highv2si_le): New.
	(insn_v4int_h): Handle big endian.
	(vec_interleave_lowv2si): Handle big endian.
	(vec_interleave_lowv2si_be): New.
	(vec_interleave_lowv2si_le): New.
	(insn_v4int_l): Handle big endian.
	* config/tilegx/tilegx.opt (mbig-endian): New option.
	(mlittle-endian): New option.
	* doc/install.texi: Document tilegxbe-linux.
	* doc/invoke.texi: Document -mbig-endian and -mlittle-endian.

From-SVN: r208069
2014-02-24 15:08:00 +00:00
Chung-Lin Tang 95ce7613d5 nios2.md (unspec): Add UNSPEC_PIC_GOTOFF_SYM enum.
2014-02-20  Chung-Lin Tang  <cltang@codesourcery.com>
	    Sandra Loosemore  <sandra@codesourcery.com>

	gcc/
	* config/nios2/nios2.md (unspec): Add UNSPEC_PIC_GOTOFF_SYM enum.
	* config/nios2/nios2.c (nios2_function_profiler):
	Add -fPIC (flag_pic == 2) support.
	(nios2_handle_custom_fpu_cfg): Fix warning parameter.
	(nios2_large_offset_p): New function.
	(nios2_unspec_reloc_p): Move up position, update to use
	nios2_large_offset_p.
	(nios2_unspec_address): Remove function.
	(nios2_unspec_offset): New function.
	(nios2_large_got_address): New function.
	(nios2_got_address): Add large offset support.
	(nios2_legitimize_tls_address): Update usage of removed and new
	functions.
	(nios2_symbol_binds_local_p): New function.
	(nios2_load_pic_address): Add -fPIC (flag_pic == 2) support.
	(nios2_legitimize_address): Update to use nios2_large_offset_p.
	(nios2_emit_move_sequence): Avoid legitimizing (const (unspec ...)).
	(nios2_print_operand): Merge H/L processing, add hiadj/lo
	processing for (const (unspec ...)).
	(nios2_unspec_reloc_name): Add UNSPEC_PIC_GOTOFF_SYM case.

	gcc/testsuite/
	* gcc.target/nios2/biggot-1.c: New.
	* gcc.target/nios2/biggot-2.c: New.

	libgcc/
	* config/nios2/t-nios2 (CRTSTUFF_T_CFLAGS): Add -mno-gpopt.
	* config/nios2/crti.S: Remove .file directive.
	* config/nios2/crtn.S: Likewise.

From-SVN: r207965
2014-02-20 16:35:10 +00:00
Kai Tietz 0bb4fc0517 re PR objc/56870 (@catch handler broken with SEH)
2014-02-18  Kai Tietz  <ktietz@redhat.com>
	Jonathan Schleifer  <js@webkeks.org>

	PR objc/56870
	* unwind-seh.c (_GCC_specific_handler): Pass proper
	value to unwind-handler.


Co-Authored-By: Jonathan Schleifer <js@webkeks.org>

From-SVN: r207849
2014-02-18 18:02:54 +01:00
Joseph Myers 9acf28f153 float128-mul-underflow.c, [...]: New tests.
gcc/testsuite:
	* gcc.dg/torture/float128-mul-underflow.c,
	gcc.dg/torture/float128-truncdf-underflow.c,
	gcc.dg/torture/float128-truncsf-underflow.c: New tests.

libgcc:
	* 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.
	* config/aarch64/sfp-machine.h (_FP_TININESS_AFTER_ROUNDING): New
	macro.
	* config/arm/sfp-machine.h (_FP_TININESS_AFTER_ROUNDING):
	Likewise.
	* config/c6x/sfp-machine.h (_FP_TININESS_AFTER_ROUNDING):
	Likewise.
	* config/cris/sfp-machine.h (_FP_TININESS_AFTER_ROUNDING):
	Likewise.
	* config/i386/sfp-machine.h (_FP_TININESS_AFTER_ROUNDING):
	Likewise.
	* config/ia64/sfp-machine.h (_FP_TININESS_AFTER_ROUNDING):
	Likewise.
	* config/lm32/sfp-machine.h (_FP_TININESS_AFTER_ROUNDING):
	Likewise.
	* config/mips/sfp-machine.h (_FP_TININESS_AFTER_ROUNDING):
	Likewise.
	* config/moxie/sfp-machine.h (_FP_TININESS_AFTER_ROUNDING):
	Likewise.
	* config/nds32/sfp-machine.h (_FP_TININESS_AFTER_ROUNDING):
	Likewise.
	* config/nios2/sfp-machine.h (_FP_TININESS_AFTER_ROUNDING):
	Likewise.
	* config/rs6000/sfp-machine.h (_FP_TININESS_AFTER_ROUNDING):
	Likewise.
	* config/score/sfp-machine.h (_FP_TININESS_AFTER_ROUNDING):
	Likewise.
	* config/tilegx/sfp-machine32.h (_FP_TININESS_AFTER_ROUNDING):
	Likewise.
	* config/tilegx/sfp-machine64.h (_FP_TININESS_AFTER_ROUNDING):
	Likewise.
	* config/tilepro/sfp-machine.h (_FP_TININESS_AFTER_ROUNDING):
	Likewise.

From-SVN: r207742
2014-02-12 23:24:49 +00:00
Andreas Krebbel ce245ec69e _fixdfdi.c: Throw invalid exception if number cannot be represented.
2014-02-07  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>

	* config/s390/32/_fixdfdi.c: Throw invalid exception if number
	cannot be represented.
	* config/s390/32/_fixsfdi.c: Likewise.
	* config/s390/32/_fixtfdi.c: Likewise.
	* config/s390/32/_fixunsdfdi.c: Likewise.
	* config/s390/32/_fixunssfdi.c: Likewise.
	* config/s390/32/_fixunstfdi.c: Likewise.

2014-02-07  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>

	* gcc.target/s390/fp2int1.c: New testcase.

From-SVN: r207596
2014-02-07 10:14:24 +00:00
Richard Sandiford 1c51d6883a configure.ac (libgcc_cv_mips_hard_float): New.
libgcc/
	* configure.ac (libgcc_cv_mips_hard_float): New.
	* configure: Regenerate.
	* config.host (mips*-*-*): Use t-hardfp-sfdf rather than
	t-softfp-sfdf for hard-float targets.
	* config/mips/t-mips (LIB2_SIDITI_CONV_FUNCS): Reinstate.
	(softfp_float_modes, softfp_int_modes, softfp_extensions)
	(softfp_truncations, softfp_exclude_libgcc2): New.
	* config/t-hardfp: New file.
	* config/t-hardfp-sfdf: Likewise.
	* config/hardfp.c: Likewise.

From-SVN: r207593
2014-02-07 07:46:34 +00:00
Andreas Krebbel bbf391dbf7 config.host: Include t-floattodi also for s390x.
2014-02-05  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>

	* config.host: Include t-floattodi also for s390x.
	* config/s390/32/_fixdfdi.c: Omit in 64 bit mode.
	* config/s390/32/_fixsfdi.c: Likewise.
	* config/s390/32/_fixtfdi.c: Likewise.
	* config/s390/32/_fixunsdfdi.c: Likewise.
	* config/s390/32/_fixunssfdi.c: Likewise.
	* config/s390/32/_fixunstfdi.c: Likewise.

From-SVN: r207507
2014-02-05 15:02:50 +00:00
Rainer Orth 91da048112 Ensure libgcc_s unwinder is always used on 64-bit Solaris 10+/x86 (PR target/59788)
gcc:
	PR target/59788
	* config/sol2.h (LINK_LIBGCC_MAPFILE_SPEC): Define.
	(LINK_SPEC): Use it for -shared, -shared-libgcc.

	libgcc:
	PR target/59788
	* config/t-slibgcc-sld (libgcc-unwind.map): New target.
	(install-libgcc-unwind-map-forbuild): New target.
	(all): Depend on install-libgcc-unwind-map-forbuild.
	(install-libgcc-unwind-map): New target.
	(install): Depend on install-libgcc-unwind-map.

	gcc/testsuite:
	PR target/59788
	* g++.dg/eh/unwind-direct.C: New test.

	toplevel:
	PR target/59788
	* ltmain.sh (opt_duplicate_compiler_generated_deps): Enable on
	*solaris2*.

From-SVN: r207454
2014-02-04 09:31:38 +00:00
Sandra Loosemore 02b677311e nios2.md (load_got_register): Initialize GOT pointer from _gp_got instead of _GLOBAL_OFFSET_TABLE_.
2014-02-02  Sandra Loosemore  <sandra@codesourcery.com>

	gcc/
	* config/nios2/nios2.md (load_got_register): Initialize GOT
	pointer from _gp_got instead of _GLOBAL_OFFSET_TABLE_.
	* config/nios2/nios2.c (nios2_function_profiler): Likewise.

	libgcc/
	* config/nios2/crti.S (_init): Initialize GOT pointer from
	_gp_got instead of _GLOBAL_OFFSET_TABLE_.

From-SVN: r207409
2014-02-02 17:12:17 -05:00
Richard Sandiford 1ea0a6515f configure.ac: Check __mips64 when setting host_address.
libgcc/
	* configure.ac: Check __mips64 when setting host_address.
	* configure: Regenerate.
	* config.host (mips*-*-*): Add t-softfp-sfdf, mips/t-softfp-tf,
	mips/t-mips64 and t-softfp.
	(mips*-*-linux*): Don't add mips/t-tpbit.
	* config/mips/t-mips (LIB2_SIDITI_CONV_FUNCS, FPBIT, FPBIT_CFLAGS)
	(DPBIT, DPBIT_CFLAGS): Delete.
	* config/mips/sfp-machine.h: New file.
	* config/mips/t-mips64: Likewise.
	* config/mips/t-softfp-tf: Likewise.
	* config/mips/t-tpbit: Delete.

From-SVN: r207403
2014-02-02 16:17:15 +00:00
Marcus Shawcroft f32b006110 [AArch64] Fix sfp-machine.h _FP_I_TYPE.
2014-01-29  Marcus Shawcroft  <marcus.shawcroft@arm.com>

	* config/aarch64/sfp-machine.h (_FP_I_TYPE): Define
	as long long.

From-SVN: r207259
2014-01-29 15:45:20 +00:00
Walter Lee a5420aa44e atomic.c: Include tconfig.h.
2014-01-25  Walter Lee  <walt@tilera.com>

            * config/tilepro/atomic.c: Include tconfig.h.  Don't include
            config.h or system.h.
            (bool) Define.

From-SVN: r207088
2014-01-25 20:37:01 +00:00
Walter Lee 24534912f7 atomic.c (pre_atomic_barrier): Mark inline.
2014-01-25  Walter Lee  <walt@tilera.com>

            * config/tilepro/atomic.c (pre_atomic_barrier): Mark inline.
            (post_atomic_barrier): Ditto.
            (__fetch_and_do): New macro.
            (__atomic_fetch_and_do): Use __fetch_and_do.
            (__sync_fetch_and_do): New macro.
            (__sync_fetch_and_add_4): New function.
            (__sync_fetch_and_sub_4): New function.
            (__sync_fetch_and_or_4): New function.
            (__sync_fetch_and_and_4): New function.
            (__sync_fetch_and_xor_4): New function.
            (__sync_fetch_and_nand_4): New function.
            (__sync_fetch_and_add_8): New function.
            (__sync_fetch_and_sub_8): New function.
            (__sync_fetch_and_or_8): New function.
            (__sync_fetch_and_and_8): New function.
            (__sync_fetch_and_xor_8): New function.
            (__sync_fetch_and_nand_8): New function.
            (__do_and_fetch): New macro.
            (__atomic_do_and_fetch): Use __do_and_fetch.
            (__sync_do_and_fetch): New macro.
            (__sync_add_and_fetch_4): New function.
            (__sync_sub_and_fetch_4): New function.
            (__sync_or_and_fetch_4): New function.
            (__sync_and_and_fetch_4): New function.
            (__sync_xor_and_fetch_4): New function.
            (__sync_nand_and_fetch_4): New function.
            (__sync_add_and_fetch_8): New function.
            (__sync_sub_and_fetch_8): New function.
            (__sync_or_and_fetch_8): New function.
            (__sync_and_and_fetch_8): New function.
            (__sync_xor_and_fetch_8): New function.
            (__sync_nand_and_fetch_8): New function.
            (__sync_exchange_methods): New macro.
            (__sync_val_compare_and_swap_4): New function.
            (__sync_bool_compare_and_swap_4): New function.
            (__sync_lock_test_and_test_4): New function.
            (__sync_val_compare_and_swap_8): New function.
            (__sync_bool_compare_and_swap_8): New function.
            (__sync_lock_test_and_test_8): New function.
            (__subword_cmpxchg_body): New macro.
            (__atomic_compare_exchange_1): Use __subword_cmpxchg_body.
            (__atomic_compare_exchange_2): Ditto.
            (__sync_subword_cmpxchg): New macro.
            (__sync_val_compare_and_swap_1): New function.
            (__sync_bool_compare_and_swap_1): New function.
            (__sync_val_compare_and_swap_2): New function.
            (__sync_bool_compare_and_swap_2): New function.
            (__atomic_subword): Rename to ...
            (__subword): ... New name.
            (__atomic_subword_fetch): Use __subword.
            (__sync_subword_fetch): New macro.
            (__sync_fetch_and_add_1): New function.
            (__sync_fetch_and_sub_1): New function.
            (__sync_fetch_and_or_1): New function.
            (__sync_fetch_and_and_1): New function.
            (__sync_fetch_and_xor_1): New function.
            (__sync_fetch_and_nand_1): New function.
            (__sync_fetch_and_add_2): New function.
            (__sync_fetch_and_sub_2): New function.
            (__sync_fetch_and_or_2): New function.
            (__sync_fetch_and_and_2): New function.
            (__sync_fetch_and_xor_2): New function.
            (__sync_fetch_and_nand_2): New function.
            (__sync_add_and_fetch_1): New function.
            (__sync_sub_and_fetch_1): New function.
            (__sync_or_and_fetch_1): New function.
            (__sync_and_and_fetch_1): New function.
            (__sync_xor_and_fetch_1): New function.
            (__sync_nand_and_fetch_1): New function.
            (__sync_add_and_fetch_2): New function.
            (__sync_sub_and_fetch_2): New function.
            (__sync_or_and_fetch_2): New function.
            (__sync_and_and_fetch_2): New function.
            (__sync_xor_and_fetch_2): New function.
            (__sync_nand_and_fetch_2): New function.
            (__atomic_subword_lock): Use __subword.
            (__sync_subword_lock): New macro.
            (__sync_lock_test_and_set_1): New function.
            (__sync_lock_test_and_set_2): New function.

From-SVN: r207087
2014-01-25 20:35:56 +00:00
Walter Lee 4d6d3bc532 atomic.c (BIT_OFFSET): Define.
2014-01-25  Walter Lee  <walt@tilera.com>

            * config/tilepro/atomic.c (BIT_OFFSET): Define.
            (__atomic_subword_cmpxchg): Use BIT_OFFSET.
            (__atomic_subword): Ditto.

From-SVN: r207086
2014-01-25 20:34:42 +00:00
Walter Lee cbd9890e93 atomic.c (__atomic_do_and_fetch): Add a prefix op argument.
2014-01-25  Walter Lee  <walt@tilera.com>

            * config/tilepro/atomic.c (__atomic_do_and_fetch): Add a
            prefix op argument.
            (__atomic_nand_fetch_4): Add prefix op.
            (__atomic_nand_fetch_8): Ditto.

From-SVN: r207085
2014-01-25 20:33:28 +00:00
Sterling Augustine 8fc36b1593 Fix typo.
From-SVN: r206900
2014-01-21 19:30:08 +00:00
Baruch Siach 800d8bd547 config.host (tmake_file): add t-slibgcc-libgcc for xtensa*-*-linux*.
libgcc/
	* config.host (tmake_file): add t-slibgcc-libgcc for xtensa*-*-linux*.

From-SVN: r206895
2014-01-21 19:06:32 +00:00
H.J. Lu 46dd124249 Move libgcc ChangeLog entries to libgcc/ChangeLog
From-SVN: r206486
2014-01-09 11:41:54 -08:00
Rong Xu 2c973ee7b3 libgcov-driver.c (this_prg): make it local to save bss space.
2014-01-09  Rong Xu  <xur@google.com>

	* libgcc/libgcov-driver.c (this_prg): make it local to save
        bss space.
	(gcov_exit_compute_summary): Ditto.
	(gcov_exit_merge_gcda): Ditto.
	(gcov_exit_merge_summary): Ditto.
	(gcov_exit_dump_gcov): Ditto.

From-SVN: r206483
2014-01-09 19:13:47 +00:00
Rong Xu 40d6b7535c gcov-io.c (gcov_var): Move from gcov-io.h.
2014-01-08  Rong Xu  <xur@google.com> 

	* gcc/gcov-io.c (gcov_var): Move from gcov-io.h.
	(gcov_position): Ditto.
	(gcov_is_error): Ditto.
	(gcov_rewrite): Ditto.
	* gcc/gcov-io.h: Refactor. Move gcov_var to gcov-io.h, and libgcov
	only part to libgcc/libgcov.h.
	* libgcc/libgcov-driver.c: Use libgcov.h.
	(buffer_fn_data): Use xmalloc instead of malloc.
	(gcov_exit_merge_gcda): Ditto.
	* libgcc/libgcov-driver-system.c (allocate_filename_struct): Ditto.
	* libgcc/libgcov.h: New common header files for libgcov-*.h.
	* libgcc/libgcov-interface.c: Use libgcov.h
	* libgcc/libgcov-merge.c: Ditto.
	* libgcc/libgcov-profiler.c: Ditto.
	* libgcc/Makefile.in: Add dependence to libgcov.h

From-SVN: r206435
2014-01-08 16:37:08 +00:00
Joseph Myers a02e7bddb8 ibm-ldouble.c (__gcc_qdiv): Scale up arguments in case of small numerator and finite nonzero result.
libgcc:
	* config/rs6000/ibm-ldouble.c (__gcc_qdiv): Scale up arguments in
	case of small numerator and finite nonzero result.

gcc/testsuite:
	* gcc.target/powerpc/rs6000-ldouble-3.c: New test.

From-SVN: r206310
2014-01-03 02:05:44 +00:00
Richard Sandiford ac1dca3cab Update copyright years in libgcc/
From-SVN: r206295
2014-01-02 22:25:22 +00:00
Richard Sandiford f9030485a3 arc-common.c, [...]: Use the standard form for the copyright notice.
gcc/
	* common/config/arc/arc-common.c, config/arc/arc-modes.def,
	config/arc/arc-protos.h, config/arc/arc.c, config/arc/arc.h,
	config/arc/arc.md, config/arc/arc.opt, config/arm/arm_neon_builtins.def,
	config/arm/crypto.def, config/i386/avx512cdintrin.h,
	config/i386/avx512erintrin.h, config/i386/avx512fintrin.h,
	config/i386/avx512pfintrin.h, config/i386/btver2.md,
	config/i386/shaintrin.h, config/i386/slm.md, config/linux-protos.h,
	config/linux.c, config/winnt-c.c, diagnostic-color.c,
	diagnostic-color.h, gimple-ssa-isolate-paths.c, vtable-verify.c,
	vtable-verify.h: Use the standard form for the copyright notice.

gcc/c-family/
	* array-notation-common.c, c-cilkplus.c: Use the standard form for
	the copyright notice.

gcc/c/
	* c-array-notation.c: Use the standard form for the copyright notice.

gcc/cp/
	* cp-array-notation.c, cp-cilkplus.c, vtable-class-hierarchy.c: Use
	the standard form for the copyright notice.

gcc/testsuite/
	* gcc.target/arc/arc.exp: Use the standard form for the copyright
	notice.

libgcc/
	* config/arc/asm.h, config/arc/crtg.S, config/arc/crtgend.S,
	config/arc/crti.S, config/arc/crtn.S, config/arc/divtab-arc700.c,
	config/arc/dp-hack.h, config/arc/fp-hack.h,
	config/arc/ieee-754/adddf3.S, config/arc/ieee-754/addsf3.S,
	config/arc/ieee-754/arc600-dsp/divdf3.S,
	config/arc/ieee-754/arc600-dsp/divsf3.S,
	config/arc/ieee-754/arc600-dsp/muldf3.S,
	config/arc/ieee-754/arc600-dsp/mulsf3.S,
	config/arc/ieee-754/arc600-mul64/divdf3.S,
	config/arc/ieee-754/arc600-mul64/divsf3.S,
	config/arc/ieee-754/arc600-mul64/muldf3.S,
	config/arc/ieee-754/arc600-mul64/mulsf3.S,
	config/arc/ieee-754/arc600/divsf3.S,
	config/arc/ieee-754/arc600/mulsf3.S,
	config/arc/ieee-754/divdf3.S, config/arc/ieee-754/divsf3-stdmul.S,
	config/arc/ieee-754/divsf3.S, config/arc/ieee-754/divtab-arc-df.c,
	config/arc/ieee-754/divtab-arc-sf.c, config/arc/ieee-754/eqdf2.S,
	config/arc/ieee-754/eqsf2.S, config/arc/ieee-754/extendsfdf2.S,
	config/arc/ieee-754/fixdfsi.S, config/arc/ieee-754/fixsfsi.S,
	config/arc/ieee-754/fixunsdfsi.S, config/arc/ieee-754/floatsidf.S,
	config/arc/ieee-754/floatsisf.S, config/arc/ieee-754/floatunsidf.S,
	config/arc/ieee-754/gedf2.S, config/arc/ieee-754/gesf2.S,
	config/arc/ieee-754/gtdf2.S, config/arc/ieee-754/gtsf2.S,
	config/arc/ieee-754/muldf3.S, config/arc/ieee-754/mulsf3.S,
	config/arc/ieee-754/orddf2.S, config/arc/ieee-754/ordsf2.S,
	config/arc/ieee-754/truncdfsf2.S, config/arc/ieee-754/uneqdf2.S,
	config/arc/ieee-754/uneqsf2.S, config/arc/initfini.c,
	config/arc/lib1funcs.S, config/arc/t-arc, config/arc/t-arc-newlib,
	config/cris/umulsidi3.S, config/msp430/cmpsi2.S,
	config/msp430/epilogue.S, config/msp430/lib2bitcountHI.c,
	config/msp430/lib2divHI.c, config/msp430/lib2divQI.c,
	config/msp430/lib2divSI.c, config/msp430/lib2mul.c,
	config/msp430/msp430-divmod.h, config/msp430/msp430-mul.h,
	config/msp430/slli.S, config/msp430/srai.S, config/msp430/srli.S,
	config/rl78/divmodhi.S, config/rl78/divmodqi.S, config/rl78/divmodsi.S,
	config/rl78/signbit.S, vtv_end.c, vtv_end_preinit.c, vtv_start.c,
	vtv_start_preinit.c: Use the standard form for the copyright notice.

libgomp/
	* hashtab.h: Use the standard form for the copyright notice.

libstdc++-v3/
	* testsuite/18_support/new_handler.cc,
	testsuite/18_support/terminate_handler.cc,
	testsuite/18_support/unexpected_handler.cc: Use the standard form for
	the copyright notice.

From-SVN: r206288
2014-01-02 22:09:02 +00:00
Chung-Lin Tang e430824f28 Commit of nios2 port to trunk:
contrib/
2013-12-31  Chung-Lin Tang  <cltang@codesourcery.com>

	* config-list.mk: Add nios2-elf, nios2-linux-gnu. Corrected
	ordering of some configs.

gcc/
2013-12-31  Chung-Lin Tang  <cltang@codesourcery.com>
	    Sandra Loosemore  <sandra@codesourcery.com>
	    Based on patches from Altera Corporation

	* config.gcc (nios2-*-*): Add nios2 config targets.
	* configure.ac (TLS_SECTION_ASM_FLAG): Add nios2 case.
	("$cpu_type"): Add nios2 as new cpu type.
	* configure: Regenerate.
	* config/nios2/nios2.c: New file.
	* config/nios2/nios2.h: New file.
	* config/nios2/nios2-opts.h: New file.
	* config/nios2/nios2-protos.h: New file.
	* config/nios2/elf.h: New file.
	* config/nios2/elf.opt: New file.
	* config/nios2/linux.h: New file.
	* config/nios2/nios2.opt: New file.
	* config/nios2/nios2.md: New file.
	* config/nios2/predicates.md: New file.
	* config/nios2/constraints.md: New file.
	* config/nios2/t-nios2: New file.
	* common/config/nios2/nios2-common.c: New file.
	* doc/invoke.texi (Nios II options): Document Nios II specific
	options.
	* doc/md.texi (Nios II family): Document Nios II specific
	constraints.
	* doc/extend.texi (Function Specific Option Pragmas): Document
	Nios II supported target pragma functionality.

gcc/testsuite/
2013-12-31  Sandra Loosemore  <sandra@codesourcery.com>
	    Chung-Lin Tang  <cltang@codesourcery.com>
	    Based on patches from Altera Corporation

	* gcc.dg/stack-usage-1.c (SIZE): Define case for __nios2__.
	* gcc.dg/20040813-1.c: Skip for nios2-*-*.
	* gcc.dg/20020312-2.c: Add __nios2__ case.
	* g++.dg/other/PR23205.C: Skip for nios2-*-*.
	* g++.dg/other/pr23205-2.C: Skip for nios2-*-*.
	* g++.dg/cpp0x/constexpr-rom.C: Skip for nios2-*-*.
	* g++.dg/cpp0x/alias-decl-debug-0.C: Skip for nios2-*-*.
	* g++.old-deja/g++.jason/thunk3.C: Skip for nios2-*-*.
	* lib/target-supports.exp (check_profiling_available): Check for
	nios2-*-elf.
	* gcc.c-torture/execute/pr47237.x:: Skip for nios2-*-*.
	* gcc.c-torture/execute/20101011-1.c: Skip for nios2-*-*.
	* gcc.c-torture/execute/builtins/lib/chk.c (memset): Place
	char-based memset loop before inline check, to prevent
	problems when called to initialize .bss. Update comments.
	* gcc.target/nios2/nios2.exp: New DejaGNU file.
	* gcc.target/nios2/nios2-custom-1.c: New test.
	* gcc.target/nios2/nios2-trap-insn.c: New test.
	* gcc.target/nios2/nios2-builtin-custom.c: New test.
	* gcc.target/nios2/nios2-builtin-io.c: New test.
	* gcc.target/nios2/nios2-stack-check-1.c: New test.
	* gcc.target/nios2/nios2-stack-check-2.c: New test.
	* gcc.target/nios2/nios2-rdctl.c: New test.
	* gcc.target/nios2/nios2-wrctl.c: New test.
	* gcc.target/nios2/nios2-wrctl-zero.c: New test.
	* gcc.target/nios2/nios2-wrctl-not-zero.c: New test.
	* gcc.target/nios2/nios2-rdwrctl-1.c: New test.
	* gcc.target/nios2/nios2-reg-constraints.c: New test.
	* gcc.target/nios2/nios2-ashlsi3-one_shift.c: New test.
	* gcc.target/nios2/nios2-mul-options-1.c: New test.
	* gcc.target/nios2/nios2-mul-options-2.c: New test.
	* gcc.target/nios2/nios2-mul-options-3.c: New test.
	* gcc.target/nios2/nios2-mul-options-4.c: New test.
	* gcc.target/nios2/nios2-nor.c: New test.
	* gcc.target/nios2/nios2-stxio.c: New test.
	* gcc.target/nios2/custom-fp-1.c: New test.
	* gcc.target/nios2/custom-fp-2.c: New test.
	* gcc.target/nios2/custom-fp-3.c: New test.
	* gcc.target/nios2/custom-fp-4.c: New test.
	* gcc.target/nios2/custom-fp-5.c: New test.
	* gcc.target/nios2/custom-fp-6.c: New test.
	* gcc.target/nios2/custom-fp-7.c: New test.
	* gcc.target/nios2/custom-fp-8.c: New test.
	* gcc.target/nios2/custom-fp-cmp-1.c: New test.
	* gcc.target/nios2/custom-fp-conversion.c: New test.
	* gcc.target/nios2/custom-fp-double.c: New test.
	* gcc.target/nios2/custom-fp-float.c: New test.
	* gcc.target/nios2/nios2-int-types.c: New test.
	* gcc.target/nios2/nios2-cache-1.c: New test.
	* gcc.target/nios2/nios2-cache-2.c: New test.

libgcc/
2013-12-31  Sandra Loosemore  <sandra@codesourcery.com>
	    Chung-Lin Tang  <cltang@codesourcery.com>
	    Based on patches from Altera Corporation

	* config.host (nios2-*-*,nios2-*-linux*): Add nios2 host cases.
	* config/nios2/lib2-nios2.h: New file.
	* config/nios2/lib2-divmod-hi.c: New file.
	* config/nios2/linux-unwind.h: New file.
	* config/nios2/lib2-divmod.c: New file.
	* config/nios2/linux-atomic.c: New file.
	* config/nios2/t-nios2: New file.
	* config/nios2/crti.asm: New file.
	* config/nios2/t-linux: New file.
	* config/nios2/lib2-divtable.c: New file.
	* config/nios2/lib2-mul.c: New file.
	* config/nios2/tramp.c: New file.
	* config/nios2/crtn.asm: New file.

From-SVN: r206256
2013-12-31 07:05:35 +00:00
Uros Bizjak 1879e97f6c cpuinfo.c (enum vendor_signatures): Remove.
* config/i386/cpuinfo.c (enum vendor_signatures): Remove.
	(__cpu_indicator_init): Use signature_INTEL_ebx and signature_AMD_ebx
	from cpuid.h to check vendor signatures.

From-SVN: r206211
2013-12-26 15:12:20 +01:00
Ganesh Gopalasubramanian f4a4bdbb6c Change AMD cpu names
From-SVN: r206210
2013-12-26 08:54:49 +00:00
H.J. Lu 0bb52f2576 Convert leading spaces to tab
From-SVN: r206209
2013-12-25 17:49:07 -08:00
H.J. Lu 8d2ae544f1 Remove model 0x3f from Haswell
* config/i386/cpuinfo.c (get_intel_cpu): Remove model 0x3f from
	Haswell.

From-SVN: r206208
2013-12-25 17:48:24 -08:00
Allan Sandfeld Jensen 74924838e8 re PR target/59422 (Support more targets for function multi versioning)
gcc/

2013-12-25  Allan Sandfeld Jensen  <sandfeld@kde.org>
	    H.J. Lu  <hongjiu.lu@intel.com>

	PR target/59422
	* config/i386/i386.c (get_builtin_code_for_version): Handle
	PROCESSOR_HASWELL, PROCESSOR_SILVERMONT, PROCESSOR_BTVER1,
	PROCESSOR_BTVER2, PROCESSOR_BDVER3 and PROCESSOR_BDVER4.
	Change priority of PROCESSOR_BDVER1 to P_PROC_XOP.
	(fold_builtin_cpu): Add "ivybridge", "haswell", "bonnell",
	"silvermont", "bobcat" and "jaguar" CPU names.  Add "sse4a",
	"fma4", "xop" and "fma" ISA names.

libgcc/

2013-12-25  Allan Sandfeld Jensen  <sandfeld@kde.org>
	    H.J. Lu  <hongjiu.lu@intel.com>

        PR target/59422
        * config/i386/cpuinfo.c (enum processor_types):  Add AMD_BOBCAT
	and AMD_JAGUAR.
	(enum processor_subtypes): Add AMDFAM15H_BDVER3, AMDFAM15H_BDVER4,
	INTEL_COREI7_IVYBRIDGE and INTEL_COREI7_HASWELL.
	(enum processor_features): Add  FEATURE_SSE4_A, FEATURE_FMA4,
	FEATURE_XOP and FEATURE_FMA.
	(get_amd_cpu): Handle AMD_BOBCAT, AMD_JAGUAR, AMDFAM15H_BDVER2 and
	AMDFAM15H_BDVER3.
	(get_intel_cpu): Handle INTEL_COREI7 and INTEL_COREI7_HASWELL.
        (get_available_features): Handle FEATURE_FMA, FEATURE_SSE4_A,
	FEATURE_FMA4 and FEATURE_XOP.

testsuite/

2013-12-25  Allan Sandfeld Jensen  <sandfeld@kde.org>

	PR target/59422
	* gcc.target/i386/funcspec-5.c (test_fma, test_xop, test_no_fma,
	test_no_xop, test_arch_corei7, test_arch_corei7_avx,
	test_arch_core_avx2, test_arch_bdver1, test_arch_bdver2,
	test_arch_bdver3, test_tune_corei7, test_tune_corei7_avx,
	test_tune_core_avx2, test_tune_bdver1, test_tune_bdver2 and
	test_tune_bdver3): New function prototypes.

From-SVN: r206200
2013-12-25 23:22:24 +01:00
H.J. Lu d3c1197403 Use proper Intel processor names for -march=/-mtune=
gcc/

	* config/i386/core2.md: Replace corei7 with nehalem.

	* config/i386/driver-i386.c (host_detect_local_cpu): Use nehalem,
	westmere, sandybridge, ivybridge, haswell, bonnell, silvermont
	for cpu names.

	* config/i386/i386-c.c (ix86_target_macros_internal): Replace
	PROCESSOR_COREI7, PROCESSOR_COREI7_AVX, PROCESSOR_ATOM,
	PROCESSOR_SLM with PROCESSOR_NEHALEM, PROCESSOR_SANDYBRIDGE,
	PROCESSOR_BONNELL, PROCESSOR_SILVERMONT.  Define
	__nehalem/__nehalem__, __sandybridge/__sandybridge__,
	__haswell/__haswell__, __tune_nehalem__, __tune_sandybridge__,
	__tune_haswell__, __bonnell/__bonnell__,
	__silvermont/__silvermont__, __tune_bonnell__,
	__tune_silvermont__.

	* config/i386/i386.c (m_COREI7): Renamed to ...
	(m_NEHALEM): This.
	(m_COREI7_AVX): Renamed to ...
	(m_SANDYBRIDGE): This.
	(m_ATOM): Renamed to ...
	(m_BONNELL): This.
	(m_SLM): Renamed to ...
	(m_SILVERMONT): This.
	(m_CORE_ALL): Updated.
	(cpu_names): Add "nehalem", "westmere", "sandybridge",
	"ivybridge", "haswell", "broadwell", "bonnell", "silvermont".
	(PTA_CORE2): New.
	(PTA_NEHALEM): Likewise.
	(PTA_WESTMERE): Likewise.
	(PTA_SANDYBRIDGE): Likewise.
	(PTA_IVYBRIDGE): Likewise.
	(PTA_HASWELL): Likewise.
	(PTA_BROADWELL): Likewise.
	(PTA_BONNELL): Likewise.
	(PTA_SILVERMONT): Likewise.
	(ix86_option_override_internal): Use new PTA_XXX.  Add nehalem,
	westmere, sandybridge, ivybridge, haswell, bonnell, silvermont.
	(ix86_lea_outperforms): Updated.
	(ix86_issue_rate): Likewise.
	(ix86_adjust_cost): Likewise.
	(ia32_multipass_dfa_lookahead): Likewise.
	(do_reorder_for_imul): Likewise.
	(swap_top_of_ready_list): Likewise.
	(ix86_sched_reorder): Likewise.
	(ix86_sched_init_global): Likewise.
	(get_builtin_code_for_version): Likewise.
	(processor_model): Replace M_INTEL_ATOM, M_INTEL_SLM with
	M_INTEL_BONNELL, M_INTEL_SILVERMONT.
	(arch_names_table): Updated.

	* config/i386/i386.h (TARGET_COREI7): Removed.
	(TARGET_COREI7_AVX): Likewise.
	(TARGET_ATOM): Likewise.
	(TARGET_SLM): Likewise.
	(TARGET_NEHALEM): New.
	(TARGET_SANDYBRIDGE): Likewise.
	(TARGET_BONNELL): Likewise.
	(TARGET_SILVERMONT): Likewise.
	(target_cpu_default): Add TARGET_CPU_DEFAULT_core_avx2,
	TARGET_CPU_DEFAULT_nehalem, TARGET_CPU_DEFAULT_westmere,
	TARGET_CPU_DEFAULT_sandybridge, TARGET_CPU_DEFAULT_ivybridge,
	TARGET_CPU_DEFAULT_broadwell, TARGET_CPU_DEFAULT_bonnell,
	TARGET_CPU_DEFAULT_silvermont.  Move TARGET_CPU_DEFAULT_haswell
	before TARGET_CPU_DEFAULT_broadwell.
	(processor_type): Replace PROCESSOR_COREI7, PROCESSOR_COREI7_AVX,
	PROCESSOR_ATOM, PROCESSOR_SLM with PROCESSOR_NEHALEM,
	PROCESSOR_SANDYBRIDGE, PROCESSOR_BONNELL, PROCESSOR_SILVERMONT.

	* config/i386/i386.md (cpu): Replace corei7 with nehalem.

	* config/i386/x86-tune.def: Updated.

	* doc/invoke.texi: Replace corei7, corei7-avx, core-avx-i,
	core-avx2, atom, slm with nehalem, sandybridge, ivybridge,
	haswell, bonnel, silvermont.  Add westmere.

libgcc/

	* config/i386/cpuinfo.c (processor_subtypes): Replace INTEL_ATOM,
	INTEL_SLM with INTEL_BONNELL, INTEL_SILVERMONT.
	(get_intel_cpu): Updated.

Co-Authored-By: Tocar Ilya <ilya.tocar@intel.com>

From-SVN: r206178
2013-12-23 05:05:09 -08:00
Zhenqiang Chen 064c4ff292 config.host (arm*-*-uclinux*): Move t-arm before t-bpabi.
2013-12-12  Zhenqiang Chen  <zhenqiang.chen@arm.com>

	* config.host (arm*-*-uclinux*): Move t-arm before t-bpabi.

From-SVN: r205917
2013-12-12 05:48:08 +00:00
Uros Bizjak 1f71a3c34d ChangeLog: Fix ChangeLog entry.
* libatomic/ChangeLog: Fix ChangeLog entry.
	* libgcc/ChangeLog: Ditto.

From-SVN: r205812
2013-12-09 18:41:40 +01:00
Uros Bizjak 8b02e720d2 sfp-exceptions.c (__sfp_handle_exceptions): Emit SSE instructions when __TARGET_SSE__ is defined.
libgcc/ChangeLog:

2013-12-09  Uros Bizjak  <ubizjak@gmail.com>

	* config/i386/sfp-exceptions.c (__sfp_handle_exceptions): Emit SSE
	instructions when __TARGET_SSE__ is defined.

libatomic/ChangeLog:

2013-12-09  Uros Bizjak  <ubizjak@gmail.com>

	* config/x86/fenv.c (__atomic_feraiseexcept): Emit SSE
	instructions when __TARGET_SSE__ is defined.

From-SVN: r205811
2013-12-09 18:37:43 +01:00
Ralf Corsepius 3fa2ccb430 config.host (microblaze-*-rtems*): New.
2013-12-06  Ralf Corsépius  <ralf.corsepius@rtems.org>

	* config.host (microblaze-*-rtems*): New.

From-SVN: r205751
2013-12-06 18:09:57 +01:00
Kugan Vivekanandarajah ecd78fc9ab bpapi-lib.h (TARGET_HAS_NO_HW_DIVIDE): Define for architectures that do not have hardware divide instruction.
2013-12-04  Kugan Vivekanandarajah  <kuganv@linaro.org>

	* config/arm/bpapi-lib.h (TARGET_HAS_NO_HW_DIVIDE): Define for
	architectures that do not have hardware divide instruction.
	i.e. architectures that do not define __ARM_ARCH_EXT_IDIV__.

From-SVN: r205666
2013-12-04 12:34:39 +01:00
Richard Sandiford b21fbbd29c longlong.h: New file.
include/
	* longlong.h: New file.

libgcc/
	* longlong.h: Delete (moved to include/).

libquadmath/
	* Makefile.am (AM_CPPFLAGS): Define.
	* Makefile.in: Regenerate.
	* printf/gmp-impl.h: Remove path from longlong.h include.

From-SVN: r205659
2013-12-04 10:49:14 +00:00
Adhemerval Zanella b03fb8c996 ibm-ldouble.c (__gcc_qadd): Fix add of normal number and qNaN to not raise an inexact exception.
libgcc/ChangeLog:

2013-12-03  Adhemerval Zanella  <azanella@linux.vnet.ibm.com>

	* config/rs6000/ibm-ldouble.c (__gcc_qadd): Fix add
	of normal number and qNaN to not raise an inexact exception.

gcc/testsuite/ChangeLog:

2013-12-03  Adhemerval Zanella  <azanella@linux.vnet.ibm.com>

	* gcc.target/powerpc/pr57363.c: New test.

From-SVN: r205645
2013-12-03 18:57:37 +00:00
Uros Bizjak 3c716922ad sfp-machine.h (__FP_FRAC_ADDI_4): New macro.
* config/i386/32/sfp-machine.h (__FP_FRAC_ADDI_4): New macro.

From-SVN: r205488
2013-11-28 16:31:23 +01:00
Matthew Leach cceeb9a978 linux-unwind.h (aarch64_fallback_frame_state): Check for correct opcodes on BE.
2013-11-26  Matthew Leach  <matthew.leach@arm.com>

	* config/aarch64/linux-unwind.h (aarch64_fallback_frame_state):	Check
	for correct opcodes on BE.

From-SVN: r205479
2013-11-28 10:59:38 +00:00
Uros Bizjak a3458d2231 op-4.h: Update from glibc.
* soft-fp/op-4.h: Update from glibc.

From-SVN: r205462
2013-11-27 22:57:52 +01:00
Kugan Vivekanandarajah 30b8f78b72 tm.texi.in (TARGET_HAS_NO_HW_DIVIDE): Define.
2013-11-27  Kugan Vivekanandarajah  <kuganv@linaro.org>

	gcc/
	* doc/tm.texi.in (TARGET_HAS_NO_HW_DIVIDE): Define.
	* doc/tm.texi (TARGET_HAS_NO_HW_DIVIDE): Regenerate.

	libgcc/
	* libgcc2.c (__udivmoddi4): Define new implementation when
	TARGET_HAS_NO_HW_DIVIDE is defined, for processors without any
	divide instructions.

From-SVN: r205444
2013-11-27 13:17:05 +01:00
Oleg Endo 82552a29d4 crt1.S (start): Don't do VBR_SETUP for SH2E.
* config/sh/crt1.S (start): Don't do VBR_SETUP for SH2E.

From-SVN: r205360
2013-11-25 17:11:50 +00:00
Rainer Orth 80e8745780 Suppress some warnings for soft-fp files
* config/t-softfp (soft-fp-objects-base): New variable.
	(soft-fp-objects): Use it.

From-SVN: r205355
2013-11-25 16:02:12 +00:00
David Edelsohn 4417887978 re PR target/33704 (AIX runs c++ constructors in incorrect order)
libgcc:

	PR target/33704
        * config/rs6000/aixinitfini.c: New file.
        * config/rs6000/t-aix-cxa (LIB2ADD_ST): Add aixinitfini.c.
        * config/rs6000/libgcc-aix-cxa.ver (GCC_4.9): Add libgcc initfini
        symbols.

gcc:

	PR target/33704
        * config/rs6000/aix.h (COLLECT_SHARED_INIT_FUNC): Define.
        (COLLECT_SHARED_FINI_FUNC): Define.

        * collect2.c (aix_shared_initname): Declare.
        (aix_shared_fininame): Declare.
        (symkind): Add SYM_AIXI and SYM_AIXD.
        (scanfilter_masks): Add SCAN_AIXI and SCAN_AIXD.
        (struct names special): Add GLOBAL__AIXI_ and GLOBAL__AIXD_.
        (aixlazy_flag): Parse.
        (extract_init_priority): SYM_AIXI and SYM_AIXD have highest priority.
        (scan_prog_file, COFF): Handle SYM_AIXI and SYM_AIXD.

Co-Authored-By: Andrew Dixie <andrewd@gentrack.com>

From-SVN: r205309
2013-11-23 10:38:07 -05:00
Yuri Rumyantsev e52876717c Enable AES, PCLMUL and RDRND for Silvermont
gcc/

2013-11-22  Yuri Rumyantsev  <ysrumyan@gmail.com>

	* config/i386/i386.c(processor_alias_table): Enable PTA_AES,
	PTA_PCLMUL and PTA_RDRND for Silvermont.
	* config/i386/driver-i386.c (host_detect_local_cpu): Set up cpu
	for Silvermont.

	* doc/invoke.texi: Mention AES, PCLMUL and RDRND for Silvermont.

libgcc/

2013-11-22  Yuri Rumyantsev  <ysrumyan@gmail.com>

	 * config/i386/cpuinfo.c (get_intel_cpu): Add Silvermont cases.

From-SVN: r205275
2013-11-22 08:33:40 -08:00
Jan Hubicka 7f369373da libgcov-driver.c (run_accounted): Make global level static.
* libgcov-driver.c (run_accounted): Make global level static.
	(gcov_exit_merge_summary): Silence warning; do not clear
	run_accounted here.
	(gcov_exit): Clear it here.

From-SVN: r204993
2013-11-19 01:08:02 +00:00
Jan Hubicka 1d0b33343a libgcov-driver.c (gcov_exit_merge_summary): Fix setting run_accounted.
* libgcov-driver.c (gcov_exit_merge_summary): Fix setting
	run_accounted.

From-SVN: r204991
2013-11-19 00:50:53 +00:00
Jan Hubicka 867c8b03ff libgcov-driver.c (get_gcov_dump_complete): Update comments.
* libgcov-driver.c (get_gcov_dump_complete): Update comments.
	(all_prg, crc32): Remove static vars.
	(gcov_exit_compute_summary): Rewrite to return crc32; do not clear
	all_prg.
	(gcov_exit_merge_gcda): Add crc32 parameter.
	(gcov_exit_merge_summary): Add crc32 and all_prg parameter;
	do not account run if it was already accounted.
	(gcov_exit_dump_gcov): Add crc32 and all_prg parameters.
	(gcov_exit): Initialize all_prg; update.

From-SVN: r204983
2013-11-18 22:04:48 +00:00
Andreas Schwab 66204992cb picflag.m4 (m68k-*-*): Use default PIC flag.
config/
* picflag.m4 (m68k-*-*): Use default PIC flag.

gcc/
* configure: Regenerate.

libada/
* configure: Regenerate.

libgcc/
* configure: Regenerate.

libiberty/
* configure: Regenerate.

From-SVN: r204854
2013-11-15 17:49:36 +00:00
Ulrich Weigand b54214fe22 rs6000.h (RS6000_SAVE_AREA): Handle ABI_ELFv2.
gcc/ChangeLog:

2013-11-14  Ulrich Weigand  <Ulrich.Weigand@de.ibm.com>
	    Alan Modra  <amodra@gmail.com>

	* config/rs6000/rs6000.h (RS6000_SAVE_AREA): Handle ABI_ELFv2.
	(RS6000_SAVE_TOC): Remove.
	(RS6000_TOC_SAVE_SLOT): New macro.
	* config/rs6000/rs6000.c (rs6000_parm_offset): New function.
	(rs6000_parm_start): Use it.
	(rs6000_function_arg_advance_1): Likewise.
	(rs6000_emit_prologue): Use RS6000_TOC_SAVE_SLOT.
	(rs6000_emit_epilogue): Likewise.
	(rs6000_call_aix): Likewise.
	(rs6000_output_function_prologue): Do not save/restore r11
	around calling _mcount for ABI_ELFv2.

2013-11-14  Ulrich Weigand  <Ulrich.Weigand@de.ibm.com>
	    Alan Modra  <amodra@gmail.com>

	* config/rs6000/rs6000-protos.h (rs6000_reg_parm_stack_space):
	Add prototype.
	* config/rs6000/rs6000.h (RS6000_REG_SAVE): Remove.
	(REG_PARM_STACK_SPACE): Call rs6000_reg_parm_stack_space.
	* config/rs6000/rs6000.c (rs6000_parm_needs_stack): New function.
	(rs6000_function_parms_need_stack): Likewise.
	(rs6000_reg_parm_stack_space): Likewise.
	(rs6000_function_arg): Do not replace BLKmode by Pmode when
	returning a register argument.

2013-11-14  Ulrich Weigand  <Ulrich.Weigand@de.ibm.com>
	    Michael Gschwind  <mkg@us.ibm.com>

	* config/rs6000/rs6000.h (FP_ARG_MAX_RETURN): New macro.
	(ALTIVEC_ARG_MAX_RETURN): Likewise.
	(FUNCTION_VALUE_REGNO_P): Use them.
	* config/rs6000/rs6000.c (TARGET_RETURN_IN_MSB): Define.
	(rs6000_return_in_msb): New function.
	(rs6000_return_in_memory): Handle ELFv2 homogeneous aggregates.
	Handle aggregates of up to 16 bytes for ELFv2.
	(rs6000_function_value): Handle ELFv2 homogeneous aggregates.

2013-11-14  Ulrich Weigand  <Ulrich.Weigand@de.ibm.com>
	    Michael Gschwind  <mkg@us.ibm.com>

	* config/rs6000/rs6000.h (AGGR_ARG_NUM_REG): Define.
	* config/rs6000/rs6000.c (rs6000_aggregate_candidate): New function.
	(rs6000_discover_homogeneous_aggregate): Likewise.
	(rs6000_function_arg_boundary): Handle homogeneous aggregates.
	(rs6000_function_arg_advance_1): Likewise.
	(rs6000_function_arg): Likewise.
	(rs6000_arg_partial_bytes): Likewise.
	(rs6000_psave_function_arg): Handle BLKmode arguments.

2013-11-14  Ulrich Weigand  <Ulrich.Weigand@de.ibm.com>
	    Michael Gschwind  <mkg@us.ibm.com>

	* config/rs6000/rs6000.h (AGGR_ARG_NUM_REG): Define.
	* config/rs6000/rs6000.c (rs6000_aggregate_candidate): New function.
	(rs6000_discover_homogeneous_aggregate): Likewise.
	(rs6000_function_arg_boundary): Handle homogeneous aggregates.
	(rs6000_function_arg_advance_1): Likewise.
	(rs6000_function_arg): Likewise.
	(rs6000_arg_partial_bytes): Likewise.
	(rs6000_psave_function_arg): Handle BLKmode arguments.

2013-11-14  Ulrich Weigand  <Ulrich.Weigand@de.ibm.com>

	* config/rs6000/rs6000.c (machine_function): New member
	r2_setup_needed.
	(rs6000_emit_prologue): Set r2_setup_needed if necessary.
	(rs6000_output_mi_thunk): Set r2_setup_needed.
	(rs6000_output_function_prologue): Output global entry point
	prologue and local entry point marker if needed for ABI_ELFv2.
	Output -mprofile-kernel code here.
	(output_function_profiler): Do not output -mprofile-kernel
	code here; moved to rs6000_output_function_prologue.
	(rs6000_file_start): Output ".abiversion 2" for ABI_ELFv2.

	(rs6000_emit_move): Do not handle dot symbols for ABI_ELFv2.
	(rs6000_output_function_entry): Likewise.
	(rs6000_assemble_integer): Likewise.
	(rs6000_elf_encode_section_info): Likewise.
	(rs6000_elf_declare_function_name): Do not create dot symbols
	or .opd section for ABI_ELFv2.

	(rs6000_trampoline_size): Update for ABI_ELFv2 trampolines.
	(rs6000_trampoline_init): Likewise.
	(rs6000_elf_file_end): Call file_end_indicate_exec_stack
	for ABI_ELFv2.

	(rs6000_call_aix): Handle ELFv2 indirect calls.  Do not check
	for function descriptors in ABI_ELFv2.

	* config/rs6000/rs6000.md ("*call_indirect_aix<mode>"): Support
	on ABI_AIX only, not ABI_ELFv2.
	("*call_value_indirect_aix<mode>"): Likewise.
	("*call_indirect_elfv2<mode>"): New pattern.
	("*call_value_indirect_elfv2<mode>"): Likewise.

	* config/rs6000/predicates.md ("symbol_ref_operand"): Do not
	check for function descriptors in ABI_ELFv2.
	("current_file_function_operand"): Likewise.

	* config/rs6000/ppc-asm.h [__powerpc64__ && _CALL_ELF == 2]:
	(toc): Undefine.
	(FUNC_NAME): Define ELFv2 variant.
	(JUMP_TARGET): Likewise.
	(FUNC_START): Likewise.
	(HIDDEN_FUNC): Likewise.
	(FUNC_END): Likeiwse.

2013-11-14  Ulrich Weigand  <Ulrich.Weigand@de.ibm.com>

	* config.gcc [powerpc*-*-* | rs6000-*-*]: Support --with-abi=elfv1
	and --with-abi=elfv2.
	* config/rs6000/option-defaults.h (OPTION_DEFAULT_SPECS): Add "abi".
	* config/rs6000/rs6000.opt (mabi=elfv1): New option.
	(mabi=elfv2): Likewise.
	* config/rs6000/rs6000-opts.h (enum rs6000_abi): Add ABI_ELFv2.
	* config/rs6000/linux64.h (DEFAULT_ABI): Do not hard-code to AIX_ABI
	if !RS6000_BI_ARCH.
	(ELFv2_ABI_CHECK): New macro.
	(SUBSUBTARGET_OVERRIDE_OPTIONS): Use it to decide whether to set
	rs6000_current_abi to ABI_AIX or ABI_ELFv2.
	(GLIBC_DYNAMIC_LINKER64): Support ELFv2 ld.so version.
	* config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Predefine
	_CALL_ELF and __STRUCT_PARM_ALIGN__ if appropriate.

	* config/rs6000/rs6000.c (rs6000_debug_reg_global): Handle ABI_ELFv2.
	(debug_stack_info): Likewise.
	(rs6000_file_start): Treat ABI_ELFv2 the same as ABI_AIX.
	(rs6000_legitimize_tls_address): Likewise.
	(rs6000_conditional_register_usage): Likewise.
	(rs6000_emit_move): Likewise.
	(init_cumulative_args): Likewise.
	(rs6000_function_arg_advance_1): Likewise.
	(rs6000_function_arg): Likewise.
	(rs6000_arg_partial_bytes): Likewise.
	(rs6000_output_function_entry): Likewise.
	(rs6000_assemble_integer): Likewise.
	(rs6000_savres_strategy): Likewise.
	(rs6000_stack_info): Likewise.
	(rs6000_function_ok_for_sibcall): Likewise.
	(rs6000_emit_load_toc_table): Likewise.
	(rs6000_savres_routine_name): Likewise.
	(ptr_regno_for_savres): Likewise.
	(rs6000_emit_prologue): Likewise.
	(rs6000_emit_epilogue): Likewise.
	(rs6000_output_function_epilogue): Likewise.
	(output_profile_hook): Likewise.
	(output_function_profiler): Likewise.
	(rs6000_trampoline_size): Likewise.
	(rs6000_trampoline_init): Likewise.
	(rs6000_elf_output_toc_section_asm_op): Likewise.
	(rs6000_elf_encode_section_info): Likewise.
	(rs6000_elf_reloc_rw_mask): Likewise.
	(rs6000_elf_declare_function_name): Likewise.
	(rs6000_function_arg_boundary): Treat ABI_ELFv2 the same as ABI_AIX,
	except that rs6000_compat_align_parm is always assumed false.
	(rs6000_gimplify_va_arg): Likewise.
	(rs6000_call_aix): Update comment.
	(rs6000_sibcall_aix): Likewise.
	* config/rs6000/rs6000.md ("tls_gd_aix<TLSmode:tls_abi_suffix>"):
	Treat ABI_ELFv2 the same as ABI_AIX.
	("*tls_gd_call_aix<TLSmode:tls_abi_suffix>"): Likewise.
	("tls_ld_aix<TLSmode:tls_abi_suffix>"): Likewise.
	("*tls_ld_call_aix<TLSmode:tls_abi_suffix>"): Likewise.
	("load_toc_aix_si"): Likewise.
	("load_toc_aix_di"): Likewise.
	("call"): Likewise.
	("call_value"): Likewise.
	("*call_local_aix<mode>"): Likewise.
	("*call_value_local_aix<mode>"): Likewise.
	("*call_nonlocal_aix<mode>"): Likewise.
	("*call_value_nonlocal_aix<mode>"): Likewise.
	("*call_indirect_aix<mode>"): Likewise.
	("*call_value_indirect_aix<mode>"): Likewise.
	("sibcall"): Likewise.
	("sibcall_value"): Likewise.
	("*sibcall_aix<mode>"): Likewise.
	("*sibcall_value_aix<mode>"): Likewise.
	* config/rs6000/predicates.md ("symbol_ref_operand"): Likewise.
	("current_file_function_operand"): Likewise.

gcc/testsuite/ChangeLog:

2013-11-14  Ulrich Weigand  <Ulrich.Weigand@de.ibm.com>

	* gcc.target/powerpc/ppc64-abi-1.c (stack_frame_t): Remove
	compiler and linker field if _CALL_ELF == 2.
	* gcc.target/powerpc/ppc64-abi-2.c (stack_frame_t): Likewise.
	* gcc.target/powerpc/ppc64-abi-dfp-1.c (stack_frame_t): Likewise.
	* gcc.dg/stack-usage-1.c (SIZE): Update value for _CALL_ELF == 2.

2013-11-14  Ulrich Weigand  <Ulrich.Weigand@de.ibm.com>

	* gcc.target/powerpc/ppc64-abi-dfp-1.c (FUNC_START): New macro.
	(WRAPPER): Use it.
	* gcc.target/powerpc/no-r11-1.c: Skip on powerpc_elfv2.
	* gcc.target/powerpc/no-r11-2.c: Skip on powerpc_elfv2.
	* gcc.target/powerpc/no-r11-3.c: Skip on powerpc_elfv2.

2013-11-14  Ulrich Weigand  <Ulrich.Weigand@de.ibm.com>

	* lib/target-supports.exp (check_effective_target_powerpc_elfv2):
	New function.
	* gcc.target/powerpc/pr57949-1.c: Disable for powerpc_elfv2.
	* gcc.target/powerpc/pr57949-2.c: Likewise.

libgcc/ChangeLog:

2013-11-14  Ulrich Weigand  <Ulrich.Weigand@de.ibm.com>
	    Alan Modra  <amodra@gmail.com>

	* config/rs6000/linux-unwind.h (TOC_SAVE_SLOT): Define.
	(frob_update_context): Use it.

2013-11-14  Ulrich Weigand  <Ulrich.Weigand@de.ibm.com>
	    Alan Modra  <amodra@gmail.com>

	* config/rs6000/tramp.S [__powerpc64__ && _CALL_ELF == 2]:
	(trampoline_initial): Provide ELFv2 variant.
	(__trampoline_setup): Likewise.

	* config/rs6000/linux-unwind.h (frob_update_context): Do not
	check for AIX indirect function call sequence if _CALL_ELF == 2.

2013-11-14  Ulrich Weigand  <Ulrich.Weigand@de.ibm.com>
	    Alan Modra  <amodra@gmail.com>

	* config/rs6000/linux-unwind.h (get_regs): Do not support
	old kernel versions if _CALL_ELF == 2.
	(frob_update_context): Do not support PLT stub variants only
	generated by old linkers if _CALL_ELF == 2.

libitm/ChangeLog:

2013-11-14  Ulrich Weigand  <Ulrich.Weigand@de.ibm.com>

	* config/powerpc/sjlj.S [__powerpc64__ && _CALL_ELF == 2]:
	(FUNC): Define ELFv2 variant.
	(END): Likewise.
	(HIDDEN): Likewise.
	(CALL): Likewise.
	(BASE): Likewise.
	(LR_SAVE): Likewise.

libstdc++/ChangeLog:

2013-11-14  Ulrich Weigand  <Ulrich.Weigand@de.ibm.com>

	* scripts/extract_symvers.in: Ignore <localentry: > fields
	in readelf --symbols output.


Co-Authored-By: Alan Modra <amodra@gmail.com>
Co-Authored-By: Michael Gschwind <mkg@us.ibm.com>

From-SVN: r204808
2013-11-14 18:50:48 +00:00
Ulrich Weigand 13e0981af5 linux-unwind.h (ppc_fallback_frame_state): Correct location of CR save area for 64-bit little-endian systems.
2013-11-14  Ulrich Weigand  <Ulrich.Weigand@de.ibm.com>
	    Alan Modra  <amodra@gmail.com>

	* config/rs6000/linux-unwind.h (ppc_fallback_frame_state): Correct
	location of CR save area for 64-bit little-endian systems.


Co-Authored-By: Alan Modra <amodra@gmail.com>

From-SVN: r204800
2013-11-14 18:25:33 +00:00
Rong Xu d6d3f03341 The patch re-factors libgcov.c to make it better modulelized.
2013-11-12  Rong Xu  <xur@google.com>

The patch re-factors libgcov.c to make it better modulelized.
It contains two pieces of work:
1. break gcov_exit() into the following structure:
   gcov_exit()
      --> gcov_exit_compute_summary()
      --> allocate_filename_struct()
          for gi_ptr in gcov_list
            --> gcov_exit_dump_gcov()
                   --> gcov_exit_open_gcda_file()
                   --> gcov_exit_merge_gcda ()
                   --> gcov_exit_merge_summary ()
                   --> gcov_exit_write_gcda ()
2. split libgcov.c into the following files:
     libgcov-profiler.c
     libgcov-merge.c
     libgcov-interface.c
     libgcov-driver.c
       libgcov-driver-system.c (source included into libgcov-driver.c)

	* libgcc/libgcov.c: Delete as part of re-factoring.
	* gcc/gcov-io.h (__gcov_indirect_call_profiler): Add the decl to
        avoid warning.
	* libgcc/libgcov-interface.c (init_mx): Moved from libgcov.c.
	(init_mx_once): Ditto.
	(__gcov_flush): Ditto.
	(__gcov_reset): Ditto.
	(__gcov_dump): Ditto.
	(__gcov_fork): Ditto.
	(__gcov_execl): Ditto.
	(__gcov_execlp): Ditto.
	(__gcov_execle): Ditto.
	(__gcov_execv): Ditto.
	(__gcov_execvp): Ditto.
	(__gcov_execve): Ditto.
        * libgcc/libgcov-merge.c (__gcov_merge_time_profile): Moved from
        libgcov.c.
	(__gcov_merge_add): Ditto.
	(__gcov_merge_ior): Ditto.
	(__gcov_merge_single): Ditto.
	(__gcov_merge_delta): Ditto.
	* libgcc/libgcov-profiler.c 
	(__gcov_interval_profiler): Ditto.
	(__gcov_pow2_profiler): Ditto.
	(__gcov_one_value_profiler_body): Ditto.
	(__gcov_one_value_profiler): Ditto.
	(__gcov_indirect_call_profiler): Ditto.
	(__gcov_indirect_call_profiler_v2): Ditto.
	(__gcov_time_profiler): Ditto.
	(__gcov_average_profiler): Ditto.
	(__gcov_ior_profiler): Ditto.
	* libgcc/libgcov-driver.c (set_gcov_list): New.
	(get_gcov_dump_complete): Ditto.
	(set_gcov_dump_complete):Ditto.
	(reset_gcov_dump_complete):Ditto.
	(gcov_exit_compute_summary): New function split from gcov_exit().
	(gcov_exit_merge_gcda): Ditto.
	(gcov_exit_write_gcda): Ditto.
	(gcov_exit_merge_summary): Ditto.
	(gcov_exit_dump_gcov): Ditto.
	(struct gcov_fn_buffer): Moved from libgcov.c
	(struct gcov_summary_buffer): Ditto.
	(free_fn_data): Ditto.
	(buffer_fn_data): Ditto.
	(crc32_unsigned): Ditto.
	(gcov_version): Ditto.
	(gcov_histogram_insert): Ditto.
	(gcov_compute_histogram): Ditto.
	(gcov_exit): Ditto.
	(gcov_clear): Ditto.
	(__gcov_init): Ditto.
        (this_prg): Make it file scope static variable.
        (all_prg): Ditto.
        (crc32): Ditto.
        (gi_filename): Ditto.
        (fn_buffer): Ditto.
        (sum_buffer): Ditto.
        (struct gcov_filename_aux): New types to store auxiliary information
        for gi_filename.
	* libgcc/libgcov-driver-system.c (gcov_error): New utility function.
	(allocate_filename_struct): New function split from gcov_exit().
	(gcov_exit_open_gcda_file): Ditto.
	(create_file_directory): Moved from libgcov.c
	* libgcc/Makefile.in: Change to build newly added files.

From-SVN: r204730
2013-11-13 00:24:49 +00:00
Martin Liska 86ce5d2fc1 Time profiler introduced.
Co-Authored-By: Jan Hubicka <jh@suse.cz>

From-SVN: r204690
2013-11-11 23:21:02 +00:00
Eric Botcazou 1a80085d42 config.host (arm-wrs-vxworks): Replace arm/t-vxworks with arm/t-elf in tmake_file.
* config.host (arm-wrs-vxworks): Replace arm/t-vxworks with arm/t-elf
	in tmake_file.
	* config/arm/t-vxworks: Delete.

From-SVN: r204669
2013-11-11 11:46:17 +00:00
Kai Tietz cabeea52a7 cygming-crtbegin.c (__gcc_register_frame): Increment load-count on use of LIBGCC_SONAME DLL.
2013-11-10  Kai Tietz  <ktietz@redhat.com>

	* config/i386/cygming-crtbegin.c (__gcc_register_frame):
	Increment load-count on use of LIBGCC_SONAME DLL.
	(hmod_libgcc): New static variable to hold handle of
	LIBGCC_SONAME DLL.
	(__gcc_deregister_frame): Decrement load-count of
	LIBGCC_SONAME DLL.

From-SVN: r204635
2013-11-10 12:47:18 +01:00
Bernhard Reutner-Fischer ac088ba1f0 libgcc: check for fenv.h in dfp configure check
uClibc can be built without fenv support, extend the configure check for
decimal floating point to probe the existance of fenv.h, too.

libgcc/ChangeLog:

2013-03-24  Bernhard Reutner-Fischer  <aldot@gcc.gnu.org>

	* configure.ac (libgcc_cv_dfp): Extend check to probe fenv.h
	availability.
	* configure: Regenerate

From-SVN: r204562
2013-11-08 11:18:27 +01:00
Uros Bizjak 9de84e84f2 sfp-exceptions.c (__sfp_handle_exceptions): Rewrite FP_EX_INEXACT handling.
* config/i386/sfp-exceptions.c (__sfp_handle_exceptions): Rewrite
	FP_EX_INEXACT handling.

From-SVN: r204546
2013-11-07 22:53:54 +01:00
Uros Bizjak d59a8fcce6 sfp-exceptions.c (__sfp_handle_exceptions): Handle FP_EX_DENORM.
* config/i386/sfp-exceptions.c (__sfp_handle_exceptions): Handle
	FP_EX_DENORM.  Store result to volatile location after SSE division
	to close interrupt window.  Remove unneeded fwait after x87
	division since interrupt window will be closed by emitted fstp.

From-SVN: r204540
2013-11-07 20:45:28 +01:00
Joseph Myers 9954c743b9 float128-cmp-invalid.c, [...]: New tests.
gcc/testsuite:
	* gcc.dg/torture/float128-cmp-invalid.c,
	gcc.dg/torture/float128-div-underflow.c,
	gcc.dg/torture/float128-extend-nan.c,
	gcc.dg/torture/fp-int-convert-float128-timode-3.c: New tests.

libgcc:
	* soft-fp/README: Update.
	* 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: r204489
2013-11-06 22:46:39 +00:00
Uros Bizjak 02ac9503fd i386-c.c (ix86_target_macros): Define _SOFT_FLOAT for !TARGET_80387.
gcc/

	* config/i386/i386-c.c (ix86_target_macros): Define _SOFT_FLOAT
	for !TARGET_80387.
	* config/i386/rtemself.h (TARGET_OS_CPP_BUILTINS): Do not define
	_SOFT_FLOAT here.
	(LONG_DOUBLE_TYPE_SIZE): New define.
	(LIBGCC2_LONG_DOUBLE_TYPE_SIZE): Ditto.

libgcc/

	* config/i386/32/sfp-machine.h (_FP_MUL_MEAT_S): Define.
	(_FP_MUL_MEAT_D): Ditto.
	(_FP_DIV_MEAT_S): Ditto.
	(_FP_DIV_MEAT_D): Ditto.
	* config.host (i[34567]86-*-rtems*): Remove i386/t-softfp, add
	t-softfp-sfdf and t-softfp to tmake_file.

M    gcc/config/i386/i386-c.c
M    gcc/config/i386/rtemself.h
M    gcc/ChangeLog
M    libgcc/ChangeLog
M    libgcc/config.host
M    libgcc/config/i386/32/sfp-machine.h

From-SVN: r204404
2013-11-05 17:08:30 +01:00
Uros Bizjak 612211412c crtfastmath.c: Compile only for !_SOFT_FLOAT.
* config/i386/crtfastmath.c: Compile only for !_SOFT_FLOAT.
	* config/i386/crtprec.c: Ditto.

From-SVN: r204327
2013-11-03 11:12:12 +01:00
Chung-Ju Wu 9304f87611 Add new nds32 port, including machine description, libgcc, and documentation.
[gcc/ChangeLog]
	* config.gcc (nds32*-*-*): Add nds32 target.
	* config/nds32/nds32.c: New file.
	* config/nds32/nds32.h: New file.
	* config/nds32/nds32.md: New file.
	* config/nds32/constants.md: New file.
	* config/nds32/constraints.md: New file.
	* config/nds32/iterators.md: New file.
	* config/nds32/nds32-doubleword.md: New file.
	* config/nds32/nds32-intrinsic.md: New file.
	* config/nds32/nds32_intrinsic.h: New file.
	* config/nds32/nds32-modes.def: New file.
	* config/nds32/nds32-multiple.md: New file.
	* config/nds32/nds32.opt: New file.
	* config/nds32/nds32-opts.h: New file.
	* config/nds32/nds32-protos.h: New file.
	* config/nds32/nds32-peephole2.md: New file.
	* config/nds32/pipelines.md: New file.
	* config/nds32/predicates.md: New file.
	* config/nds32/t-mlibs: New file.
	* common/config/nds32: New directory and files.

	* doc/invoke.texi (NDS32 options): Document nds32 specific options.
	* doc/md.texi (NDS32 family): Document nds32 specific constraints.
	* doc/install.texi (Cross-Compiler-Specific Options): Document
	--with-nds32-lib for nds32 target.
	* doc/extend.texi (Function Attributes, Target Builtins): Document
	nds32 specific attributes.
	
[libgcc/ChangeLog]
	* config.host (nds32*-elf*): Add nds32 target.
	* config/nds32 : New directory and files.
	
[contrib/ChangeLog]
	* config-list.mk (nds32le-elf, nds32be-elf): Add nds32 target.

Co-Authored-By: Shiva Chen <shiva0217@gmail.com>

From-SVN: r204269
2013-10-31 17:08:16 +00:00
Gerald Pfeifer ecdbd01aa1 Fix up ChangeLog entries (name, e-mail, formatting, otherwise).
From-SVN: r203992
2013-10-23 21:30:54 +00:00
Hans-Peter Nilsson 0e499e759c For CRIS ports, switch to soft-fp. Improve arit.c and longlong.h.
* config.host (cpu_type) <Setting default>: Add entry for
	crisv32-*-*.
	(tmake_file) <crisv32-*-elf, cris-*-elf, cris-*-linux*>
	<crisv32-*-linux*>: Adjust.
	* longlong.h: Wrap the whole CRIS section in a single
	defined(__CRIS__) conditional.  Add comment about add_ssaaaa
	and sub_ddmmss.
	(COUNT_LEADING_ZEROS_0): Define when count_leading_zeros is
	defined.
	[__CRIS__] (__umulsidi3): Define.
	[__CRIS__] (umul_ppmm): Define in terms of __umulsidi3.
	* config/cris/sfp-machine.h: New file.
	* config/cris/umulsidi3.S: New file.
	* config/cris/t-elfmulti (LIB2ADD_ST): Add umulsidi3.S.
	* config/cris/arit.c (SIGNMULT): New macro.
	(__Div, __Mod): Use SIGNMULT instead of naked multiplication.
	* config/cris/mulsi3.S: Tweak to avoid redundant register-copying;
	saving 3 out of originally 33 cycles from the fastest
	path, 3 out of 54 from the medium path and one from the longest
	path.  Improve comments.

From-SVN: r203640
2013-10-16 01:43:14 +00:00
Richard Sandiford 1602204161 tree-tailcall.c (find_tail_calls): Don't use tail-call recursion for built-in functions.
gcc/
2013-10-15  Richard Biener  <rguenther@suse.de>

	* tree-tailcall.c (find_tail_calls): Don't use tail-call recursion
	for built-in functions.

gcc/testsuite/
	* gcc.dg/torture/builtin-self.c: New file.

libgcc/
	* sync.c: Remove static aliases and define each function directly
	under its real name.

From-SVN: r203628
2013-10-15 18:24:30 +00:00
John David Anglin 6977865936 config.host (hppa*64*-*-linux*): Define extra_parts.
* config.host (hppa*64*-*-linux*): Define extra_parts.
	(hppa*-*-linux*): Likewise.

From-SVN: r203151
2013-10-03 01:11:41 +00:00
Joern Rennecke 2deaf8b0d6 In accordance with http://gcc.gnu.org/ml/gcc-patches/2013-10/msg00131.html :
gcc:
        * config/arc/arc-opts.h: Add 2013 to Copyright years.
        * config/arc/arc700.md: Likewise.
        * config/arc/arc-modes.def: Likewise.
        * config/arc/arc-simd.h: Likewise.
        * config/arc/t-arc-uClibc: Likewise.
        * config/arc/t-arc-newlib: Likewise.
libgcc:
        * config/arc/crtgend.S: Add 2013 to Copyright years.
        * config/arc/gmon/atomic.h: Likewise. 
        * config/arc/gmon/auxreg.h: Likewise. 
        * config/arc/gmon/sys/gmon_out.h: Likewise. 
        * config/arc/gmon/sys/gmon.h: Likewise. 
        * config/arc/gmon/prof-freq.c: Likewise. 
        * config/arc/gmon/mcount.c: Likewise. 
        * config/arc/gmon/prof-freq-stub.S: Likewise. 
        * config/arc/gmon/gmon.c: Likewise. 
        * config/arc/gmon/machine-gmon.h: Likewise. 
        * config/arc/gmon/profil.S: Likewise. 
        * config/arc/gmon/dcache_linesz.S: Likewise. 
        * config/arc/crtg.S: Likewise. 
        * config/arc/ieee-754/arc600-mul64/divsf3.S: Likewise. 
        * config/arc/ieee-754/arc600-mul64/divdf3.S: Likewise. 
        * config/arc/ieee-754/adddf3.S: Likewise. 
        * config/arc/ieee-754/truncdfsf2.S: Likewise. 
        * config/arc/ieee-754/fixsfsi.S: Likewise. 
        * config/arc/ieee-754/gtsf2.S: Likewise. 
        * config/arc/ieee-754/floatsisf.S: Likewise. 
        * config/arc/ieee-754/arc600-dsp/divsf3.S: Likewise. 
        * config/arc/ieee-754/arc600-dsp/divdf3.S: Likewise. 
        * config/arc/ieee-754/arc600-dsp/mulsf3.S: Likewise. 
        * config/arc/ieee-754/fixdfsi.S: Likewise. 
        * config/arc/ieee-754/addsf3.S: Likewise. 
        * config/arc/ieee-754/gesf2.S: Likewise. 
        * config/arc/ieee-754/floatsidf.S: Likewise. 
        * config/arc/ieee-754/extendsfdf2.S: Likewise. 
        * config/arc/ieee-754/divtab-arc-df.c: Likewise. 
        * config/arc/ieee-754/gtdf2.S: Likewise. 
        * config/arc/ieee-754/fixunsdfsi.S: Likewise. 
        * config/arc/ieee-754/uneqdf2.S: Likewise. 
        * config/arc/ieee-754/divsf3-stdmul.S: Likewise. 
        * config/arc/ieee-754/uneqsf2.S: Likewise. 
        * config/arc/ieee-754/arc-ieee-754.h: Likewise. 
        * config/arc/ieee-754/divtab-arc-sf.c: Likewise. 
        * config/arc/ieee-754/eqdf2.S: Likewise. 
        * config/arc/ieee-754/ordsf2.S: Likewise. 
        * config/arc/ieee-754/divsf3.S: Likewise. 
        * config/arc/ieee-754/divdf3.S: Likewise. 
        * config/arc/ieee-754/floatunsidf.S: Likewise. 
        * config/arc/ieee-754/orddf2.S: Likewise. 
        * config/arc/ieee-754/eqsf2.S: Likewise. 
        * config/arc/ieee-754/gedf2.S: Likewise. 
        * config/arc/crtn.S: Likewise. 
        * config/arc/crti.S: Likewise. 
        * config/arc/t-arc700-uClibc: Likewise. 
        * config/arc/asm.h: Likewise. 
        * config/arc/libgcc-excl.ver: Likewise. 
        * config/arc/t-arc-newlib: Likewise. 
        * config/arc/divtab-arc700.c: Likewise. 
        * config/arc/initfini.c: Likewise. 
        * config/arc/fp-hack.h: Likewise.

From-SVN: r203110
2013-10-02 12:18:24 +01:00
Joern Rennecke dd9480ef3e simdext.md: Update copyright years.
gcc:
        * config/arc/simdext.md: Update copyright years.
libgcc:
        * config/arc/ieee-754/arc600-dsp/muldf3.S: Update copyright years
        * config/arc/ieee-754/arc600-mul64/muldf3.S: Likewise.
        * config/arc/ieee-754/muldf3.S: Likewise.

From-SVN: r203094
2013-10-01 23:34:07 +01:00
Joern Rennecke a07c5b47b7 muldf3.S (.Linf_denorm): Likewise.
* config/arc/ieee-754/arc600-dsp/muldf3.S (.Linf_denorm): Likewise.
        * config/arc/ieee-754/arc600-mul64/muldf3.S (.Linf_denorm): Likewise.
        * config/arc/ieee-754/muldf3.S (.Linf_denorm): Likewise.

Co-Authored-By: Diego Novillo <dnovillo@google.com>

From-SVN: r203083
2013-10-01 20:44:23 +01:00
Joern Rennecke c8e318b042 mcount.c (_MCOUNT_DECL): Comment typo fix.
2013-10-01  Joern Rennecke  <joern.rennecke@embecosm.com>
            Diego Novillo  <dnovillo@google.com>

        * config/arc/gmon/mcount.c (_MCOUNT_DECL): Comment typo fix.

Co-Authored-By: Diego Novillo <dnovillo@google.com>

From-SVN: r203081
2013-10-01 20:21:40 +01:00
Joern Rennecke d38a64b4e0 config.host (arc*-*-elf*, [...]): New configurations.
2013-10-01  Joern Rennecke  <joern.rennecke@embecosm.com>
            Brendan Kehoe  <brendan@zen.org>
            Simon Cook  <simon.cook@embecosm.com>

        * config.host (arc*-*-elf*, arc*-*-linux-uclibc*): New configurations.
        * config/arc: New directory.
        * longlong.h [__arc__] (umul_ppmm): Remove.
        [__arc__] (__umulsidi3): Define.
        [__arc__ && __ARC_NORM__] (count_leading_zeroes): Define.
        [__arc__ && __ARC_NORM__] (COUNT_LEADING_ZEROS_0): Likewise.

Co-Authored-By: Brendan Kehoe <brendan@zen.org>
Co-Authored-By: Simon Cook <simon.cook@embecosm.com>

From-SVN: r203073
2013-10-01 18:12:59 +01:00
Jacek Caban dff717d29b gthr-win32.c: CreateSemaphoreW instead of CreateSemaphoreA.
2013-09-17  Jacek Caban  <jacek@codeweavers.com>

	* config/i386/gthr-win32.c: CreateSemaphoreW instead of
	CreateSemaphoreA.
	* config/i386/gthr-win32.h: Likewise.

From-SVN: r202648
2013-09-17 13:46:47 +02:00
DJ Delorie 844ad6c640 * config/rl78/vregs.h: Add G10 register definitions.
From-SVN: r202638
2013-09-16 17:58:05 -04:00
DJ Delorie 5c0029ded7 rl78.c (rl78_asm_file_start): Specify alternate vregs location for RL78/G10.
* config/rl78/rl78.c (rl78_asm_file_start): Specify alternate
vregs location for RL78/G10.
(rl78_expand_prologue): Avoid SEL on G10.
(rl78_expand_epilogue): Likewise.
(rl78_peep_movhi_p): Can't move a constant to memory in HImode.
* config/rl78/rl78.h (TARGET_CPU_CPP_BUILTINS): Define
__RL78_G10__ when appropriate.
(ASM_SPEC): Pass -mg10 along to the assembler.
* config/rl78/rl78.md (sel_rb): Disable for G10.
* config/rl78/rl78.opt: Add -mg10 option.
* config/rl78/t-rl78: Add -mg10 multilib.

* config/rl78/lib2mul.c: Enable for RL78/G10.
* config/rl78/lib2div.c: Likewise.
* config/rl78/lshrsi3.S: Use vregs.h.
* config/rl78/cmpsi2.S: Likewise.
* config/rl78/trampoline.S: Likewise.
* config/rl78/mulsi2.S: Likewise.  Disable for RL78/G10.

From-SVN: r202637
2013-09-16 17:15:46 -04:00
DJ Delorie ceb2fc49ce mulsi3.S: Remove a few unneeded moves and branches.
* config/rl78/mulsi3.S: Remove a few unneeded moves and branches.
* config/rl78/vregs.h: New.
* config/rl78/signbit.S: New file.  Implements signbit function.
* config/rl78/divmodsi.S: New.
* config/rl78/divmodhi.S: New.
* config/rl78/divmodqi.S: New.
* config/rl78/t-rl78: Build them here...
* config/rl78/lib2div.c: ...but not here.

Co-Authored-By: Nick Clifton <nickc@redhat.com>

From-SVN: r202588
2013-09-14 02:13:18 -04:00
DJ Delorie f6a83b4a9f MAINTAINERS: Add Nick Clifton and DJ Delorie as msp430 maintainers.
* MAINTAINERS: Add Nick Clifton and DJ Delorie as msp430
maintainers.

[gcc]
* config/msp430/: New port.
* config.gcc (msp430): Added.
* doc/invoke.texi: Document MSP430 options.
* doc/install.texi: Document msp430-elf
* doc/md.texi: Document msp430-elf
* doc/contrib.texi: Document msp430-elf

[libgcc]
* config.host (msp*-*-elf): New.
* config/msp430/: New port.

[contrib]
* config-list.mk: Add msp430-elf.

From-SVN: r202535
2013-09-12 13:52:41 -04:00
Iain Sandoe 9107b096ce re PR gcov-profile/58127 (37 failures in gcc.dg/tree-prof/ for x86_64-apple-darwin10)
libgcc:

	PR gcov-profile/58127
	* libgcov.c (__gcov_indirect_call_callee): Don't make this a
	__thread var for emulated TLS.
	(__gcov_indirect_call_counters): Likewise.

From-SVN: r201829
2013-08-18 15:50:17 +00:00
Maciej W. Rozycki 0f9bde1fac mips16.S (CE_STARTFN, CE_ENDFN): New macros.
* config/mips/mips16.S (CE_STARTFN, CE_ENDFN): New macros.
	(RET_FUNCTION): Use them in place of STARTFN and ENDFN.
	(CALL_STUB_NO_RET): Likewise.
	(CALL_STUB_RET): Likewise.
	* config/mips/libgcc-mips16.ver: Remove __mips16_call_stub and
	__mips16_ret call/return stub symbols.
	* config.host <mips*-*-linux>: For non-R5900 add t-slibgcc-libgcc
	to tmake_file.

Co-Authored-By: Catherine Moore <clm@codesourcery.com>
Co-Authored-By: Richard Sandiford <rdsandiford@googlemail.com>

From-SVN: r201805
2013-08-16 22:23:29 +00:00
Maciej W. Rozycki 2dc14aac5b * config.host <mips*-*-linux*>: Remove a stray comment.
From-SVN: r201689
2013-08-13 14:26:49 +00:00
Jan Hubicka 748d71f394 Workaround binutils PR14342
Workaround binutils PR14342
	* tree-profile.c (init_ic_make_global_vars): Add LTO path.
	(gimple_init_edge_profiler): Likewise.
	(gimple_gen_ic_func_profiler): Likewise.

	* Makefile.in: Add _gcov_indirect_call_profiler_v2 symbol.
	* libgcov.c (L_gcov_indirect_call_profiler): Restore original API.
	(L_gcov_indirect_call_profiler_v2): New.

From-SVN: r201648
2013-08-10 20:52:06 +00:00
Jan Hubicka 2fa3d31bd6 cgraph.h (cgraph_node): Add profile_id.
* cgraph.h (cgraph_node): Add profile_id.
	* value-prof.c (cgraph_node_map): Turn into pointer_map.
	(init_node_map): Rewrite to handle hashes increas of incremental
	IDs.
	(del_node_map): Update.
	(find_func_by_funcdef_no): Replace by ...
	(find_func_by_profile_id): ... this one.
	(gimple_ic_transform): Do not remove useful histograms when
	speculation is not done; dump info when indirect call removal
	can happen at LTO.
	* value-prof.h (find_func_by_profile_id, gimple_ic): Declare.
	* gcov-io.h (__gcov_indirect_call_profiler): Replace by ...
	(__gcov_indirect_call_profiler_v2): .. this one.
	* profile.h (init_node_map): Update.
	* coverage.c (coverage_compute_profile_id): New function.
	* coverage.h (coverage_compute_profile_id): Declare.
	* tree-profile.c (init_ic_make_global_vars): Make
	__gcov_indirect_call_callee and  __gcov_indirect_call_counters global.
	(gimple_init_edge_profiler): Update prototype of
	__gcov_indirect_call_profiler.
	(gimple_gen_ic_func_profiler): Simplify.
	(tree_profiling): Use init_node_map

From-SVN: r201634
2013-08-09 18:23:23 +00:00
Caroline Tice d0595b65c9 Fix ChangeLog formatting errors.
From-SVN: r201606
2013-08-08 09:55:09 -07:00
Caroline Tice 2077db1be5 Commit the vtable verification feature.
Commit the vtable verification feature.  This feature is designed to
detect, at run time, if/when the vtable pointer in a C++ object has
been corrupted, before allowing virtual calls through that pointer. 
If pointer corruption is detected, execution of the program is halted.

libstdc++-v3 ChangeLog:
2013-08-06  Caroline Tice  <cmtice@google.com>

        * fragment.am: Add XTEMPLATE_FLAGS.
        * configure.ac: Add definitions for --enable-vtable-verify.
        * acinclude.m4:  Add --enable-vtable-verify and
        --disable-vtable-verify; define --enable-vtable-verify; define
        VTV_CXXFLAGS, VTV_PCH_CXXFLAGS and VTV_CXXLINKFLAGS.
        * config/abi/pre/gnu.ver: Export symbols for vtable verification.
        * libsupc++/Makefile.am: Define vtv_sources and add it to
        libsupc___la_SOURCES and libsupc__convenience_la_SOURCES.
        * libsupc++/vtv_stubs.cc: New file.
        * include/Makefile.am: Add VTV_PCH_CXXFLAGS to PCHFLAGS.
        * src/Makefile.am: Add VTV_CXXFLAGS to AM_CXXFLAGS; add
        VTV_CXXLINKFLAGS to CXXLINK.
        * src/c++98/Makefile.am: Comment out XTEMPLATE_FLAGS; add VTV_CXXFLAGS
        to AM_CXXFLAGS; add VTV_CXXXLINKFLAGS to CXXLINK.
        * src/C++11/Makefile.am: Ditto.
        * doc/xml/manual/configure.xml: Add entry for --enable-vtable-verify.
        * scripts/testsuite_flags.in: Add cxxvtvflags to Usage; cause
        cxxvtvflags to use VTV_CXXFLAGS and VTV_CXXLINKFLAGS.
        * testsuite/lib/libstdc++.exp: Add cxxvtvflags; add code to locate
        libvtv if --enable-vtable-verify was used; set cxxvtvflags; add
        cxxvtvflags to cxx_final.
        * testsuite/18_support/bad_exception/23591_thread-1.c: Add
        -fvtable-verify=none to compiler flags.
        * testsuite/17_intro/freestanding.cc: Add -fvtable-verify=none
        to compiler flags.
        * configure: Regenerated.
        * Makefile.in: Regenerated.
        * python/Makefile.in: Regenerated.
        * include/Makefile.in: Regenerated.
        * libsupc++/Makefile.in: Regenerated.
        * config.h.in: Regenerated.
        * po/Makefile.in: Regenerated.
        * src/Makefile.in: Regenerated.
        * src/c++98/Makefile.in: Regenerated.
        * src/c++11/Makefile.in: Regenerated.
        * doc/Makefile.in: Regenerated.
        * testsuite/Makefile.in: Regenerated.

top level ChangeLog:
2013-08-06  Caroline Tice  <cmtice@google.com>

        * configure.ac: Add target-libvtv to target_libraries; disable libvtv
        on non-linux systems; add target-libvtv to noconfigdirs; add
        libsupc++/.libs to C++ library search paths.
        * configure: Regenerated.
        * Makefile.def: Add libvtv to target_modules; make libvtv depend on
        libstdc++ and libgcc.
        * Makefile.in: Regenerated.

include/ChangeLog:
2013-08-06  Caroline Tice  <cmtice@google.com>

        * vtv-change-permission.h: New file.

contrib/ChangeLog:
2013-08-06  Caroline Tice4  <cmtice@google.com>

        * gcc_update: Add libvtv files.

libgcc/ChangeLog:
2013-08-06  Caroline Tice  <cmtice@google.com>

        config.host (extra_parts): Add vtv_start.o, vtv_end.o
        vtv_start_preinit.o and vtv_end_preinit.o.
        configure.ac: Add code to check/set enable_vtable_verify.
        Makefile.in: Add rules to build vtv_*.o, if enable_vtable_verify is
        true.
        vtv_start_preinit.c: New file.
        vtv_end_preinit.c: New file.
        vtv_start.c: New file.
        vtv_end.c: New file.
        configure: Regenerated.

gcc/ChangeLog:
2013-08-06  Caroline Tice  <cmtice@google.com>

        * gcc.c (VTABLE_VERIFICATION_SPEC): New definition.
        (LINK_COMMAND_SPEC): Add VTABLE_VERIFICATION_SPEC.
        * tree-pass.h: Add pass_vtable_verify.
        * varasm.c (assemble_variable): Add code to properly set the comdat
        section and name for the .vtable_map_vars section.
        (assemble_vtyv_preinit_initializer): New function.
        (default_sectin_type_flags):  Make sure .vtable_map_vars section has
        LINK_ONCE flag.
        * output.h: Add function decl for assemble_vtv_preinit_initializer.
        * vtable-verify.c: New file.
        * vtable-verify.h: New file.
        * flag-types.h (enum vtv_priority): Defintions for flag_vtable_verify
        initialiation levels.
        * timevar.def (TV_VTABLE_VERIFICATION): New definition.
        * passes.def: Insert pass_vtable_verify.
        * aclocal.m4: Reorder includes.
        * doc/invoke.texi: Add documentation for the flags -fvtable-verify=,
	-fvtv-debug and -fvtv-counts.
        * config/gnu-user.h (GNU_USER_TARGET_STARTFILE_SPEC): Add vtv_start*.o,
as appropriate, if -fvtable-verify=... is used.
        (GNU_USER_TARGET_ENDFILE_SPEC): Add vtv_end*.o as appropriate, if
        -fvtable-verify=... is used.
        * Makefile.in (OBJS):  Add vtable-verify.o to list.
        (vtable-verify.o): Add new build rule.
        (GTFILES): Add vtable-verify.c to list.
        * common.opt (fvtable-verify=): New flag.
        (vtv_priority): Values for fvtable-verify= flag.
        (fvtv-counts): New flag.
(fvtv-debug): New flag.
        * tree.h (save_vtable_map_decl): New extern function decl.


gcc/cp/ChangeLog:
2013-08-06  Caroline Tice  <cmtice@google.com>

        * Make-lang.in (*CXX_AND_OBJCXX_OBJS):  Add vtable-class-hierarchy.o to
        list.
        (vtable-class-hierarchy.o): Add build rule.
        * cp-tree.h (vtv_start_verification_constructor_init_function): New
        extern function decl.
        (vtv_finish_verification_constructor_init_function): New extern
        function decl.
        (build_vtbl_address): New extern function decl.
        (get_mangled_vtable_map_var_name): New extern function decl.
        (vtv_compute_class_hierarchy_transitive_closure): New extern function
        decl.
        (vtv_generate_init_routine): New extern function decl.
        (vtv_save_class_info): New extern function decl.
        (vtv_recover_class_info): New extern function decl.
        (vtv_build_vtable_verify_fndecl): New extern function decl.
        * class.c (finish_struct_1): Add call to vtv_save_class_info if
        flag_vtable_verify is true.
        * config-lang.in: Add vtable-class-hierarchy.c to gtfiles list.
        * vtable-class-hierarchy.c: New file.
        * mangle.c (get_mangled_vtable_map_var_name):  New function.
        * decl2.c (start_objects): Update function comment.
        (cp_write_global_declarations): Call vtv_recover_class_info,
        vtv_compute_class_hierarchy_transitive_closure and
        vtv_build_vtable_verify_fndecl, before calling
        finalize_compilation_unit, and call vtv_generate_init_rount after, IFF
        flag_vtable_verify is true.
        (vtv_start_verification_constructor_init_function): New function.
        (vtv_finish_verification_constructor_init_function): New function.
        * init.c (build_vtbl_address): Remove static qualifier from function.

libvtv/ChangeLog:
2013-08-06  Caroline Tice  <cmtice@google.com>

        Initial check-in of new vtable verification feature.
        * configure.ac : New file.
        * acinclude.m4 : New file.
        * Makefile.am : New file.
        * aclocal.m4 : New file.
        * configure.tgt : New file.
        * configure: New file (generated).
        * Makefile.in: New file (generated).
        * vtv_set.h : New file.
        * vtv_utils.cc : New file.
        * vtv_utils.h : New file.
        * vtv_malloc.cc : New file.
        * vtv_rts.cc : New file.
        * vtv_malloc.h : New file.
        * vtv_rts.h : New file.
        * vtv_fail.cc : New file.
        * vtv_fail.h : New file.
        * vtv_map.h : New file.
        * scripts/run-testsuite.sh : New file.
        * scripts/sum-vtv-counts.c : New file.
        * testsuite/parts-test-main.h : New file.
        * testusite/dataentry.cc : New file.
        * testsuite/temp_deriv.cc : New file.
        * testsuite/register_pair.cc : New file.
        * testsuite/virtual_inheritance.cc : New file.
        * testsuite/field-test.cc : New file.
        * testsuite/nested_vcall_test.cc : New file.
        * testsuite/template-list-iostream.cc : New file.
        * testsuite/register_pair_inserts.cc : New file.
        * testsuite/register_pair_inserts_mt.cc : New file.
        * testsuite/event.list : New file.
        * testsuite/parts-test-extra-parts-views.cc : New file.
        * testsuite/parts-test-extra-parts-views.h : New file.
        * testsuite/environment-fail-32.s : New file.
        * testsuite/parts-test-extra-parts.h : New file.
        * testsuite/temp_deriv2.cc : New file.
        * testsuite/dlopen_mt.cc : New file.
        * testsuite/event.h : New file.
        * testsuite/template-list.cc : New file.
        * testsuite/replace-fail.cc : New file.
        * testsuite/Makefile.am : New file.
        * testsuite/Makefile.in: New file (generated).
        * testsuite/mempool_negative.c : New file.
        * testsuite/parts-test-main.cc : New file.
        * testsuite/event-private.cc : New file.
        * testsuite/thunk.cc : New file.
        * testsuite/event-defintiions.cc : New file.
        * testsuite/event-private.h : New file.
        * testsuite/parts-test.list : New file.
        * testusite/register_pair_mt.cc : New file.
        * testsuite/povray-derived.cc : New file.
        * testsuite/event-main.cc : New file.
        * testsuite/environment.cc : New file.
        * testsuite/template-list2.cc : New file.
        * testsuite/thunk_vtable_map_attack.cc : New file.
        * testsuite/parts-test-extra-parts.cc : New file.
        * testsuite/environment-fail-64.s : New file.
        * testsuite/dlopen.cc : New file.
        * testsuite/so.cc : New file.
        * testsuite/temp_deriv3.cc : New file.
        * testsuite/const_vtable.cc : New file.
        * testsuite/mempool_positive.c : New file.
        * testsuite/dup_name.cc : New file.

From-SVN: r201555
2013-08-06 20:38:59 -07:00
Maxim Kuvyrkov 46549c206e Fix licenses on several libgcc files.
* config/aarch64/sfp-machine.h, config/aarch64/sync-cache.c,
	* config/i386/cpuinfo.c, config/ia64/unwind-ia64.h,
	* config/mips/vr4120-div.S: Fix license from GPL-3.0+ to
	GPL-3.0-with-GCC-exception.

From-SVN: r201417
2013-08-01 21:09:10 +00:00
Maciej W. Rozycki 72be589b8c mips16.S (DELAYf): Alias to DELAYt for the MIPS IV ISA and up.
* config/mips/mips16.S (DELAYf): Alias to DELAYt for the MIPS IV
	ISA and up.

From-SVN: r201350
2013-07-30 18:34:43 +00:00
Andreas Krebbel 902a3fafbe linux-unwind.h: Use the proper dwarf to hard reg mapping for FPRs when...
2013-07-23  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>

	* config/s390/linux-unwind.h: Use the proper dwarf to hard reg
	mapping for FPRs when creating the fallback framestate.

From-SVN: r201156
2013-07-23 07:20:52 +00:00
Georg-Johann Lay 0237179843 re PR target/57516 ([avr] Incorrect fixed-point rounding result in the overflow case)
gcc/
	PR target/57516
	* config/avr/avr-fixed.md (round<mode>3_const): Turn expander to insn.
	* config/avr/avr.md (adjust_len): Add `round'.
	* config/avr/avr-protos.h (avr_out_round): New prototype.
	(avr_out_plus): Add `out_label' argument.
	* config/avr/avr.c (avr_out_plus_1): Add `out_label' argument.
	(avr_out_plus): Pass down `out_label' to avr_out_plus_1.
	Handle the case where `insn' is just a pattern.
	(avr_out_bitop): Handle the case where `insn' is just a pattern.
	(avr_out_round): New function.
	(avr_adjust_insn_length): Handle ADJUST_LEN_ROUND.

libgcc/
	PR target/57516
	* config/avr/lib1funcs-fixed.S (__roundqq3, __rounduqq3)
	(__round_s2_const, __round_u2_const)
	(__round_s4_const, __round_u4_const, __round_x8):
	Saturate result if addition result cannot be represented.

gcc/testsuite/
	PR target/57516
	* gcc.target/avr/torture/builtins-4-roundfx.c (test2hr, test2k):
	Adjust to corrected rounding.

From-SVN: r201051
2013-07-19 11:10:08 +00:00
Matthias Klose ab0e837971 libgcc2.c: Don't include <limits.h>.
2013-07-15  Matthias Klose  <doko@ubuntu.com>

        * libgcc2.c: Don't include <limits.h>.

From-SVN: r200963
2013-07-15 18:33:06 +00:00
Janis Johnson 7da3805802 * config.host (powerpc-*-eabispe*): Add t-fdpbit to tmake_file.
From-SVN: r200846
2013-07-09 21:31:09 +00:00
Jakub Jelinek 1f6eac9041 re PR target/29776 (result of ffs/clz/ctz/popcount/parity are already sign-extended)
PR target/29776
	* fold-const.c (tree_call_nonnegative_warnv_p): Return true
	for BUILT_IN_C{LZ,LRSB}*.
	* tree.h (CASE_INT_FN): Add FN##IMAX case.
	* tree-vrp.c (extract_range_basic): Handle
	BUILT_IN_{FFS,PARITY,POPCOUNT,C{LZ,TZ,LRSB}}*.  For
	BUILT_IN_CONSTANT_P if argument isn't (D) of PARM_DECL,
	fall thru to code calling set_value*.
	* builtins.c (expand_builtin): Remove *IMAX cases.
	(fold_builtin_bitop): For BUILT_IN_CLRSB* return NULL_TREE
	if width is bigger than 2*HWI.

	* libgcc2.c (__floattisf): Avoid undefined signed overflow.

	* gcc.dg/tree-ssa/vrp89.c: New test.

From-SVN: r200731
2013-07-06 11:34:17 +02:00
Jakub Jelinek 4ea3d77451 re PR middle-end/36041 (Speed up builtin_popcountll)
PR middle-end/36041
	* libgcc2.c (POPCOUNTCST2, POPCOUNTCST4, POPCOUNTCST8, POPCOUNTCST):
	Define.
	(__popcountSI2): For __SIZEOF_INT__ > 2 targets use arithmetics
	instead of table lookups.
	(__popcountDI2): Likewise.

From-SVN: r200506
2013-06-28 11:28:40 +02:00
Chung-Ju Wu 9d2cdf2500 Makefile.in (clean, distclean): Remove auto-target.h and stamp-h correctly.
libgcc/
2013-06-25  Chung-Ju Wu  <jasonwucj@gmail.com>

        * Makefile.in (clean, distclean): Remove auto-target.h and stamp-h
        correctly.

From-SVN: r200390
2013-06-25 08:02:11 +00:00
Joseph Myers fa1e55b0a0 re PR other/53317 (Conversion from __int128 to __float128)
PR other/53317

gcc/testsuite:
	* gcc.dg/torture/fp-int-convert-float128-timode-2.c: New test.

libgcc:
	* 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/fixdfdi.c: Likewise.
	* soft-fp/fixdfsi.c: Likewise.
	* soft-fp/fixsfdi.c: Likewise.
	* soft-fp/fixsfsi.c: Likewise.
	* soft-fp/fixtfdi.c: Likewise.
	* soft-fp/fixtfsi.c: Likewise.
	* soft-fp/fixunsdfdi.c: Likewise.
	* soft-fp/fixunsdfsi.c: Likewise.
	* soft-fp/fixunssfdi.c: Likewise.
	* soft-fp/fixunssfsi.c: Likewise.
	* soft-fp/fixunstfdi.c: Likewise.
	* soft-fp/fixunstfsi.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/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/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/unorddf2.c: Likewise.
	* soft-fp/unordsf2.c: Likewise.
	* soft-fp/unordtf2.c: Likewise.
	* config/aarch64/sfp-machine.h (_FP_QNANNEGATEDP): Define to 0.
	* config/arm/sfp-machine.h (_FP_QNANNEGATEDP): Likewise.
	* config/c6x/sfp-machine.h (_FP_QNANNEGATEDP): Likewise.
	* config/i386/sfp-machine.h (_FP_QNANNEGATEDP): Likewise.
	* config/ia64/sfp-machine.h (_FP_QNANNEGATEDP): Likewise.
	* config/lm32/sfp-machine.h (_FP_QNANNEGATEDP): Likewise.
	* config/moxie/sfp-machine.h (_FP_QNANNEGATEDP): Likewise.
	* config/rs6000/sfp-machine.h (_FP_QNANNEGATEDP): Likewise.
	* config/score/sfp-machine.h (_FP_QNANNEGATEDP): Likewise.
	* config/tilegx/sfp-machine32.h (_FP_QNANNEGATEDP): Likewise.
	* config/tilegx/sfp-machine64.h (_FP_QNANNEGATEDP): Likewise.
	* config/tilepro/sfp-machine.h (_FP_QNANNEGATEDP): Likewise.

From-SVN: r200318
2013-06-21 20:08:01 +01:00
Jürgen Urban 0de86a9228 mips.h (ISA_HAS_MUL3): Include TARGET_MIPS5900.
gcc/
2013-06-16  Jürgen Urban  <JuergenUrban@gmx.de>

	* config/mips/mips.h (ISA_HAS_MUL3): Include TARGET_MIPS5900.
	(ISA_HAS_MULT, ISA_HAS_DMULT, ISA_HAS_DIV, ISA_HAS_DDIV): New macros.
	* config/mips/mips.md (mul<mode>3, mul<mode>3_internal)
	(mul<mode>3_r4000): Require ISA_HAS_<D>MULT.
	(mul<mode>3_mul3): Handle TARGET_MIPS5900.
	(mulsidi3_64bit_dmul): Remove redundant TARGET_64BIT test.
	(<su>muldi3_highpart, <su>muldi3_highpart_internal, <u>mulditi3)
	(<u>mulditi3_internal, <u>mulditi3_r4000): Require ISA_HAS_DMULT
	instead of TARGET_64BIT.
	(divmod<mode>4, udivmod<mode>4, <u>divmod<GPR:mode>4_hilo_<HILO:mode>):
	Require ISA_HAS_<D>DIV.

libgcc/
2013-06-16  Jürgen Urban  <JuergenUrban@gmx.de>

	* config/mips/lib2funcs.c: New file.
	* config/mips/t-mips (LIB2ADD_ST): Add it.

From-SVN: r200140
2013-06-16 19:31:24 +00:00
Oleg Endo 0d00888247 re PR target/6526 ([SH4] sdivsi3_i4 can clobber xd0/xd2)
PR target/6526
	* config/sh/lib1funcs.S (sdivsi3_i4, udivsi3_i4): Do not change bits
	other than FPSCR.PR and FPSCR.SZ.  Add SH4A implementation.

	PR target/6526
	* gcc.target/sh/pr6526.c: New.

From-SVN: r199873
2013-06-09 21:32:37 +00:00
Walter Lee 776434d183 atomic.h: Don't include stdint.h or features.h.
* config/tilepro/atomic.h: Don't include stdint.h or features.h.
	Replace int64_t with long long.  Add __extension__ where
	appropriate.
	* config/tilepro/atomic.c: Include config.h.

From-SVN: r199855
2013-06-08 16:26:32 +00:00
Doug Rupp 6ab3ebb493 * config.host (arm-wrs-vxworks): Configure with other soft float.
From-SVN: r199747
2013-06-06 17:43:41 +00:00
Jürgen Urban 107eea2ca4 gcc/
2013-06-03  Jürgen Urban  <JuergenUrban@gmx.de>

	* config.gcc (mipsr5900-*-elf*, mipsr5900el-*-elf*, mips64r5900-*-elf*)
	(mips64r5900el-*-elf*): New configurations.
	* config/mips/mips-cpus.def (r5900): New processor.
	* config/mips/mips-tables.opt: Regenerate.
	* config/mips/mips.c (mips_rtx_cost_data): Add an R5900 entry.
	(mips_issue_rate): Handle PROCESSOR_R5900.
	(mips_reorg_process_insns): Force reorder mode for the R5900.
	* config/mips/mips.h (TARGET_MIPS5900): Define.
	(ISA_HAS_CONDMOVE, ISA_HAS_PREFETCH, ISA_HAS_HILO_INTERLOCKS): Include
	TARGET_MIPS5900.
	(ISA_HAS_LOAD_DELAY, ISA_HAS_XFER_DELAY, ISA_HAS_FCMP_DELAY): Exclude
	TARGET_MIPS5900.
	* config/mips/mips.md (processor): Add r5900.
	(MOVECC): Disallow CCmode conditions for TARGET_MIPS5900.

libgcc/
2013-06-03  Jürgen Urban  <JuergenUrban@gmx.de>

	* config.host (mipsr5900-*-elf*, mipsr5900el-*-elf*, mips64r5900-*-elf*)
	(mips64r5900el-*-elf*): New configurations.

From-SVN: r199666
2013-06-04 18:05:55 +00:00
Alan Modra 5cc19c6246 ibm-ldouble.c: Enable for little-endian.
* config/rs6000/ibm-ldouble.c: Enable for little-endian.

From-SVN: r199650
2013-06-04 23:41:28 +09:30
Yuri Rumyantsev 0f1d3965bd i386.c (ix86_lea_outperforms): Fix formatting.
* config/i386/i386.c (ix86_lea_outperforms): Fix formatting.
	(ix86_avoid_lea_for_addr): Likewise.
	(exact_dependency_1): Likewise.
	(ix86_adjust_cost): Likewise.
	(swap_top_of_ready_list): Fix formatting and !reload_completed check
	removed.
	(do_reorder_for_imul): Fix typo, formatting and
	!reload_completed check removed.
	(ix86_sched_reorder): Fix typo and formatting.
	(fold_builtin_cpu): Move M_INTEL_SLM at the end of processor types
	list.

	* config/i386/cpuinfo.c (INTEL_SLM): New enum value.

From-SVN: r199611
2013-06-03 19:20:02 +02:00
Yuri Rumyantsev 0b871ccfce Silvermont (SLM) architecture pipeline model, tuning and insn selection.
Silvermont (SLM) architecture pipeline model, tuning and
        insn selection.
        * config.gcc: Add slm config options and target.

        * config/i386/slm.md: New.

        * config/i386/driver-i386.c (host_detect_local_cpu): Check movbe.

        * gcc/config/i386/i386-c.c (ix86_target_macros_internal):  New case
        PROCESSOR_SLM.
        (ix86_target_macros_internal): Likewise.

        * gcc/config/i386/i386.c (slm_cost): New cost.
        (m_SLM): New macro flag.
        (initial_ix86_tune_features): Set m_SLM.
        (x86_accumulate_outgoing_args): Likewise.
        (x86_arch_always_fancy_math_387): Likewise.
        (processor_target_table): Add slm cost.
        (cpu_names): Add slm cpu name.
        (x86_option_override_internal): Set SLM ISA.
        (ix86_issue_rate): New case PROCESSOR_SLM.
        (ia32_multipass_dfa_lookahead): Likewise.
        (fold_builtin_cpu): Add slm.

        * config/i386/i386.h (TARGET_SLM): New target macro.
        (target_cpu_default): Add TARGET_CPU_DEFAULT_slm.
        (processor_type): Add PROCESSOR_SLM.

        * config/i386/i386.md (cpu): Add new value "slm".
        (slm.md): Include slm.md.

        * libgcc/config/i386/cpuinfo.c (INTEL_SLM): New enum value.


Co-Authored-By: Igor Zamyatin <igor.zamyatin@intel.com>

From-SVN: r199444
2013-05-30 10:10:21 +00:00
Eric Botcazou 0ba045df8f sol2-unwind.h (MD_FALLBACK_FRAME_STATE_FOR): Do not set fs->signal_frame for SIGFPE raised for IEEE-754 exceptions.
* config/sparc/sol2-unwind.h (MD_FALLBACK_FRAME_STATE_FOR): Do not set
	fs->signal_frame for SIGFPE raised for IEEE-754 exceptions.
	* config/i386/sol2-unwind.h (x86_fallback_frame_state): Likewise.

From-SVN: r199381
2013-05-28 13:52:50 +00:00
Eric Botcazou 49dcafd4ec config.host (powerpc-*-elf*): Add rs6000/t-savresfgpr to tmake_file.
* config.host (powerpc-*-elf*): Add rs6000/t-savresfgpr to tmake_file.
	(powerpc-wrs-vxworks): Likewise.

From-SVN: r199219
2013-05-22 20:44:16 +00:00
Eric Botcazou 4fcb5d87d4 sol2-unwind.h (sparc64_frob_update_context): Do it for signal frames as well.
* config/sparc/sol2-unwind.h (sparc64_frob_update_context): Do it for
	signal frames as well.
	(MD_FALLBACK_FRAME_STATE_FOR): Do minor cleanups throughout and add the
	STACK_BIAS to the CFA offset.

From-SVN: r199191
2013-05-22 10:39:03 +00:00
Richard Henderson 0ec3322408 re PR target/49146 (segv from libgcc_s when raising an exception, or unwinding stack with backtrace with ms_abi)
PR target/49146

	* unwind-dw2.c (UNWIND_COLUMN_IN_RANGE): New macro.
	(execute_cfa_program): Use it when storing to fs->regs.

From-SVN: r199019
2013-05-17 08:27:37 -07:00
Kai Tietz 492a80292b cygming-crtbegin.c (__register_frame_info): Make weak.
* config/i386/cygming-crtbegin.c (__register_frame_info): Make weak.
	(__deregister_frame_info): Likewise.

From-SVN: r198719
2013-05-08 20:33:52 +02:00
Thomas Schwinge e5123d087e fp-bit.c (unpack_d, pack_d): Properly preserve and restore a NaN's payload.
libgcc/
	* fp-bit.c (unpack_d, pack_d): Properly preserve and restore a
	NaN's payload.

From-SVN: r198622
2013-05-06 10:23:02 +02:00
Thomas Schwinge 701e2f0a76 fp-bit.h [FLOAT] (QUIET_NAN): Correct value.
libgcc/
	* fp-bit.h [FLOAT] (QUIET_NAN): Correct value.

From-SVN: r198621
2013-05-06 10:22:48 +02:00
Alan Modra b9a7eb5db3 config.host: Match little-endian powerpc-linux.
libgcc/
	* config.host: Match little-endian powerpc-linux.
gcc/
	* config.gcc: Support little-endian powerpc-linux targets.
	* config/rs6000/linux.h (LINK_OS_LINUX_EMUL): Define.
	(LINK_OS_LINUX_SPEC): Define.
	* config/rs6000/linuxspe.h (TARGET_DEFAULT):
	Preserve MASK_LITTLE_ENDIAN.
	* config/rs6000/default64.h (TARGET_DEFAULT): Likewise.
	* config/rs6000/linuxaltivec.h (TARGET_DEFAULT): Likewise.
	* config/rs6000/linux64.h (OPTION_LITTLE_ENDIAN): Don't zero.
	(LINK_OS_LINUX_EMUL32, LINK_OS_LINUX_EMUL64): Define.
	(LINK_OS_LINUX_SPEC32, LINK_OS_LINUX_SPEC64): Use above.
	* config/rs6000/rs6000.c (output_toc): Don't use .tc for TARGET_ELF.
	Correct fp word order for little-endian.  Don't shift toc entries
	smaller than a word for little-endian.
	* config/rs6000/rs6000.md (bswaphi2, bswapsi2 split): Comment.
	(bswapdi2 splits): Correct low-part subreg for little-endian.
	Remove wrong BYTES_BIG_ENDIAN tests, and rename vars to remove
	low/high where such is correct only for be.
	* config/rs6000/sysv4.h (SUBTARGET_OVERRIDE_OPTIONS): Allow
	little-endian for -mcall-aixdesc.

From-SVN: r198273
2013-04-25 10:27:16 +09:30
Yufeng Zhang dfe192f58f sfp-machine.h (_FP_W_TYPE): Change to define as 'unsigned long long' instead of 'unsigned long'.
libgcc/

	* config/aarch64/sfp-machine.h (_FP_W_TYPE): Change to define
	as 'unsigned long long' instead of 'unsigned long'.
	(_FP_WS_TYPE): Change to define as 'signed long long' instead of
	'signed long'.

From-SVN: r198090
2013-04-19 12:17:26 +00:00
Julian Brown b6b9af2f11 libgcc/
* config/arm/linux-atomic.c (SUBWORD_SYNC_OP, SUBWORD_VAL_CAS)
	(SUBWORD_TEST_AND_SET): Use signed char/short types instead of
	unsigned char/unsigned short.
	(__sync_val_compare_and_swap_{1,2}): Handle signed argument.

From-SVN: r197806
2013-04-11 14:22:54 +00:00
John David Anglin ecabdd0007 re PR other/55274 (gcc build hangs on HP-UX 11.11)
PR other/55274
	* config/t-slibgcc-hpux (SHLIB_MAPFILES): Define.

From-SVN: r197544
2013-04-06 18:22:09 +00:00
Meador Inge 3465257612 bpabi.S (aeabi_ldivmod): Add DWARF information for computing the location of the link register.
libgcc/

2013-04-04  Meador Inge  <meadori@codesourcery.com>

	* config/arm/bpabi.S (aeabi_ldivmod): Add DWARF information for
	computing the location of the link register.
	(aeabi_uldivmod): Ditto.

From-SVN: r197493
2013-04-04 18:42:19 +00:00
Kai Tietz e9fd8c190e config.host: Add support for cygwin x64 target.
2013-03-27  Kai Tietz  <ktietz@redhat.com>

	* config.host: Add support for cygwin x64 target.
	* configure: Regenerated.

From-SVN: r197176
2013-03-27 22:59:10 +01:00
Walter Lee a6406324ae t-crtstuff: Add -fno-asynchronous-unwind-tables -mcmodel=large to CRTSTUFF_T_CFLAGS_S variable.
* config/tilegx/t-crtstuff: Add -fno-asynchronous-unwind-tables
	-mcmodel=large to CRTSTUFF_T_CFLAGS_S variable.

From-SVN: r197083
2013-03-26 04:34:45 +00:00
Kai Tietz 55446c7e55 * config/i386/cygwin.S: Replace use of _WIN64 by __x86_64__.
From-SVN: r197050
2013-03-25 15:54:30 +01:00
Robert Mason d2ae19d976 2013-03-20 Robert Mason <rbmj@verizon.net>
* config/vxlib-tls.c (__gthread_get_tsd_data,)
	(__gthread_set_tsd_data, __gthread_enter_tsd_dtor_context,)
	(__gthread_leave_tsd_dtor_context): Add prototypes.
	(tls_delete_hook): Update.

From-SVN: r196842
2013-03-20 22:01:25 +00:00
Catherine Moore 22c4c86949 extend.texi: (micromips, nomicromips, nocompression): Document new function attributes.
gcc/
2013-03-20  Catherine Moore  <clm@codesourcery.com>
	    Maciej W. Rozycki  <macro@codesourcery.com>
	    Tom de Vries  <tom@codesourcery.com>
	    Nathan Sidwell <nathan@codesourcery.com>
	    Iain Sandoe  <iain@codesourcery.com>
	    Nathan Froyd  <froydnj@codesourcery.com>
	    Chao-ying Fu <fu@mips.com>

	* doc/extend.texi: (micromips, nomicromips, nocompression):
	Document new function attributes. 
	* doc/invoke.texi (minterlink-compressed, mmicromips,
	m14k, m14ke, m14kec): Document new options.
	(minterlink-mips16): Update documentation.
	* doc/md.texi (ZC, ZD): Document new constraints.
	* configure.ac (gcc_cv_as_micromips): Check if linker
	supports the .set micromips directive.
	* configure: Regenerate.
	* config.in: Regenerate.
	* config/mips/mips-tables.opt: Regenerate.
	* config/mips/micromips.md: New file.
	* constraints.md (ZC, ZD): New constraints.
	* config/mips/predicates.md (movep_src_register): New predicate.
	(movep_src_operand): New predicate.
	(non_volatile_mem_operand): New predicate.
	* config/mips/mips.md (multimem): New type.
	(length): Differentiate between 17-bit and 18-bit branch offsets.
	(MOVEP1, MOVEP2): New mode iterator.
 	(mov_<load>l): Use ZC constraint.
	(mov_<load>r): Likewise.
	(mov_<store>l): Likewise.
	(mov_<store>r): Likewise.
	(*branch_equality<mode>_inverted): Add microMIPS support.
	(*branch_equality<mode>): Likewise.
	(*jump_absolute): Likewise.
	(indirect_jump_<mode>): Likewise.
	(tablejump_<mode>): Likewise.
	(<optab>_internal): Likewise.
	(sibcall_internal): Likewise.
	(sibcall_value_internal): Likewise.
	(prefetch): Use constraint ZD.
	* config/mips/mips.opt (minterlink-compressed): New option.
	(minterlink-mips16): Now an alias for minterlink-compressed.
	(mmicromips): New option.
	* config/mips/sync.md (sync_compare_and_swap<mode>): Use ZR constraint.
	(compare_and_swap_12): Likewise.
	(sync_add<mode>): Likewise.
	(sync_<optab>_12): Likewise.
	(sync_old_<optab>_12): Likewise.
	(sync_new_<optab>_12): Likewise.
	(sync_nand_12): Likewise.
	(sync_old_nand_12): Likewise.
	(sync_new_nand_12): Likewise.
	(sync_sub<mode>): Likewise.
	(sync_old_add<mode>): Likewise.
	(sync_old_sub<mode>): Likewise.
	(sync_new_add<mode>): Likewise.
	(sync_new_sub<mode>): Likewise.
	(sync_<optab><mode>): Likewise.
	(sync_old_<optab><mode>): Likewise.
	(sync_new_<optab><mode>): Likewise.
	(sync_nand<mode>): Likewise.
	(sync_old_nand<mode>): Likewise.
	(sync_new_nand<mode>): Likewise.
	(sync_lock_test_and_set<mode>): Likewise.
	(test_and_set_12): Likewise.
	(atomic_compare_and_swap<mode>): Likewise.
	(atomic_exchange<mode>_llsc): Likewise.
	(atomic_fetch_add<mode>_llsc): Likewise.
	* config/mips/mips-cpus.def (m14kc, m14k): New processors.
	* config/mips/mips-protos.h (umips_output_save_restore): New prototype.
	(umips_save_restore_pattern_p): Likewise.
	(umips_load_store_pair_p): Likewise.
	(umips_output_load_store_pair): Likewise.
	(umips_movep_target_p): Likewise.
	(umips_12bit_offset_address_p): Likewise.
	* config/mips/mips.c (MIPS_MAX_FIRST_STEP): Update for microMIPS.
	(mips_base_mips16): Rename this...
	(mips_base_compression_flags): ...to this. Update all uses.
	(mips_attribute_table): Add micromips, nomicromips and nocompression.
	(mips_mips16_decl_p): Delete.
	(mips_nomips16_decl_p): Delete.
 	(mips_get_compress_on_flags): New function.
	(mips_get_compress_off_flags): New function.
	(mips_get_compress_mode): New function.
	(mips_get_compress_on_name): New function.
	(mips_get_compress_off_name): New function.
	(mips_insert_attributes): Support multiple compression types.
	(mips_merge_decl_attributes): Likewise.
	(umips_12bit_offset_address_p): New function.
	(mips_start_function_definition): Emit .set micromips directive.
	(mips_call_may_need_jalx_p): New function.
	(mips_function_ok_for_sibcall): Add microMIPS support.
	(mips_print_operand_punctuation): Support short delay slots and
	compact jumps.
	(umips_swm_mask, umips_swm_encoding): New.
	(umips_build_save_restore): New function.
	(mips_for_each_saved_gpr_and_fpr): Add microMIPS support.
	(was_mips16_p): Remove.
	(old_compression_mode): New.
	(mips_set_compression_mode): New function.
	(mips_set_current_function): Add microMIPS support.
	(mips_option_override): Likewise.
	(umips_save_restore_pattern_p): New function.
	(umips_output_save_restore): New function.
	(umips_load_store_pair_p_1): New function.
	(umips_load_store_pair_p): New function.
	(umips_output_load_store_pair_1): New function.
	(umips_output_load_store_pair): New function.
	(umips_movep_target_p) New function.
	(mips_prepare_pch_save): Add microMIPS support.
	* config/mips/mips.h (TARGET_COMPRESSION): New.
	(TARGET_CPU_CPP_BUILTINS): Update macro
	to use new compression flags and to support microMIPS.
	(MIPS_ISA_LEVEL_SPEC): Add m14k processors.
	(MIPS_ARCH_FLOAT_SPEC): Likewise.
	(ISA_HAS_LWXS): Include TARGET_MICROMIPS.
	(ISA_HAS_LOAD_DELAY): Exclude TARGET_MICROMIPS.
	(ASM_SPEC): Support mmicromips and mno-micromips.
	(M16STORE_REG_P): New macro.
	(MIPS_CALL): Support TARGET_MICROMIPS.
	(MICROMIPS_J): New macro.
	(mips_base_mips16): Rename this...
	(mips_base_compression_flags): ...to this.
	(UMIPS_12BIT_OFFSET_P): New macro.
	* config/mips/t-sde: (MULTILIB_OPTIONS): Add microMIPS.
	(MULTILIB_DIRNAMES): Likewise.
libgcc/
2013-03-20  Catherine Moore  <clm@codesourcery.com>
	    Joseph Myers  <joseph@codesourcery.com>
	    Chao-ying Fu  <fu@mips.com>

	* config/mips/mips16.S:  Don't build for microMIPS.
	* config/mips/linux-unwind.h: Handle microMIPS frame.
	* config/mips/crtn.S (fini, init): New labels.
gcc/testsuite/
2013-03-20  Catherine Moore  <clm@codesourcery.com>
	    Richard Sandiford <rdsandiford@googlemail.com>

	* gcc.target/mips/mips.exp: Add microMIPS support.
	* gcc.target/mips/umips-movep-2.c: New test.
	* gcc.target/mips/umips-lwp-2.c: New test.
	* gcc.target/mips/umips-swp-5.c: New test.
	* gcc.target/mips/umips-constraints-1.c: New test.
	* gcc.target/mips/umips-lwp-3.c: New test.
	* gcc.target/mips/umips-swp-6.c: New test.
	* gcc.target/mips/umips-constraints-2.c: New test.
	* gcc.target/mips/umips-save-restore-1.c: New test.
	* gcc.target/mips/umips-lwp-4.c: New test.
	* gcc.target/mips/umips-swp-7.c: New test.
	* gcc.target/mips/umips-save-restore-2.c: New test.
	* gcc.target/mips/umips-lwp-swp-volatile.c: New test.
	* gcc.target/mips/umips-lwp-5.c: New test.
	* gcc.target/mips/umips-save-restore-3.c: New test.
	* gcc.target/mips/umips-lwp-6.c: New test.
	* gcc.target/mips/umips-swp-1.c: New test.
	* gcc.target/mips/umips-lwp-7.c: New test.
	* gcc.target/mips/umips-swp-2.c: New test.
	* gcc.target/mips/umips-lwp-8.c: New test.
	* gcc.target/mips/umips-swp-3.c: New test.
	* gcc.target/mips/umips-movep-1.c: New test.
	* gcc.target/mips/umips-lwp-1.c: New test.
	* gcc.target/mips/umips-swp-4.c: New test.


Co-Authored-By: Chao-ying Fu <fu@mips.com>
Co-Authored-By: Iain Sandoe <iain@codesourcery.com>
Co-Authored-By: Joseph Myers <joseph@codesourcery.com>
Co-Authored-By: Maciej W. Rozycki <macro@codesourcery.com>
Co-Authored-By: Nathan Froyd <froydnj@codesourcery.com>
Co-Authored-By: Nathan Sidwell <nathan@codesourcery.com>
Co-Authored-By: Richard Sandiford <rdsandiford@googlemail.com>
Co-Authored-By: Tom de Vries <tom@codesourcery.com>

From-SVN: r196828
2013-03-20 10:37:52 -04:00
Jakub Jelinek fbd28bc3b2 re PR tree-optimization/53265 (Warn when undefined behavior implies smaller iteration count)
PR tree-optimization/53265
	* common.opt (Waggressive-loop-optimizations): New option.
	* tree-ssa-loop-niter.c: Include tree-pass.h.
	(do_warn_aggressive_loop_optimizations): New function.
	(record_estimate): Call it.  Don't add !is_exit bounds to loop->bounds
	if number_of_latch_executions returned constant.
	(estimate_numbers_of_iterations_loop): Call number_of_latch_executions
	early.  If number_of_latch_executions returned constant, set
	nb_iterations_upper_bound back to it.
	* cfgloop.h (struct loop): Add warned_aggressive_loop_optimizations
	field.
	* Makefile.in (tree-ssa-loop-niter.o): Depend on $(TREE_PASS_H).
	* doc/invoke.texi (-Wno-aggressive-loop-optimizations): Document.

	* gcc.dg/pr53265.c: New test.
	* gcc.dg/torture/pr49518.c: Add -Wno-aggressive-loop-optimizations
	to dg-options.
	* g++.dg/opt/longbranch2.C (EBCOTLut): Double sizes of a2 and a3
	arrays.
	* gcc.dg/tree-ssa/cunroll-10.c (main): Rename to foo.  Add argument
	n, use it as high bound instead of 4.

	* unwind-dw2.c (execute_cfa_program): Avoid
	-Waggressive-array-optimizations warnings for DW_CFA_GNU_window_save
	on targets with DWARF_FRAME_REGISTERS < 32.

	* testsuite/libmudflap.c/fail37-frag.c: Add optimization barrier.

From-SVN: r196650
2013-03-14 10:13:36 +01:00
Oleg Endo decc676eb5 re PR target/49880 (SuperH: ICE when -m4 is used with -mdiv=call-div1)
PR target/49880
	* config/sh/sh.opt (FPU_SINGLE_ONLY): New mask.
	(musermode): Convert to Var(TARGET_USERMODE).
	* config/sh/sh.h (SELECT_SH2A_SINGLE_ONLY, SELECT_SH4_SINGLE_ONLY,
	MASK_ARCH): Add MASK_FPU_SINGLE_ONLY.
	* config/sh/sh.c (sh_option_override): Use
	TARGET_FPU_DOUBLE || TARGET_FPU_SINGLE_ONLY for call-fp case.
	* config/sh/sh.md (udivsi3_i1, divsi3_i1): Remove ! TARGET_SH4
	condition.
	(udivsi3_i4, divsi3_i4): Use TARGET_FPU_DOUBLE condition instead of
	TARGET_SH4.
	(udivsi3_i4_single, divsi3_i4_single): Use
	TARGET_FPU_SINGLE_ONLY || TARGET_FPU_DOUBLE instead of TARGET_HARD_SH4.

	PR target/49880
	* config/sh/lib1funcs.S (sdivsi3_i4, udivsi3_i4): Enable for SH2A.
	(sdivsi3, udivsi3): Remove SH4 check and always compile these functions.

	PR target/49880
	* gcc.target/sh/pr49880-1.c: New.
	* gcc.target/sh/pr49880-2.c: New.
	* gcc.target/sh/pr49880-3.c: New.
	* gcc.target/sh/pr49880-4.c: New.
	* gcc.target/sh/pr49880-5.c: New.

From-SVN: r196636
2013-03-13 18:09:10 +00:00
Sriraman Tallam 84ea618acd cpuinfo.c (get_intel_cpu): Fix cpuid codes for sandybridge processors.
2013-03-07  Sriraman Tallam  <tmsriram@google.com>

	* config/i386/cpuinfo.c (get_intel_cpu): Fix cpuid codes for
	sandybridge processors.

From-SVN: r196532
2013-03-08 01:02:29 +00:00
Oleg Endo 8f6d1c8601 re PR target/56529 ([SH] Calls to __sdivsi3_i4i and __udivsi3_i4i are generated on SH2)
PR target/56529
	* config/sh/sh.c (sh_option_override): Check for TARGET_DYNSHIFT
	instead of TARGET_SH2 for call-table case.  Do not set sh_div_strategy
	to SH_DIV_CALL_TABLE for TARGET_SH2.
	* config.gcc (sh_multilibs): Add m2 and m2a to sh*-*-linux* multilib
	list.
	* doc/invoke.texi (SH options): Document mdiv= call-div1, call-fp,
	call-table options.

	PR target/56529
	* config/sh/lib1funcs.S (udivsi3_i4i, sdivsi3_i4i): Add __SH2A__ to
	inclusion list.

From-SVN: r196484
2013-03-06 00:41:25 +00:00
Edgar E. Iglesias 409b1de4e1 Setup stack protection at entry.
* config/microblaze/crti.S: Setup stack protection at entry

From-SVN: r196432
2013-03-04 15:23:05 +00:00
Georg-Johann Lay 0b4ce21bcb * config/avr/lib1funcs.S (__ashrdi3, __lshrdi3, __ashldi3)
(__rotldi3): Shift bytewise if applicable.

From-SVN: r196431
2013-03-04 14:01:24 +00:00
James Greenhalgh b7c3f1ca31 [AArch64/AArch64-4.7][libgcc] Silence warnings in sync-cache.c
libgcc/
	* config/aarch64/sync-cache.c
	(__aarch64_sync_cache_range): Silence warnings.

From-SVN: r196380
2013-03-01 14:01:58 +00:00
Catherine Moore 6d65e8f1fc 2012-02-25 Catherine Moore <clm@codesourcery.com>
Revert microMIPS patch.

From-SVN: r196259
2013-02-25 08:53:16 -05:00
Catherine Moore 6941b508c9 mips16.S: Don't build for microMIPS.
libgcc/
2013-02-24  Catherine Moore  <clm@codesourcery.com>
	    Joseph Myers  <joseph@codesourcery.com>
	    Chao-ying Fu  <fu@mips.com>

	* config/mips/mips16.S:  Don't build for microMIPS.
	* config/mips/linux-unwind.h: Handle microMIPS frame.
	* config/mips/crtn.S (fini, init): New labels.

gcc/
2013-02-24  Catherine Moore  <clm@codesourcery.com>
	    Maciej W. Rozycki  <macro@codesourcery.com>
	    Tom de Vries  <tom@codesourcery.com>
	    Nathan Sidwell <nathan@codesourcery.com>
	    Iain Sandoe  <iain@codesourcery.com>
	    Nathan Froyd  <froydnj@codesourcery.com>
	    Chao-ying Fu <fu@mips.com>

	* doc/extend.texi: (micromips, nomicromips, nocompression):
	Document new function attributes. 
	* doc/invoke.texi (minterlink-compressed, mmicromips,
	m14k, m14ke, m14kec): Document new options.
	(minterlink-mips16): Update documentation.
	* doc/md.texi (ZC, ZD): Document new constraints.
	* configure.ac (gcc_cv_as_micromips): Check if linker
	supports the .set micromips directive.
	* configure: Regenerate.
	* config.in: Regenerate.
	* config/mips/mips-tables.opt: Regenerate.
	* config/mips/micromips.md: New file.
	* constraints.md (ZC, AD): New constraints.
	* config/mips/predicates.md (movep_src_register): New predicate.
	(movep_src_operand): New predicate.
	(non_volatile_mem_operand): New predicate.
	* config/mips/mips.md (multimem): New type.
	(length): Differentiate between 17-bit and 18-bit branch offsets.
	(MOVEP1, MOVEP2): New mode iterator.
 	(mov_<load>l): Use ZC constraint.
	(mov_<load>r): Likewise.
	(mov_<store>l): Likewise.
	(mov_<store>r): Likewise.
	(*branch_equality<mode>_inverted): Add microMIPS support.
	(*branch_equality<mode>): Likewise.
	(*jump_absolute): Likewise.
	(indirect_jump_<mode>): Likewise.
	(tablejump_<mode>): Likewise.
	(<optab>_internal): Likewise.
	(sibcall_internal): Likewise.
	(sibcall_value_internal): Likewise.
	(prefetch): Use constraint ZD.
	* config/mips/mips.opt (minterlink-compressed): New option.
	(minterlink-mips16): Now an alias for minterlink-compressed.
	(mmicromips): New option.
	* config/mips/sync.md (sync_compare_and_swap<mode>): Use ZR constraint.
	(compare_and_swap_12): Likewise.
	(sync_add<mode>): Likewise.
	(sync_<optab>_12): Likewise.
	(sync_old_<optab>_12): Likewise.
	(sync_new_<optab>_12): Likewise.
	(sync_nand_12): Likewise.
	(sync_old_nand_12): Likewise.
	(sync_new_nand_12): Likewise.
	(sync_sub<mode>): Likewise.
	(sync_old_add<mode>): Likewise.
	(sync_old_sub<mode>): Likewise.
	(sync_new_add<mode>): Likewise.
	(sync_new_sub<mode>): Likewise.
	(sync_<optab><mode>): Likewise.
	(sync_old_<optab><mode>): Likewise.
	(sync_new_<optab><mode>): Likewise.
	(sync_nand<mode>): Likewise.
	(sync_old_nand<mode>): Likewise.
	(sync_new_nand<mode>): Likewise.
	(sync_lock_test_and_set<mode>): Likewise.
	(test_and_set_12): Likewise.
	(atomic_compare_and_swap<mode>): Likewise.
	(atomic_exchange<mode>_llsc): Likewise.
	(atomic_fetch_add<mode>_llsc): Likewise.
	* config/mips/mips-cpus.def (m14kc, m14k): New processors.
	* config/mips/mips-protos.h (umips_output_save_restore): New prototype.
	(umips_save_restore_pattern_p): Likewise.
	(umips_load_store_pair_p): Likewise.
	(umips_output_load_store_pair): Likewise.
	(umips_movep_target_p): Likewise.
	(umips_12bit_offset_address_p): Likewise.
	* config/mips/mips.c (MIPS_MAX_FIRST_STEP): Update for microMIPS.
	(mips_base_mips16): Rename this...
	(mips_base_compression_flags): ...to this. Update all uses.
	(mips_attribute_table): Add micromips, nomicromips and nocompression.
	(mips_mips16_decl_p): Delete.
	(mips_nomips16_decl_p): Delete.
 	(mips_get_compress_on_flags): New function.
	(mips_get_compress_off_flags): New function.
	(mips_get_compress_mode): New function.
	(mips_get_compress_on_name): New function.
	(mips_get_compress_off_name): New function.
	(mips_insert_attributes): Support multiple compression types.
	(mips_merge_decl_attributes): Likewise.
	(umips_12bit_offset_address_p): New function.
	(mips_start_function_definition): Emit .set micromips directive.
	(mips_call_may_need_jalx_p): New function.
	(mips_function_ok_for_sibcall): Add microMIPS support.
	(mips_print_operand_punctuation): Support short delay slots and
	compact jumps.
	(umips_swm_mask, umips_swm_encoding): New.
	(umips_build_save_restore): New function.
	(mips_for_each_saved_gpr_and_fpr): Add microMIPS support.
	(was_mips16_p): Remove.
	(old_compression_mode): New.
	(mips_set_compression_mode): New function.
	(mips_set_current_function): Add microMIPS support.
	(mips_option_override): Likewise.
	(umips_save_restore_pattern_p): New function.
	(umips_output_save_restore): New function.
	(umips_load_store_pair_p_1): New function.
	(umips_load_store_pair_p): New function.
	(umips_output_load_store_pair_1): New function.
	(umips_output_load_store_pair): New function.
	(umips_movep_target_p) New function.
	(mips_prepare_pch_save): Add microMIPS support.
	* config/mips/mips.h (TARGET_COMPRESSION): New.
	(TARGET_CPU_CPP_BUILTINS): Update macro
	to use new compression flags and to support microMIPS.
	(MIPS_ISA_LEVEL_SPEC): Add m14k processors.
	(MIPS_ARCH_FLOAT_SPEC): Likewise.
	(ISA_HAS_LWXS): Include TARGET_MICROMIPS.
	(ISA_HAS_LOAD_DELAY): Exclude TARGET_MICROMIPS.
	(ASM_SPEC): Support mmicromips and mno-micromips.
	(M16STORE_REG_P): New macro.
	(MIPS_CALL): Support TARGET_MICROMIPS.
	(MICROMIPS_J): New macro.
	(mips_base_mips16): Rename this...
	(mips_base_compression_flags): ...to this.
	(UMIPS_12BIT_OFFSET_P): New macro.
	* config/mips/t-sde: (MULTILIB_OPTIONS): Add microMIPS.
	(MULTILIB_DIRNAMES): Likewise.

gcc/testsuite/
2013-02-24  Catherine Moore  <clm@codesourcery.com>
	    Richard Sandiford <rdsandiford@googlemail.com>

	* gcc.target/mips/mips.exp: Add microMIPS support.
	* gcc.target/mips/umips-movep-2.c: New test.
	* gcc.target/mips/umips-lwp-2.c: New test.
	* gcc.target/mips/umips-swp-5.c: New test.
	* gcc.target/mips/umips-constraints-1.c: New test.
	* gcc.target/mips/umips-lwp-3.c: New test.
	* gcc.target/mips/umips-swp-6.c: New test.
	* gcc.target/mips/umips-constraints-2.c: New test.
	* gcc.target/mips/umips-save-restore-1.c: New test.
	* gcc.target/mips/umips-lwp-4.c: New test.
	* gcc.target/mips/umips-swp-7.c: New test.
	* gcc.target/mips/umips-save-restore-2.c: New test.
	* gcc.target/mips/umips-lwp-swp-volatile.c: New test.
	* gcc.target/mips/umips-lwp-5.c: New test.
	* gcc.target/mips/umips-save-restore-3.c: New test.
	* gcc.target/mips/umips-lwp-6.c: New test.
	* gcc.target/mips/umips-swp-1.c: New test.
	* gcc.target/mips/umips-lwp-7.c: New test.
	* gcc.target/mips/umips-swp-2.c: New test.
	* gcc.target/mips/umips-lwp-8.c: New test.
	* gcc.target/mips/umips-swp-3.c: New test.
	* gcc.target/mips/umips-movep-1.c: New test.
	* gcc.target/mips/umips-lwp-1.c: New test.
	* gcc.target/mips/umips-swp-4.c: New test.


Co-Authored-By: Chao-ying Fu <fu@mips.com>
Co-Authored-By: Iain Sandoe <iain@codesourcery.com>
Co-Authored-By: Joseph Myers <joseph@codesourcery.com>
Co-Authored-By: Maciej W. Rozycki <macro@codesourcery.com>
Co-Authored-By: Nathan Froyd <froydnj@codesourcery.com>
Co-Authored-By: Nathan Sidwell <nathan@codesourcery.com>
Co-Authored-By: Richard Sandiford <rdsandiford@googlemail.com>
Co-Authored-By: Tom de Vries <tom@codesourcery.com>

From-SVN: r196246
2013-02-24 18:46:44 -05:00
Edgar E. Iglesias 7c422dbbc7 modsi3.S (modsi3): Fix case with 0x80000000 as dividend.
* config/microblaze/modsi3.S (modsi3): Fix case with 0x80000000 
as dividend.

From-SVN: r196156
2013-02-19 23:00:50 +00:00
Alan Modra 110207ad17 re PR target/55431 (Invalid auxv search in ppc linux-unwind code.)
PR target/55431
	* config/rs6000/linux-unwind.h (ppc_linux_aux_vector): Delete.
	(ppc_fallback_frame_state): Always set up save locations for fp
	and altivec.  Don't bother with non-callee-saved regs, r0-r13
	except for r2 on ppc64, fr0-fr13, v0-v19, vscr.

From-SVN: r196077
2013-02-16 00:23:40 +10:30
Georg-Johann Lay e68a4ef6ea re PR target/54222 ([avr] Implement fixed-point support)
gcc/
	PR target/54222
	* config/avr/avr-dimode.md (umulsidi3, mulsidi3): New expanders.
	(umulsidi3_insn, mulsidi3_insn): New insns.

libgcc/
	PR target/54222
	* config/avr/t-avr (LIB2FUNCS_EXCLUDE): Add: _usmulUHA, _usmulUSA,
	_ssmulHA, _ssmulSA.
	(LIB1ASMFUNCS): Add: _muldi3_6, _mulsidi3, _umulsidi3, _usmuluha3,
	_ssmulha3, _usmulusa3, _ssmulsa3.
	* config/avr/lib1funcs.S (__muldi3_6): Break out of __muldi3.
	(__muldi3): XCALL __muldi3_6 instead of rcall.
	(__umulsidi3, __mulsidi3): New functions.
	(do_prologue_saves, do_epilogue_restores): New .macros.
	(__divdi3_moddi3): Use them.
	* config/avr/lib1funcs-fixed.S (__usmuluha3, __ssmulha3)
	(__usmulusa3, __ssmulsa3): New functions.

From-SVN: r195978
2013-02-12 14:55:16 +00:00
Iain Sandoe 6c59ffd1ac re PR libitm/55693 (libitm.c++/eh-1.C execution test fails on darwin from r193271)
/libgcc
2013-02-11  Iain Sandoe  <iain@codesourcery.com>
	    Jack Howarth  <howarth@bromo.med.uc.edu>
	    Patrick Marlier  <patrick.marlier@gmail.com>

	PR libitm/55693
	* config/darwin-crt-tm.c: Remove dummy functions hack.

/gcc
2013-02-11  Iain Sandoe  <iain@codesourcery.com>
	    Jack Howarth  <howarth@bromo.med.uc.edu>
	    Patrick Marlier  <patrick.marlier@gmail.com>

	PR libitm/55693
	* config/darwin.h: Replace ENDFILE_SPEC with TM_DESTRUCTOR and
	define ENDFILE_SPEC as TM_DESTRUCTOR.
	* config/i386/darwin.h (ENDFILE_SPEC): Use TM_DESTRUCTOR.

/libitm
2013-02-11  Iain Sandoe  <iain@codesourcery.com>
	    Jack Howarth  <howarth@bromo.med.uc.edu>
	    Patrick Marlier  <patrick.marlier@gmail.com>

	PR libitm/55693
	* alloc_cpp.cc: Enable function declarations on darwin.
	* eh_cpp.cc: Likewise.

Co-Authored-By: Jack Howarth <howarth@bromo.med.uc.edu>
Co-Authored-By: Patrick Marlier <patrick.marlier@gmail.com>

From-SVN: r195960
2013-02-11 23:30:10 +00:00
Georg-Johann Lay 85d768f349 re PR target/54222 ([avr] Implement fixed-point support)
gcc/
	PR target/54222
	* config/avr/avr.md (unspec) <UNSPEC_ROUND>: Add.
	* config/avr/avr-fixed.md (ALL4QA, ALL124QA): New mode iterators.
	(round<mode>3, round<mode>3_const): New expanders for fixed-mode.
	(*round<mode>3.libgcc): New insns for fixed-modes.
	* config/avr/builtins.def (ABSxx): Use a non-NULL LIBNAME.
	(ROUNDxx, COUNTLSxx, BITSxx, xxBITS): New DEF_BUILTINs.
	(ROUNDFX, COUNTLSFX, ABSFX): New DEF_BUILTINs.
	* config/avr/stdfix.h (absFX, bitsFX, FXbits): Remove inline
	implementations.  Define to __builtin_avr_absFX,
	__builtin_avr_bitsFX, __builtin_avr_FXbits, respectively.
	(roundFX, countlsFX): Define to __builtin_avr_roundFX,
	__builtin_avr_countlsFX, respectively.
	* config/avr/avr-c.c (target.h): Include it.
	(enum avr_builtin_id): New enum.
	(avr_resolve_overloaded_builtin): New static function.
	(avr_register_target_pragmas): Use it to set
	targetm.resolve_overloaded_builtin.
	* config/avr/avr.c (avr_init_builtins): Supply myriads of local
	tree nodes used by DEF_BUILTIN.
	(avr_expand_builtin) <AVR_BUILTIN_ROUNDxx>: Sanity-check them.
	(avr_fold_builtin) <AVR_BUILTIN_BITSxx>: Fold to VIEW_COVERT_EXPR.
	<AVR_BUILTIN_xxBITS>: Same.
	
libgcc/
	PR target/54222
	* config/avr/lib2funcs.c: New C sources for modules for libgcc.a.
	* config/avr/lib2-object.mk: New iterator to build objects from it.
	* config/avr/t-avr: Iterate lib2-object.mk to build objects from
	lib2funcs.c.
	(LIB2FUNCS_EXCLUDE): Add _clrsbdi2.
	(LIB1ASMFUNCS): Add: _ssabs_1, _mask1, _ret, _roundqq3, _rounduqq3,
	_round_s2, _round_u2, _round_2_const, _addmask_2, _round_s4,
	_round_u4, _round_4_const, _addmask_4, _round_x8, _rounddq3
	_roundudq3, _roundda3 _rounduda3, _roundta3 _rounduta3.
	* config/avr/lib1funcs-fixed.S: Implement them.

gcc/testsuite/
	PR target/54222
	* gcc.target/avr/torture/builtins-4-roundfx.c: New test.
	* gcc.target/avr/torture/builtins-5-countlsfx.c: New test.

From-SVN: r195878
2013-02-08 10:13:37 +00:00
Richard Sandiford 5d5bf77569 Update copyright in libgcc.
From-SVN: r195731
2013-02-04 19:06:20 +00:00
David Edelsohn 99113dff9d re PR c++/54601 (AIX uses atexit which causes unloading of shared modules to break)
PR target/54601
libgcc/
        * config.host (powerpc-ibm-aix[56789]): Add t-aix-cxa to tmake_file.
        Add crtcxa to extra_parts.
        * config/rs6000/exit.h: New file.
        * config/rs6000/cxa_atexit.c: New file.
        * config/rs6000/cxa_finalize.c: New file.
        * config/rs6000/crtcxa.c: New file.
        * config/rs6000/t-aix-cxa: New file.
        * config/rs6000/libgcc-aix-cxa.ver: New file.

gcc/
        * configure.ac (cxa_atexit): Add AIX.
        * configure: Regenerate.

        * config/rs6000/aix61.h (STARTFILE_SPEC): Add crtcxa.o.

From-SVN: r195675
2013-02-01 15:26:24 -05:00
Nick Clifton dbdbd982df lib1funcs.S: Add support for e3v5 architecture variant.
* config/v850/lib1funcs.S: Add support for e3v5 architecture
	variant.

	* config/v850/constraints.md (Q): Define as a memory constraint.
	* config/v850/predicates.md (label_ref_operand): New predicate.
	(e3v5_shift_operand): New predicate.
	(ior_operator): New predicate.
	* config/v850/t-v850: Add e3v5 multilib.
	* config/v850/v850-protos.h (v850_adjust_insn_length): Prototype.
	(v850_gen_movdi): Prototype.
	* config/v850/v850.c: Add support for e3v5 architecture.
	Rename all uses of TARGET_V850E || TARGET_V850E2_ALL to
	TARGET_V850E_UP.
	(construct_save_jarl): Add e3v5 long JARL support.
	(v850_adjust_insn_length): New function.  Adjust length of call
	insns when using e3v5 instructions.
	(v850_gen_movdi): New function: Generate instructions to move a
	DImode value.
	* config/v850/v850.h (TARGET_CPU_v850e3v5): Define.
	(CPP_SPEC): Define __v850e3v5__ as appropriate.
	(TARGET_USE_FPU): Enable for e3v5.
	(CONST_OK_FOR_W): New macro.
	(ADJUST_INSN_LENGTH): Define.
	* config/v850/v850.md (UNSPEC_LOOP): Define.
	(attr cpu): Add v850e3v5.
	Rename all uses of TARGET_V850E2 to TARGET_V850E2V3_UP.
	(movdi): New pattern.
	(movdi_internal): New pattern.
	(cbranchsf4): Conditionalize on TARGET_USE_FPU.
	(cbranchdf4): Conditionalize on TARGET_USE_FPU.
	(cstoresf4): Likewise.
	(cstoredf4): Likewise.
	(insv): New pattern.
	(rotlso3_a): New pattern.
	(rotlsi3_b): New pattern
	(rotlsi3_v850e3v5): New pattern.
	(doloop_begin): New pattern.
	(fix_loop_counter): New pattern.
	(doloop_end): New pattern.
	(branch_normal): Add e3v5 long branch support.
	(branch_invert): Likewise.
	(branch_z_normal): Likewise.
	(branch_z_invert): Likewise.
	(branch_nz_normal): Likewise.
	(branch_nz_invert): Likewise.
	(call_internal_short): Add e3v5 register-indirect JARL support.
	(call_internal_long): Likewise.
	(call_value_internal_short): Likewise.
	(call_value_internal_long): Likewise.
	* config/v850/v850.opt (mv850e3v5, mv850e2v4): New options.
	(mloop): New option.
	* config.gcc: Add support for configuring v840e3v5 target.
	* doc/invoke.texi: Document new v850 specific command line
	options.

From-SVN: r195623
2013-01-31 18:36:02 +00:00
Georg-Johann Lay 5893f1589a re PR target/54222 ([avr] Implement fixed-point support)
PR target/54222
	* config/avr/t-avr (LIB2FUNCS_EXCLUDE): Add:
	_mulQQ,  _mulHQ,  _mulHA,  _mulSA,
	_mulUQQ, _mulUHQ, _mulUHA, _mulUSA,
	_divQQ,  _divHQ,  _divHA,  _divSA,
	_divUQQ, _divUHQ, _divUHA, _divUSA.

From-SVN: r195532
2013-01-29 10:33:18 +00:00
David Holsgrove fbf0cf904e gcc: PR target/54663
gcc:  PR target/54663
	* config.gcc (microblaze*-linux*): Add tmake_file to allow building
	of microblaze-c.o.
libgcc:
	* config.host(microblaze*-linux*): tmake_file: Remove 
	t-slibgcc-nolc-override, add t-slibgcc-libgcc.
	* config/microblaze/t-microblaze: Set LIB2FUNCS_EXCLUDE
	to exclude functions from being built with libgcc.c and use
	the microblaze assembly.

From-SVN: r195488
2013-01-26 16:53:45 +00:00
Edgar E. Iglesias 6f14eef2c5 gcc/config.gcc (microblaze*-*-*): Rename microblaze*-*-elf, update tm_file.
libgcc/config.host (microblaze*-*-*): Rename microblaze*-*-elf, update extra_parts.

From-SVN: r195487
2013-01-26 16:39:10 +00:00
Yufeng Zhang 922c57d1ba sync-cache.c (__aarch64_sync_cache_range): Cast the results of (dcache_lsize - 1) and (icache_lsize - 1) to the type...
2013-01-17  Yufeng Zhang  <yufeng.zhang@arm.com>

	* config/aarch64/sync-cache.c (__aarch64_sync_cache_range): Cast the
	results of (dcache_lsize - 1) and (icache_lsize - 1) to the type
	__UINTPTR_TYPE__; also cast 'base' to the same type before the
	alignment operation.

From-SVN: r195266
2013-01-17 14:27:36 +00:00
Sofiane Naci e0f8b6a0a0 [AARCH64] Fix __clear_cache.
From-SVN: r195203
2013-01-15 15:49:13 +00:00
Ian Lance Taylor 4bd18faef2 Reverted last patch.
From-SVN: r195174
2013-01-14 19:38:07 +00:00
Ian Lance Taylor 2bc153600f generic-morestack-thread.c: Change declaration of __real_pthread_create to not be weak.
* generic-morestack-thread.c: Change declaration of
	__real_pthread_create to not be weak.

From-SVN: r195172
2013-01-14 19:33:02 +00:00
Georg-Johann Lay 0089227267 * Fix typos. Remove trailing blanks. Fix coding style.
From-SVN: r195151
2013-01-14 15:08:45 +00:00
Georg-Johann Lay e59ec5fdb2 avr-lib.h: Add GPL copyright notice.
* config/avr/avr-lib.h: Add GPL copyright notice.

From-SVN: r195145
2013-01-14 14:01:32 +00:00
Georg-Johann Lay 3ffc195810 fixed-bit.c (SATFRACT): Only declare / set min_low, min_high if TO_MODE_UNSIGNED == 0.
* fixed-bit.c (SATFRACT) <FROM_TYPE=1, TO_TYPE=4>: Only
	declare / set min_low, min_high if TO_MODE_UNSIGNED == 0.
	(SATFRACT) <FROM_TYPE=TO_TYPE=4>: Only declare / set min_low,
	min_high if FROM_MODE_UNSIGNED == 0 and TO_MODE_UNSIGNED == 0.

From-SVN: r195141
2013-01-14 10:19:00 +00:00
Mark Kettenis 25c210f9bd config.host (i[34567]86-*-openbsd* and x86_64-*-openbsd*): Add to lists of i[34567]86-*-* and x86_64-*-* soft-fp targets.
libgcc/

	* config.host (i[34567]86-*-openbsd* and x86_64-*-openbsd*):
	Add to lists of i[34567]86-*-* and x86_64-*-* soft-fp targets.

gcc/

	* config/i386/openbsdelf.h (LIBGCC2_HAS_TF_MODE, LIBGCC2_TF_CEXT,
	TF_SIZE): Define.

From-SVN: r194999
2013-01-07 22:49:56 +00:00
Nick Clifton db59befb09 lib1funcs.S: Only provide CALLT support functions if the CALLT instruction is supported.
* config/v850/lib1funcs.S: Only provide CALLT support functions if
	the CALLT instruction is supported.

From-SVN: r194898
2013-01-04 10:21:55 +00:00
Jonathan Wakely 5aa12dbf6c gthr.h (__gthread_cond_timedwait_recursive): Do not require.
* gthr.h (__gthread_cond_timedwait_recursive): Do not require.
	* gthr-posix.h (__gthread_cond_timedwait_recursive): Remove.

From-SVN: r194652
2012-12-20 22:19:57 +00:00
John Tytgat 65f141179f fp16.c (__gnu_f2h_internal): Fix inaccuracy when aexp is 25.
* config/arm/fp16.c (__gnu_f2h_internal): Fix inaccuracy when aexp
	is 25.

From-SVN: r194474
2012-12-13 12:05:30 +00:00
Jakub Jelinek ee3ae4f768 re PR libgcc/55451 (FAIL: gcc.dg/fixed-point/unary.c)
PR libgcc/55451
	* fixed-bit.c (FIXED_SSADD, FIXED_SSSUB, FIXED_SSNEG): Avoid
	undefined signed overflows.

From-SVN: r194439
2012-12-12 10:38:56 +01:00
Uros Bizjak 2fcfba3d65 re PR target/55344 (Cross compiling for alpha-linux fails because <signal.h> doesn't exist)
PR target/55344
	* config/alpha/linux-unwind.h: Disable when inhibit_libc is defined.

From-SVN: r194334
2012-12-09 19:15:59 +01:00
Uros Bizjak 4f2b3dc2b4 sfp-machine.h (FP_EX_ALL): Define.
* config/i386/sfp-machine.h (FP_EX_ALL): Define.
	(FP_TRAPPING_EXCEPTIONS): Define.
	* config/i386/32/sfp-machine.h (FP_EX_SHIFT): Define.
	* config/i386/64/sfp-machine.h (FP_EX_SHIFT): Ditto.

From-SVN: r194243
2012-12-06 10:49:43 +01:00
Richard Henderson 066161a2aa re PR bootstrap/55571 (PR48076 fix broke bootstrap on armv5tel-linux-gnueabi)
PR bootstrap/55571

        * Makefile.in (libgcc_s.so): Depend on and link with libgcc.a.

From-SVN: r194159
2012-12-04 11:08:18 -08:00
Marcus Shawcroft 2562618148 AArch64: Define FP_TRAPPING_EXCEPTIONS.
2012-12-04  Marcus Shawcroft <marcus.shawcroft@arm.com>

        * config/aarch64/sfp-machine.h (FP_EX_ALL): Define.
	(FP_EX_SHIFT): Define.
	(FP_TRAPPING_EXCEPTIONS): Define.

From-SVN: r194151
2012-12-04 15:51:55 +00:00
Marcus Shawcroft 868395e87f aarch64: Refactor aarch64 sfp-machine.h
2012-12-04  Marcus Shawcroft <marcus.shawcroft@arm.com>

	* config/aarch64/sfp-machine.h (FP_RND_MASK): Define.
	(FP_ROUNDMODE): Use FP_RND_MASK.
	* config/aarch64/sfp-exceptions.c: New.
	* config/aarch64/sfp-machine.h (FP_HANDLE_EXCEPTIONS):
	Use __sfp_handle_exceptions.

From-SVN: r194142
2012-12-04 14:16:17 +00:00
Richard Earnshaw 5005fe220a config.host: (arm*-*-freebsd*): Remove.
* config.host: (arm*-*-freebsd*): Remove.
	(arm*-*-linux*, arm*-*-uclinux*): Simplify logic.
	(arm*-*-elf*): Remove.
	(arm*-*-wince-pe*): Remove.
	* arm/unwind-arm.c (struct fpa_reg): Delete.
	(struct fpa_regs): Delete.
	(phase1_vrs): Remove fpa element.
	(_Unwind_VRS_Get): Remove _UVRSC_FPA.
	(_Unwind_VRS_Set, _Unwind_VRS_Pop): Likewise.
	* arm/pr-support.c (__gnu_unwind_execute): Remove FPA support.
	* ieee754-sf.S (floatundisf): Remove FPA support.
	(floatdisf): Likewise.
	* ieee75f-df.S (floatundidf): Likewise.
	(floatdidf): Likewise.

From-SVN: r194138
2012-12-04 13:49:09 +00:00
Kai Tietz e5a81c8e46 re PR target/55445 (Always defined __SEH__ when build from trunk)
PR target/55445
        * unwind-c.c (__SEH__): Make sure SjLj isn't active.
        * unwind-generic.h: Likewise.
        * unwind-seh.c: Likewise.

From-SVN: r193928
2012-11-29 10:36:41 +01:00
Richard Henderson f4919e4a82 re PR libgcc/48076 (Unsafe double checked locking in __emutls_get_address)
PR libgcc/48076
        * emutls.c (__emutls_get_address): Avoid race condition between
        obj->loc.offset read and emutls_key initialization.

From-SVN: r193907
2012-11-28 13:01:26 -08:00
Georg-Johann Lay e13d9d5aeb Adjust decimal point of signed accum mode to GCC default.
libgcc/
	Adjust decimal point of signed accum mode to GCC default.

	PR target/54222
	* config/avr/t-avr (LIB1ASMFUNCS): Add _fractsfsq _fractsfusq,
	_divqq_helper.
	* config/avr/lib1funcs-fixed.S (__fractqqsf, __fracthqsf)
	(__fractsasf, __fractsfha, __fractusqsf, __fractsfsa)
	(__mulha3, __mulsa3)
	(__divqq3, __divha3, __divsa3): Adjust to new position of
	decimal point of signed accum types. 
	
	(__mulusa3_round): New function.
	(__mulusa3): Use it.
	(__divqq_helper): New function.
	(__udivuqq3): Use it.

gcc/
	Adjust decimal point of signed accum mode to GCC default.

	PR target/54222
	* config/avr/avr-modes.def (HA, SA, DA): Remove mode adjustments.
	(TA): Move decimal point one bit to the right.
	* config/avr/avr.c (avr_out_fract): Rewrite.

From-SVN: r193721
2012-11-22 10:00:13 +00:00
Jakub Jelinek 1b845c6e70 re PR bootstrap/55370 (Bad libgcc.map)
PR bootstrap/55370
	* libgcc-std.ver.in: Add GCC_4.8.0 and %inherit for it.

From-SVN: r193648
2012-11-20 09:36:31 +01:00
Teresa Johnson 822a258a98 This patch addresses the bogus "Invocation mismatch" messages seen in parallel profiledbootstrap builds of gcc.
This patch addresses the bogus "Invocation mismatch" messages seen in parallel
profiledbootstrap builds of gcc. See PR bootstrap/55051 for a discussion of
why this is occurring and why this checking is inaccurate. Leave it in when
!GCOV_LOCKED, to warn about concurrent update issues requiring locking.

2012-11-18  Teresa Johnson  <tejohnson@google.com>

	PR bootstrap/55051
	* libgcov.c (gcov_exit): Remove merged program summary
	comparison unless !GCOV_LOCKED.

From-SVN: r193612
2012-11-19 05:20:59 +00:00
Marcus Shawcroft 54f4eaf08d soft-fp updated from GLIBC upstream.
From-SVN: r193540
2012-11-15 18:39:47 +00:00
Ian Lance Taylor e808687a8c generic-morestack.c (__generic_morestack): Align the returned stack pointer to a 32 byte boundary.
* generic-morestack.c (__generic_morestack): Align the returned
	stack pointer to a 32 byte boundary.
	* config/i386/morestack.S (__morestack_non_split) [32-bit]: Don't
	increment the return address until we have decided that we don't
	have a varargs function.
	(__morestack) [32-bit]: Align stack correctly when calling C
	functions.
	(__morestack) [64-bit]: Likewise.

From-SVN: r193264
2012-11-06 23:04:28 +00:00
Thomas Schwinge 460277e023 bid_functions.h: Check for __GLIBC__ additionally to LINUX when defining format specifiers.
libgcc/config/libbid/
	* bid_functions.h: Check for __GLIBC__ additionally to LINUX when
	defining format specifiers.

config/
	* dfp.m4 (enable_decimal_float): Enable for i?86*-*-gnu*.

gcc/
	* configure: Regenerate.

libdecnumber/
	* configure: Regenerate.

libgcc/
	* configure: Regenerate.

From-SVN: r193143
2012-11-05 00:08:42 +01:00
Uros Bizjak 73edb27727 re PR target/55175 (i386/sfp-exceptions.c:52:7: error: impossible constraint in 'asm')
PR target/55175
	* config/i386/sfp-exceptions.c: Guard with _SOFT_FLOAT.
	* config/i386/sfp-machine.h: Guard exception handling
	code with _SOFT_FLOAT.
	* config/i386/32/sfp-machine.h: Guard rounding handling
	code with _SOFT_FLOAT.
	* config/i386/64/sfp-machine.h: Ditto.

From-SVN: r193095
2012-11-02 15:09:02 +01:00
Joel Sherrill c1d4fa04ce config.host (m32r-*-rtems*): Include crtinit.o and crtfinit.o as extra_parts.
2012-10-31  Joel Sherrill  <joel.sherrill@oarcorp.com>

	* config.host (m32r-*-rtems*): Include crtinit.o and crtfinit.o
	as extra_parts.

From-SVN: r193010
2012-10-31 03:17:37 +01:00
Uros Bizjak eff6ca85db crtfastmath.c (set_fast_math): Use __builtin_ia32_fxsave.
* config/i386/crtfastmath.c (set_fast_math): Use __builtin_ia32_fxsave.
	Clear only fxsave.mxcsr_mask.  Use saved mxcsr from fxsave structure
	when appropriate.  Correct structure element types.
	* config/i386/t-crtfm (crtfastmath.o): Compile with -mfxsr, remove
	-minline-all-stringops from compile flags.

From-SVN: r192855
2012-10-26 19:54:50 +02:00
Ralf Corsepius 43a8f1a1c3 config.host (sh*-*-rtems*): Add sh*-*-elf*'s extra_parts.
2012-10-25  Ralf Corsépius <ralf.corsepius@rtems.org>

	* config.host (sh*-*-rtems*): Add sh*-*-elf*'s extra_parts.

From-SVN: r192805
2012-10-25 14:06:06 +02:00
Ralf Corsepius 76c7836112 config.host (sh*-*-rtems*): Add sh*-*-elf*'s extra_parts.
2012-10-25  Ralf Corsépius <ralf.corsepius@rtems.org>

	* config.host (sh*-*-rtems*): Add sh*-*-elf*'s extra_parts.

From-SVN: r192799
2012-10-25 10:08:04 +02:00
Sebastian Huber 6f28886030 config.host (powerpc-*-rtems*): Add rs6000/t-savresfgpr to tmake_file.
2012-10-25  Sebastian Huber  <sebastian.huber@embedded-brains.de>

	* config.host (powerpc-*-rtems*): Add rs6000/t-savresfgpr to
	tmake_file.

From-SVN: r192795
2012-10-25 05:30:23 +02:00
Marcus Shawcroft d507e9a340 AArch64 [8/10] Fixup botched commit.
From-SVN: r192733
2012-10-23 17:36:39 +00:00
Ian Bolton 1e3d5096a3 AArch64 [8/10]
2012-10-23  Ian Bolton  <ian.bolton@arm.com>
	    Jim MacArthur  <jim.macarthur@arm.com>
	    Marcus Shawcroft  <marcus.shawcroft@arm.com>
	    Nigel Stephens  <nigel.stephens@arm.com>
	    Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
	    Richard Earnshaw  <rearnsha@arm.com>
	    Sofiane Naci  <sofiane.naci@arm.com>
	    Stephen Thomas  <stephen.thomas@arm.com>
	    Tejas Belagod  <tejas.belagod@arm.com>
	    Yufeng Zhang  <yufeng.zhang@arm.com>

	* config.host (aarch64*-*-elf, aarch64*-*-linux*): New.
	* config/aarch64/crti.S: New file.
	* config/aarch64/crtn.S: New file.
	* config/aarch64/linux-unwind.h: New file.
	* config/aarch64/sfp-machine.h: New file.
	* config/aarch64/sync-cache.c: New file.
	* config/aarch64/t-aarch64: New file.
	* config/aarch64/t-softfp: New file.


Co-Authored-By: Jim MacArthur <jim.macarthur@arm.com>
Co-Authored-By: Marcus Shawcroft <marcus.shawcroft@arm.com>
Co-Authored-By: Nigel Stephens <nigel.stephens@arm.com>
Co-Authored-By: Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
Co-Authored-By: Richard Earnshaw <rearnsha@arm.com>
Co-Authored-By: Sofiane Naci <sofiane.naci@arm.com>
Co-Authored-By: Stephen Thomas <stephen.thomas@arm.com>
Co-Authored-By: Tejas Belagod <tejas.belagod@arm.com>
Co-Authored-By: Yufeng Zhang <yufeng.zhang@arm.com>

From-SVN: r192729
2012-10-23 17:27:13 +00:00
Hans-Peter Nilsson 8a740f0731 crti.S: Mark program and data addresses using PRELD.
* config/mmix/crti.S: Mark program and data addresses using PRELD.
	Remove typo'd and unnecessary alignment-LOC for .data.  Remove
	no-longer-needed LDBU insns.

From-SVN: r192646
2012-10-21 03:16:47 +00:00
Sebastian Huber 153c839726 config.host (arm*-*-eabi* | arm*-*-symbianelf* | arm*-*-rtemseabi*): Rename "arm*-*-rtemseabi*" to "arm*-*-rtems*".
2012-10-18  Sebastian Huber <sebastian.huber@embedded-brains.de>

	* config.host
	(arm*-*-eabi* | arm*-*-symbianelf* | arm*-*-rtemseabi*): Rename
	"arm*-*-rtemseabi*" to "arm*-*-rtems*".

From-SVN: r192599
2012-10-19 01:17:53 +00:00
Matthew Gretton-Dann 595fefee5d Add basic armv8-a support
2012-10-17  Matthew Gretton-Dann  <matthew.gretton-dann@arm.com>

	* config/arm/lib1funcs.S (__ARM_ARCH__): Define for ARMv8-A.

2012-10-17  Matthew Gretton-Dann  <matthew.gretton-dann@arm.com>

        * gcc.target/arm/ftest-armv8a-arm.c: New testcase.
        * gcc.target/arm/ftest-armv8a-thumb.c: Likewise.
        * gcc.target/arm/ftest-support-arm.h (feature_matrix): Add
        ARMv8-A row.
        * gcc.target/arm/ftest-support-thumb.h (feature_matrix):
        Likewise.
        * gcc.target/arm/ftest-support.h (architecture): Add ARMv8-A.
        * lib/target-supports.exp: Add ARMv8-A architecture expectation.

2012-10-17  Matthew Gretton-Dann  <matthew.gretton-dann@arm.com>
	    Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>

        * config.gcc: Add support for ARMv8 for arm*-*-* targets.
        * config/arm/arm-arches.def: Add armv8-a
        * config/arm/arm-fpus.def: Add fp-armv8, neon-fp-armv8,
        crypto-neon-fp-armv8.  Add crypto field.
        * config/arm/arm-tables.opt: Regenerate.
        * config/arm/arm.c (FL_FOR_ARCH8A): Likewise.
        (arm_arch8): New global variable.
        (ARM_FPU): Add crypto parameter.
        (arm_option_override): Set arm_arch8, update comments.
        * config/arm/arm.h (TARGET_CRYPTO): New macro.
        (arm_fpu_desc): Add crypto field.
        (base_architecture): Add ARMv8 entry.
        (arm_arch8): New variable declaration.
        * config/arm/bpabi.h: ARMv8 supports BE8.
        * doc/invoke.texi: Document ARMv8 options.






Co-Authored-By: Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>

From-SVN: r192558
2012-10-18 10:49:23 +00:00
Matthias Klose 9945a87681 config.gcc: Match arm*-*-linux-* for ARM Linux/GNU.
gcc/
2012-10-15  Matthias Klose  <doko@ubuntu.com>

        * config.gcc: Match arm*-*-linux-* for ARM Linux/GNU.
        * doc/install.texi: Use arm-*-*linux-* instead of arm-*-*linux-gnueabi.

gcc/testsuite/
2012-10-15  Matthias Klose  <doko@ubuntu.com>

        * lib/target-supports.exp (check_profiling_available): Match
        arm*-*-linux-* for ARM Linux/GNU.
        * g++.dg/torture/predcom-1.C: Match arm*-*-linux-* for ARM Linux/GNU.
        * gfortran.dg/enum_10.f90: Likewise.
        * gfortran.dg/enum_9.f90: Likewise.
        * gcc.target/arm/synchronize.c: Likewise.
        * g++.old-deja/g++.jason/enum6.C: Likewise.
        * g++.old-deja/g++.other/enum4.C: Likewise.
        * g++.old-deja/g++.law/enum9.C: Likewise.

gcc/ada/
2012-10-15  Matthias Klose  <doko@ubuntu.com>

        * gcc-interface/Makefile.in: Match arm*-*-linux-*eabi* for
        ARM Linux/GNU.

libgcc/
2012-10-15  Matthias Klose  <doko@ubuntu.com>

        * config.host: Match arm*-*-linux-* for ARM Linux/GNU.

libstdc++-v3/
2012-10-15  Matthias Klose  <doko@ubuntu.com>

        * configure.host: Match arm*-*-linux-* for ARM Linux/GNU.
        * testsuite/20_util/make_signed/requirements/typedefs-2.cc: Likewise.
        * testsuite/20_util/make_unsigned/requirements/typedefs-2.cc: Likewise.

libjava/
2012-10-15  Matthias Klose  <doko@ubuntu.com>

        * configure.ac: Match arm*-*-linux-* for ARM Linux/GNU.
        * configure: Regenerate.

From-SVN: r192475
2012-10-15 21:12:23 +00:00
Pavel Chupin 1183dc2cd8 gthr.m4: New.
* config/gthr.m4: New. Define GCC_AC_THREAD_HEADER.
	    * libgcc/configure: Regenerate.
	    * libgcc/configure.ac: Replace code with GCC_AC_THREAD_HEADER use.
	    * libstdc++-v3/Makefile.in: Regenerate.
	    * libstdc++-v3/acinclude.m4: Replace code with GCC_AC_THREAD_HEADER use.
	    * libstdc++-v3/configure: Regenerate.
	    * libstdc++-v3/doc/Makefile.in: Regenerate.
	    * libstdc++-v3/include/Makefile.am: Regenerate.
	    * libstdc++-v3/include/Makefile.in: Rename variable.
	    * libstdc++-v3/libsupc++/Makefile.in: Regenerate.
	    * libstdc++-v3/po/Makefile.in: Regenerate.
	    * libstdc++-v3/python/Makefile.in: Regenerate.
	    * libstdc++-v3/src/Makefile.in: Regenerate.
	    * libstdc++-v3/src/c++11/Makefile.in: Regenerate.
	    * libstdc++-v3/src/c++98/Makefile.in: Regenerate.
	    * libstdc++-v3/testsuite/Makefile.in: Regenerate.

From-SVN: r192458
2012-10-15 13:10:30 +00:00