Commit Graph

1018 Commits

Author SHA1 Message Date
Claudiu Zissulescu 48c842ab84 [ARC][libgcc] Add support for QuarkSE processor.
libgcc/
2016-11-17  Claudiu Zissulescu  <claziss@synopsys.com>

	* config/arc/dp-hack.h (ARC_OPTFPE): Define.
	(__ARC_NORM__): Use instead ARC_OPTFPE.
	* config/arc/fp-hack.h: Likewise.
	* config/arc/lib1funcs.S (ARC_OPTFPE): Define.
	(__ARC_MPY__): Use it insetead of __ARC700__ and __HS__.

From-SVN: r242547
2016-11-17 14:43:43 +01:00
Alexander Monakov 5012919d0b nvptx backend prerequisites for OpenMP offloading
gcc/
	* config/nvptx/mkoffload.c (main): Check that either OpenACC or OpenMP
	is selected.  Pass -mgomp to offload compiler in OpenMP case.
	* config/nvptx/nvptx-protos.h (nvptx_shuffle_kind): Move enum
	declaration from nvptx.c.
	(nvptx_gen_shuffle): Declare.
	(nvptx_output_set_softstack): Declare.
	* config/nvptx/nvptx.c (nvptx_shuffle_kind): Move to nvptx-protos.h.
	(need_softstack_decl): New variable.
	(need_unisimt_decl): New variable.
	(diagnose_openacc_conflict): New.  Use it...
	(nvptx_option_override): ...here.  Handle TARGET_GOMP.
	(nvptx_encode_section_info): Handle "shared" attribute.
	(write_as_kernel): Restrict to OpenACC target regions.
	(init_softstack_frame): New.
	(nvptx_init_unisimt_predicate): New.
	(write_omp_entry): New.  Use it...
	(nvptx_declare_function_name): ...here to emit OpenMP target region
	entrypoints.  Handle TARGET_SOFT_STACK.  Call
	nvptx_init_unisimt_predicate.
	(nvptx_output_set_softstack): New.
	(nvptx_get_drap_rtx): Return %argp as the DRAP if needed.
	(nvptx_gen_shuffle): Export.
	(nvptx_output_call_insn): Handle COND_EXEC patterns.  Emit instruction
	predicate.
	(nvptx_print_operand): Fix handling of instruction predicates.
	(nvptx_get_unisimt_master): New helper function.
	(nvptx_get_unisimt_predicate): Ditto.
	(nvptx_call_insn_is_syscall_p): Ditto.
	(nvptx_unisimt_handle_set): Ditto.
	(nvptx_reorg_uniform_simt): New.  Transform code for -muniform-simt.
	(nvptx_reorg): Call nvptx_reorg_uniform_simt.
	(nvptx_handle_shared_attribute): New.  Use it...
	(nvptx_attribute_table): ... here (new entry).
	(nvptx_record_offload_symbol): Handle NULL attributes.
	(nvptx_file_end): Handle need_softstack_decl and need_unisimt_decl.
	(nvptx_simt_vf): New.
	(TARGET_SIMT_VF): Define.
	* config/nvptx/nvptx.h (TARGET_CPU_CPP_BUILTINS): Define
	__nvptx_softstack or __nvptx_unisimt__ when -msoft-stack, or resp.
	-muniform-simt option is active.
	(STACK_SIZE_MODE): Define.
	(FIXED_REGISTERS): Adjust.
	(SOFTSTACK_SLOT_REGNUM): New.
	(SOFTSTACK_PREV_REGNUM): New.
	(REGISTER_NAMES): Adjust.
	(struct machine_function): New fields.
	* config/nvptx/nvptx.md (UNSPEC_SET_SOFTSTACK): New.
	(UNSPEC_VOTE_BALLOT): Ditto.
	(UNSPEC_LANEID): Ditto.
	(UNSPECV_NOUNROLL): Ditto.
	(atomic): New attribute.
	(predicable): New attribute.  Generate predicated forms via
	define_cond_exec.
	(br_true): Mark as not predicable.
	(br_false): Ditto.
	(br_true_uni): Ditto.
	(br_false_uni): Ditto.
	(return): Ditto.
	(trap_if_true): Ditto.
	(trap_if_false): Ditto.
	(nvptx_fork): Ditto.
	(nvptx_forked): Ditto.
	(nvptx_joining): Ditto.
	(nvptx_join): Ditto.
	(nvptx_barsync): Ditto.
	(epilogue): Emit stack restore if TARGET_SOFT_STACK.
	(allocate_stack): Implement for TARGET_SOFT_STACK.  Remove unused code.
	(allocate_stack_<mode>): Remove unused pattern.
	(set_softstack_insn): New pattern.
	(restore_stack_block): Handle for TARGET_SOFT_STACK.
	(nvptx_vote_ballot): New pattern.
	(omp_simt_lane): Ditto.
	(omp_simt_last_lane): Ditto.
	(omp_simt_ordered): Ditto.
	(omp_simt_vote_any): Ditto.
	(omp_simt_xchg_bfly): Ditto.
	(omp_simt_xchg_idx): Ditto.
	(nvptx_nounroll): Ditto.
	(atomic_compare_and_swap<mode>_1): Mark with atomic attribute.
	(atomic_exchange<mode>): Ditto.
	(atomic_fetch_add<mode>): Ditto.
	(atomic_fetch_addsf): Ditto.
	(atomic_fetch_<logic><mode>): Ditto.
	* config/nvptx/nvptx.opt: (msoft-stack): New option.
	(muniform-simt): Ditto.
	(mgomp): Ditto.
	* config/nvptx/t-nvptx (MULTILIB_OPTIONS): New.
	* doc/extend.texi (Nvidia PTX Variable Attributes): New section.
	* doc/invoke.texi (msoft-stack): Document.
	(muniform-simt): Document
	(mgomp): Document.
	* doc/tm.texi: Regenerate.
	* doc/tm.texi.in: (TARGET_SIMT_VF): New hook.
	* target.def: Define it.
	* target-insns.def (omp_simt_lane): New.
	(omp_simt_last_lane): New.
	(omp_simt_ordered): New.
	(omp_simt_vote_any): New.
	(omp_simt_xchg_bfly): New.
	(omp_simt_xchg_idx): New.

libgcc/
	* config/nvptx/crt0.c (__main): Setup __nvptx_stacks and __nvptx_uni.
	* config/nvptx/mgomp.c: New file.
	* config/nvptx/t-nvptx: Add mgomp.c

gcc/testsuite/
	* lib/target-supports.exp (check_effective_target_alloca): Use a
	compile test.
	* gcc.target/nvptx/softstack.c: New test.
	* gcc.target/nvptx/decl-shared.c: New test.
	* gcc.target/nvptx/decl-shared-init.c: New test.

From-SVN: r242503
2016-11-16 20:17:00 +03:00
Waldemar Brodkorb 00178b98eb re PR libgcc/68468 (frv/bfin FDPIC toolchain build error)
PR libgcc/68468
	* unwind-dw2-fde-dip.c: Fix build on FDPIC targets.

From-SVN: r242468
2016-11-16 08:01:56 +01:00
Claudiu Zissulescu d64af69fd5 [ARC] [libgcc] Fix defines
libgcc/
2016-11-15  Claudiu Zissulescu  <claziss@synopsys.com>

	* config/arc/lib1funcs.S (__mulsi3): Use feature defines instead
	of checking for cpus.
	(__umulsidi3, __umulsi3_highpart, __udivmodsi4, __divsi3)
	(__modsi3, __clzsi2): Likewise.

From-SVN: r242428
2016-11-15 16:42:17 +01:00
Szabolcs Nagy 9d8f95deca [i386][musl] Add cpuinfo to static libgcc only on *-musl*
The __cpu_indicator_init and __cpu_model symbols are not safe to use
from shared libgcc_s.so from ifunc resolvers, so since gcc-6, only
the definitions from static libgcc.a are used, however the symbols
are kept in libgcc_s as well for backward compatibility (with
appropriate symbol version).  On targets without such backward
compatibility concern add cpuinfo to the static library only (this
avoids running the ctor, reduces libgcc_s size and elf abi concerns
about the versioned symbols).

libgcc/
2016-11-11  Szabolcs Nagy  <szabolcs.nagy@arm.com>

	* config.host (i[3456]86-*-musl*, x86_64-*-musl*): Use
	i386/t-cpuinfo-static instead of i386/t-cpuinfo.
	* config/i386/t-cpuinfo-static: New.

From-SVN: r242268
2016-11-11 17:31:07 +00:00
Martin Liska 7d29f8e3dc Make direct emission of time profiler counter
* libgcov-profiler.c (__gcov_time_profiler): Remove.
	(__gcov_time_profiler_atomic): Likewise.
	* profile.c (instrument_values): Fix coding style.
	(branch_prob): Use renamed function.
	* tree-profile.c (init_ic_make_global_vars): Likewise.
	(gimple_init_edge_profiler): Rename to
	gimple_init_gcov_profiler.
	tree_time_profiler_counter variable declaration.
	(gimple_gen_time_profiler): Rewrite to do a direct gimple code
	emission.
	* value-prof.h: Remove an argument.
	* gcc.dg/no_profile_instrument_function-attr-1.c: Update scanned
	output.
	* gcc.dg/tree-prof/time-profiler-3.c: New test.

From-SVN: r241821
2016-11-03 15:24:22 +00:00
Bernd Edlinger 5de3e2d862 re PR libgcc/78067 (libgcc2 calls count_leading_zero with 0)
2016-11-03  Bernd Edlinger  <bernd.edlinger@hotmail.de>

        PR libgcc/78067
        * libgcc2.c (__floatdisf, __floatdidf): Avoid undefined results from
        count_leading_zeros.

testsuite:
2016-11-03  Bernd Edlinger  <bernd.edlinger@hotmail.de>

        PR libgcc/78067
        * gcc.dg/torture/fp-int-convert.h: Add more conversion tests.

From-SVN: r241817
2016-11-03 12:52:19 +00:00
Uros Bizjak 183624479f Makefile.in (LIB2_DIVMOD_FUNCS): Add _divmoddi4.
* Makefile.in (LIB2_DIVMOD_FUNCS): Add _divmoddi4.
	* libgcc2.c (__divmoddi4): New function.
	* libgcc2.h (__divmoddi4): Declare.
	* libgcc-std.ver.in (GCC_7.0.0): New. Add __PFX_divmoddi4
	and __PFX_divmodti4.

From-SVN: r241804
2016-11-02 23:23:13 +01:00
Florian Weimer 331075711a PR libgcc/78064: Add missing include directive to unwind-c.c
PR libgcc/78064
	* unwind-c.c: Include auto-target.h.

From-SVN: r241491
2016-10-24 20:25:09 +02:00
John David Anglin 4c6d7494fc pa64-hpux-lib.h: New file.
libgcc/
	* config/pa/pa64-hpux-lib.h: New file.  
	(EH_FRAME_SECTION_NAME): Rename to __LIBGCC_EH_FRAME_SECTION_NAME__.
	(DTORS_SECTION_ASM_OP): Rename to __LIBGCC_DTORS_SECTION_ASM_OP__.
	* config.host (tm_file): Add pa/pa64-hpux-lib.h to tm_file on
	hppa*64*-*-hpux11*.
gcc/
	* config/pa/pa64-hpux.h (PA_INIT_FRAME_DUMMY_ASM_OP): Move to
	config/pa/pa64-hpux-lib.h.
	(PA_CRTBEGIN_HACK): Likewise.
	(DTOR_LIST_BEGIN): Likewise.

From-SVN: r241356
2016-10-19 22:52:21 +00:00
Max Filippov 2a26adf1d8 xtensa: don't use unwind-dw2-fde-dip with elf targets
Define LIB2ADDEH_XTENSA_UNWIND_DW2_FDE to unwind-dw2-fde.c in
xtensa/t-elf and to unwind-dw2-fde-dip.c in xtensa/t-linux and use
LIB2ADDEH_XTENSA_UNWIND_DW2_FDE in LIB2ADDEH definition.

This fixes build for elf target with windowed xtensa core that currently
breaks with the following error message:
    
  unwind-dw2-fde-dip.c:36:40: fatal error: elf.h: No such file or directory

2016-10-18  Max Filippov  <jcmvbkbc@gmail.com>
libgcc/
	* config/xtensa/t-elf (LIB2ADDEH_XTENSA_UNWIND_DW2_FDE): New
	definition.
	* config/xtensa/t-linux (LIB2ADDEH_XTENSA_UNWIND_DW2_FDE): New
	definition.
	* config/xtensa/t-windowed (LIB2ADDEH): Use
	LIB2ADDEH_XTENSA_UNWIND_DW2_FDE defined by either xtensa/t-elf
	or xtensa/t-linux.

From-SVN: r241313
2016-10-18 19:12:19 +00:00
Ding-Kai Chen 66192aa129 xtensa: add HW FPU sequences for DIV/SQRT/RECIP/RSQRT
Use new FPU instruction sequences documented in the ISA book to
implement __divsf3, __divdf3, __recipsf2, __recipdf2, __rsqrtsf2,
__rsqrtdf2 and __ieee754_sqrtf and __ieee754_sqrt.

2016-10-18  Ding-Kai Chen  <dkchen@cadence.com>
libgcc/
	* config/xtensa/ieee754-df.S (__recipdf2, __rsqrtdf2,
	__ieee754_sqrt): New functions.
	(__divdf3): Add implementation with new FPU instructions under
	#if XCHAL_HAVE_DFP_DIV.
	* config/xtensa/ieee754-sf.S (__recipsf2, __rsqrtsf2,
	__ieee754_sqrtf): New functions.
	(__divsf3): Add implementation with new FPU instructions under
	#if XCHAL_HAVE_FP_DIV.
	* config/xtensa/t-xtensa (LIB1ASMFUNCS): Add _sqrtf, _recipsf2
	_rsqrtsf2, _sqrt, _recipdf2 and _rsqrtdf2.

From-SVN: r241312
2016-10-18 19:06:33 +00:00
Thomas Preud'homme 4d0cdd0ce6 Move MEMMODEL_* from coretypes.h to memmodel.h
2016-10-13  Thomas Preud'homme  <thomas.preudhomme@arm.com>

    gcc/
    * coretypes.h: Move MEMMODEL_* macros and enum memmodel definition
    into ...
    * memmodel.h: This file.
    * alias.c, asan.c, auto-inc-dec.c, bb-reorder.c, bt-load.c,
      caller-save.c, calls.c, ccmp.c, cfgbuild.c, cfgcleanup.c,
      cfgexpand.c, cfgloopanal.c, cfgrtl.c, cilk-common.c, combine.c,
      combine-stack-adj.c, common/config/aarch64/aarch64-common.c,
      common/config/arm/arm-common.c, common/config/bfin/bfin-common.c,
      common/config/c6x/c6x-common.c, common/config/i386/i386-common.c,
      common/config/ia64/ia64-common.c, common/config/nvptx/nvptx-common.c,
      compare-elim.c, config/aarch64/aarch64-builtins.c,
      config/aarch64/aarch64-c.c, config/aarch64/cortex-a57-fma-steering.c,
      config/arc/arc.c, config/arc/arc-c.c, config/arm/arm-builtins.c,
      config/arm/arm-c.c, config/avr/avr.c, config/avr/avr-c.c,
      config/avr/avr-log.c, config/bfin/bfin.c, config/c6x/c6x.c,
      config/cr16/cr16.c, config/cris/cris.c, config/darwin-c.c,
      config/darwin.c, config/epiphany/epiphany.c,
      config/epiphany/mode-switch-use.c,
      config/epiphany/resolve-sw-modes.c, config/fr30/fr30.c,
      config/frv/frv.c, config/ft32/ft32.c, config/h8300/h8300.c,
      config/i386/i386-c.c, config/i386/winnt.c, config/iq2000/iq2000.c,
      config/lm32/lm32.c, config/m32c/m32c.c, config/m32r/m32r.c,
      config/m68k/m68k.c, config/mcore/mcore.c,
      config/microblaze/microblaze.c, config/mmix/mmix.c,
      config/mn10300/mn10300.c, config/moxie/moxie.c,
      config/msp430/msp430.c, config/nds32/nds32-cost.c,
      config/nds32/nds32-intrinsic.c, config/nds32/nds32-md-auxiliary.c,
      config/nds32/nds32-memory-manipulation.c,
      config/nds32/nds32-predicates.c, config/nds32/nds32.c,
      config/nios2/nios2.c, config/nvptx/nvptx.c, config/pa/pa.c,
      config/pdp11/pdp11.c, config/rl78/rl78.c, config/rs6000/rs6000-c.c,
      config/rx/rx.c, config/s390/s390-c.c, config/s390/s390.c,
      config/sh/sh.c, config/sh/sh-c.c, config/sh/sh-mem.cc,
      config/sh/sh_treg_combine.cc, config/sol2.c, config/spu/spu.c,
      config/stormy16/stormy16.c, config/tilegx/tilegx.c,
      config/tilepro/tilepro.c, config/v850/v850.c, config/vax/vax.c,
      config/visium/visium.c, config/vms/vms-c.c, config/xtensa/xtensa.c,
      coverage.c, cppbuiltin.c, cprop.c, cse.c, cselib.c, dbxout.c, dce.c,
      df-core.c, df-problems.c, df-scan.c, dojump.c, dse.c, dwarf2asm.c,
      dwarf2cfi.c, dwarf2out.c, emit-rtl.c, except.c, explow.c, expmed.c,
      expr.c, final.c, fold-const.c, function.c, fwprop.c, gcse.c,
      ggc-page.c, haifa-sched.c, hsa-brig.c, hsa-gen.c, hw-doloop.c,
      ifcvt.c, init-regs.c, internal-fn.c, ira-build.c, ira-color.c,
      ira-conflicts.c, ira-costs.c, ira-emit.c, ira-lives.c, ira.c, jump.c,
      loop-doloop.c, loop-invariant.c, loop-iv.c, loop-unroll.c,
      lower-subreg.c, lra.c, lra-assigns.c, lra-coalesce.c,
      lra-constraints.c, lra-eliminations.c, lra-lives.c, lra-remat.c,
      lra-spills.c, mode-switching.c, modulo-sched.c, omp-low.c, passes.c,
      postreload-gcse.c, postreload.c, predict.c, print-rtl-function.c,
      recog.c, ree.c, reg-stack.c, regcprop.c, reginfo.c, regrename.c,
      reload.c, reload1.c, reorg.c, resource.c, rtl-chkp.c, rtl-tests.c,
      rtlanal.c, rtlhooks.c, sched-deps.c, sched-rgn.c, sdbout.c,
      sel-sched-ir.c, sel-sched.c, shrink-wrap.c, simplify-rtx.c,
      stack-ptr-mod.c, stmt.c, stor-layout.c, target-globals.c,
      targhooks.c, toplev.c, tree-nested.c, tree-outof-ssa.c,
      tree-profile.c, tree-ssa-coalesce.c, tree-ssa-ifcombine.c,
      tree-ssa-loop-ivopts.c, tree-ssa-loop.c, tree-ssa-reassoc.c,
      tree-ssa-sccvn.c, tree-vect-data-refs.c, ubsan.c, valtrack.c,
      var-tracking.c, varasm.c: Include memmodel.h.
    * genattrtab.c (write_header): Include memmodel.h in generated file.
    * genautomata.c (main): Likewise.
    * gengtype.c (open_base_files): Likewise.
    * genopinit.c (main): Likewise.
    * genconditions.c (write_header): Include memmodel.h earlier in
    generated file.
    * genemit.c (main): Likewise.
    * genoutput.c (output_prologue): Likewise.
    * genpeep.c (main): Likewise.
    * genpreds.c (write_insn_preds_c): Likewise.
    * genrecog.c (write_header): Likewise.
    * Makefile.in (PLUGIN_HEADERS): Include memmodel.h

    gcc/ada/
    * gcc-interface/utils2.c: Include memmodel.h.

    gcc/c-family/
    * c-cppbuiltin.c: Include memmodel.h.
    * c-opts.c: Likewise.
    * c-pragma.c: Likewise.
    * c-warn.c: Likewise.

    gcc/c/
    * c-typeck.c: Include memmodel.h.

    gcc/cp/
    * decl2.c: Include memmodel.h.
    * rtti.c: Likewise.

    gcc/fortran/
    * trans-intrinsic.c: Include memmodel.h.

    gcc/go/
    * go-backend.c: Include memmodel.h.

    libgcc/
    * libgcov-profiler.c: Replace MEMMODEL_* macros by their __ATOMIC_*
    equivalent.
    * config/tilepro/atomic.c: Likewise and stop casting model to
    enum memmodel.

From-SVN: r241121
2016-10-13 14:17:52 +00:00
Joseph Myers 73f01cca84 Always support float128 on ia64 (PR target/77586).
Bug 77586, and previously
<https://gcc.gnu.org/ml/gcc-bugs/2016-08/msg03233.html>, reports
ia64-elf failing to build because of float128_type_node being NULL,
but being used by the back end for __float128.

The global float128_type_node is only available conditionally, if
target hooks indicate TFmode is not only available as a scalar mode
and of the right format, but also supported in libgcc.  The back-end
support, however, expects the type always to be available for
__float128 even if the libgcc support is missing.

Although a target-specific node could be restored in the case where
libgcc support is missing, it seems better to address the missing
libgcc support.  Thus, this patch enables TFmode soft-fp in libgcc
globally for all ia64 targets.  Support for XFmode in libgcc (that is,
for libgcc2.c XFmode functions, not soft-fp) is also enabled for all
ia64 targets so that ia64 no longer needs to define the
TARGET_LIBGCC_FLOATING_MODE_SUPPORTED_P hook.

I've confirmed that ia64-elf builds cc1 with this patch and it passes
-fself-test.  I have not otherwise tested the patch.  It's plausible
that ia64-elf and ia64-freebsd might work as-is, but ia64-vms probably
needs further changes, by someone familiar with VMS shared libraries,
to implement an equivalent of ia64/t-softfp-compat in that case
(avoiding conflicts between __divtf3 from soft-fp and the old alias
for __divxf3).

	PR target/77586
gcc:
	* config/ia64/ia64.c (ia64_libgcc_floating_mode_supported_p)
	(TARGET_LIBGCC_FLOATING_MODE_SUPPORTED_P): Remove.
	* config/ia64/elf.h (IA64_NO_LIBGCC_TFMODE): Likewise.
	* config/ia64/freebsd.h (IA64_NO_LIBGCC_TFMODE): Likewise.
	* config/ia64/vms.h (IA64_NO_LIBGCC_XFMODE)
	(IA64_NO_LIBGCC_TFMODE): Likewise.

libgcc:
	* config.host (ia64*-*-elf*, ia64*-*-freebsd*, ia64-hp-*vms*): Use
	soft-fp.

From-SVN: r240955
2016-10-10 23:43:07 +01:00
Andreas Tobler b20e75328b configure.ac: Add aarch64-*-freebsd*.
toplevel:

2016-10-10  Andreas Tobler <andreast@gcc.gnu.org>

    * configure.ac: Add aarch64-*-freebsd*.
    * configure: Regenerate.

gcc:

2016-10-10  Andreas Tobler  <andreast@gcc.gnu.org>

    * config.gcc: Add aarch64-*-freebsd* support.
    * config.host: Likewise.
    * config/aarch64/aarch64-freebsd.h: New file.
    * config/aarch64/t-aarch64-freebsd: Ditto.

libgcc:

2016-10-10  Andreas Tobler  <andreast@gcc.gnu.org>

    * config.host: Add support for aarch64-*-freebsd*.

From-SVN: r240949
2016-10-10 23:31:17 +02:00
Andreas Schwab a786cec431 crtbegin.S (__do_jv_register_classes): Remove.
* config/ia64/crtbegin.S (__do_jv_register_classes): Remove.
(.section .init_array): Don't call __do_jv_register_classes.
(.section .init): Likewise.

From-SVN: r240771
2016-10-05 07:50:34 +00:00
Jakub Jelinek 5a79befbf4 defaults.h (JCR_SECTION_NAME, [...]): Remove.
gcc/
	* defaults.h (JCR_SECTION_NAME, TARGET_USE_JCR_SECTION): Remove.
	* system.h (JCR_SECTION_NAME, TARGET_USE_JCR_SECTION): Poison.
	* doc/tm.texi.in (TARGET_USE_JCR_SECTION): Remove.
	* doc/tm.texi: Regenerated.
	* config/i386/mingw32.h (TARGET_USE_JCR_SECTION): Remove.
	* config/i386/cygming.h (TARGET_USE_JCR_SECTION): Remove.
	* config/darwin.h (JCR_SECTION_NAME): Remove.
	* config/pa/pa64-hpux.h (JCR_SECTION_NAME): Remove.
	* config/rs6000/aix71.h (TARGET_USE_JCR_SECTION): Remove.
	* config/rs6000/aix51.h (TARGET_USE_JCR_SECTION): Remove.
	* config/rs6000/aix52.h (TARGET_USE_JCR_SECTION): Remove.
	* config/rs6000/aix53.h (TARGET_USE_JCR_SECTION): Remove.
	* config/rs6000/aix61.h (TARGET_USE_JCR_SECTION): Remove.
gcc/c-family/
	* c-cppbuiltin.c (c_cpp_builtins): Don't define
	__LIBGCC_JCR_SECTION_NAME__.
libgcc/
	* config/i386/cygming-crtbegin.c (_Jv_RegisterClasses): Remove.
	(__JCR_LIST__): Remove.
	(__gcc_register_frame): Don't attempt to _Jv_RegisterClasses.
	* config/i386/cygming-crtend.c (__JCR_END__): Remove.
	* config/ia64/crtbegin.S (__JCR_LIST__): Remove.
	* config/ia64/crtend.S (__JCR_END__): Remove.
	* crtstuff.c: Remove __LIBGCC_JCR_SECTION_NAME__ from preprocessor
	conditionals.
	(__JCR_LIST__, __JCR_END__): Remove.
	(frame_dummy): Don't attempt to _Jv_RegisterClasses.
	(__do_global_ctors_1): Likewise.

From-SVN: r240739
2016-10-04 09:49:44 +02:00
Uros Bizjak e0ab375340 cpuinfo.c (__get_cpuid_output): Remove.
* config/i386/cpuinfo.c (__get_cpuid_output): Remove.
	(__cpu_indicator_init): Call __get_cpuid, not __get_cpuid_output.

From-SVN: r240590
2016-09-28 20:22:16 +02:00
Martin Liska 8c9434c2f9 gcov: dump in a static dtor instead of in an atexit handler
PR gcov-profile/7970
	PR gcov-profile/16855
	PR gcov-profile/44779
	* g++.dg/gcov/pr16855.C: New test.
	* coverage.c (build_gcov_exit_decl): New function.
	(coverage_obj_init): Call the function and generate __gcov_exit
	destructor.
	* doc/gcov.texi: Document when __gcov_exit function is called.
	* libgcov-driver.c (__gcov_init): Do not register a atexit
	handler.
	(__gcov_exit): Rename from gcov_exit.
	* libgcov.h (__gcov_exit): Declare.

From-SVN: r240529
2016-09-27 11:07:11 +00:00
Martin Liska 56b653f1a3 Remove __gcov_merge_delta (PR bootstrap/77749)
PR bootstrap/77749
	* gcov-counter.def: Remove GCOV_COUNTER_V_DELTA.
	PR bootstrap/77749
	* Makefile.in: Remove _gcov_merge_delta.
	* libgcov-merge.c (void __gcov_merge_delta): Remove.
	* libgcov-util.c (__gcov_delta_counter_op): Remove.
	* libgcov.h: Remove declaration of __gcov_merge_delta.

From-SVN: r240524
2016-09-27 10:04:39 +00:00
Eric Botcazou 7e02fd1b7b configure.ac: Do not create links, only substitute the filenames.
* configure.ac: Do not create links, only substitute the filenames.
	* configure: Regenerate.
	* Makefile.in: Assign the substitution results to variables.
	(LIBGCC_LINKS): Define.
	(enable-execute-stack.c): New rule.
	(unwind.h): Likewise.
	(md-unwind-support.h): Likewise.
	(sfp-machine.h): Likewise.
	(gthr-default.h): Likewise.
	Add $(LIBGCC_LINKS) to the prerequisites of all object files and
	unwind.h as prerequisite of install-unwind_h-forbuild.

From-SVN: r240312
2016-09-21 12:53:20 +00:00
Jakub Jelinek 299910482f re PR libgcc/71744 (Concurrently throwing exceptions is not scalable)
PR libgcc/71744
	* unwind-dw2-fde.c (ATOMIC_FDE_FAST_PATH): Define if __register_frame*
	is not the primary registry and atomics are available.
	(any_objects_registered): New variable.
	(__register_frame_info_bases, __register_frame_info_table_bases):
	Atomically store 1 to any_objects_registered after registering first
	unwind info.
	(_Unwind_Find_FDE): Return early if any_objects_registered is 0.

From-SVN: r240193
2016-09-16 21:17:47 +02:00
James Greenhalgh 0abcd6cc73 [Patch libgcc] Enable HCmode multiply and divide (mulhc3/divhc3)
This patch arranges for half-precision complex multiply and divide
routines to be built if __LIBGCC_HAS_HF_MODE__.  This will be true
if the target supports the _Float16 type.

libgcc/

	PR target/63250
	*  Makefile.in (lib2funcs): Build _mulhc3 and _divhc3.
	* libgcc2.h (LIBGCC_HAS_HF_MODE): Conditionally define.
	(HFtype): Likewise.
	(HCtype): Likewise.
	(__divhc3): Likewise.
	(__mulhc3): Likewise.
	* libgcc2.c: Support _mulhc3 and _divhc3.

From-SVN: r240043
2016-09-09 09:40:22 +00:00
Joseph Myers d758aeb5ff Correct libgcc complex multiply excess precision handling (PR libgcc/77519).
libgcc complex multiply is meant to eliminate excess
precision from certain internal values by forcing them to memory in
exactly those cases where the type has excess precision.  But in
https://gcc.gnu.org/ml/gcc-patches/2014-09/msg01894.html I
accidentally inverted the logic so that values get forced to memory in
exactly the cases where it's not needed.  (This is a pessimization in
the no-excess-precision case, in principle could lead to bad results
depending on code generation in the excess-precision case.  Note: I do
not have a test demonstrating bad results.)

Bootstrapped with no regressions on x86_64-pc-linux-gnu.  Code size
went down on x86_64 as expected; old sizes:

   text    data     bss     dec     hex filename
    887       0       0     887     377 _muldc3.o
    810       0       0     810     32a _mulsc3.o
   2032       0       0    2032     7f0 _multc3.o
    983       0       0     983     3d7 _mulxc3.o

New sizes:

    847       0       0     847     34f _muldc3.o
    770       0       0     770     302 _mulsc3.o
   2032       0       0    2032     7f0 _multc3.o
    951       0       0     951     3b7 _mulxc3.o

	PR libgcc/77519
	* libgcc2.c (NOTRUNC): Invert settings.

From-SVN: r240033
2016-09-08 00:02:56 +01:00
Martin Liska 7fe76f6ae8 Detect whether target can use -fprofile-update=atomic
PR gcov-profile/77378
	PR gcov-profile/77466
	* libgcov-profiler.c: Use __GCC_HAVE_SYNC_COMPARE_AND_SWAP_{4,8} to
	conditionaly enable/disable *_atomic functions.
	PR gcov-profile/77378
	PR gcov-profile/77466
	* tree-profile.c (tree_profiling): Detect whether target can use
	-fprofile-update=atomic.
	PR gcov-profile/77378
	PR gcov-profile/77466
	* gcc.dg/profile-update-warning.c: New test.

From-SVN: r240008
2016-09-06 14:13:21 +00:00
Joseph Myers 21184026d5 Always support float128 on x86.
In <https://gcc.gnu.org/ml/gcc-bugs/2016-08/msg03233.html>, Nick
reported i386-elf and ia64-elf failing to build because of
float128_type_node being NULL, but being used by the back end for
__float128.

The global float128_type_node is only available conditionally, if
target hooks indicate TFmode is not only available as a scalar mode
and of the right format, but also supported in libgcc.  The back-end
support, however, expects the type always to be available for
__float128 even if the libgcc support is missing.

Although a target-specific node could be restored in the case where
libgcc support is missing, it seems better to address the missing
libgcc support.  Thus, this patch enables TFmode soft-fp in libgcc
globally for all x86 targets - the only special cases needed being for
targets that use soft-fp for SFmode and DFmode, one of which already
had the support for TFmode as well (so I based the i[34567]86-*-rtems*
configuration on that present for i[34567]86-*-elfiamcu).  The i386
implementation of TARGET_LIBGCC_FLOATING_MODE_SUPPORTED_P is then
removed as no longer needed.

I can provide such a patch for ia64 if useful, but am not in a
position to test it (and while I'm reasonably confident that enabling
this support would be right for ia64-elf and ia64-freebsd, I've no
real idea if enabling libgcc support for TFmode, with or without also
enabling it for XFmode, would be safe for ia64-vms).

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

gcc:
	* config/i386/i386.c (ix86_libgcc_floating_mode_supported_p)
	(TARGET_LIBGCC_FLOATING_MODE_SUPPORTED_P): Remove.
	* config/i386/i386elf.h (IX86_MAYBE_NO_LIBGCC_TFMODE): Likewise.
	* config/i386/lynx.h (IX86_MAYBE_NO_LIBGCC_TFMODE): Likewise.
	* config/i386/netbsd-elf.h (IX86_MAYBE_NO_LIBGCC_TFMODE):
	Likewise.
	* config/i386/netbsd64.h (IX86_MAYBE_NO_LIBGCC_TFMODE): Likewise.
	* config/i386/nto.h (IX86_MAYBE_NO_LIBGCC_TFMODE): Likewise.
	* config/i386/openbsd.h (IX86_MAYBE_NO_LIBGCC_TFMODE): Likewise.
	* config/i386/rtemself.h (IX86_NO_LIBGCC_TFMODE): Likewise.
	* config/i386/vxworks.h (IX86_MAYBE_NO_LIBGCC_TFMODE): Likewise.

libgcc:
	* config.host (i[34567]86-*-* | x86_64-*-*): Enable TFmode soft-fp
	where not already enabled.

From-SVN: r239775
2016-08-26 12:13:42 +01:00
Szabolcs Nagy 726f49c3d9 [mips] Fix linux header use in libgcc
libgcc/
	* config/mips/linux-unwind.h: Use sys/syscall.h.

From-SVN: r239759
2016-08-25 14:08:27 +00:00
Joseph Myers feeb62681c Update soft-fp from glibc (PR libgcc/77265).
This patch updates soft-fp from glibc, bringing in the fix for PR
libgcc/77265, XFmode extension to TFmode wrongly turning an infinity
into a NaN.  A test for that bug is added.

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

	PR libgcc/77265
gcc/testsuite:
	* gcc.dg/torture/float128-extend-inf.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/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: r239513
2016-08-16 22:30:56 +01:00
Gilles Gouaillardet 2e6fc1acd0 gcov-tool: Do not segfault in merge operation (PR
PR gcov-profile/67097
	* libgcov-util.c (gcov_profile_merge): Skip missing files.

From-SVN: r239478
2016-08-15 11:23:27 +00:00
Martin Liska a266236e85 Add new *_atomic counter update function
PR gcov-profile/58306
	* Makefile.in: New functions (modules) are added.
	* libgcov-profiler.c (__gcov_interval_profiler_atomic): New
	function.
	(__gcov_pow2_profiler_atomic): New function.
	(__gcov_one_value_profiler_body): New argument is instroduced.
	(__gcov_one_value_profiler): Call with the new argument.
	(__gcov_one_value_profiler_atomic): Likewise.
	(__gcov_indirect_call_profiler_v2): Likewise.
	(__gcov_time_profiler_atomic): New function.
	(__gcov_average_profiler_atomic): Likewise.
	(__gcov_ior_profiler_atomic): Likewise.
	* libgcov.h: Declare the aforementioned functions.
	PR gcov-profile/58306
	* gcc.dg/tree-prof/val-profiler-threads-1.c: New test.
	PR gcov-profile/58306
	* tree-profile.c (gimple_init_edge_profiler): Create conditionally
	atomic variants of profile update functions.

From-SVN: r239324
2016-08-10 13:14:56 +00:00
Martin Liska e0c8eebff7 Fix typo in gcov.texi
* doc/gcov.texi: Change _gcov_dump to __gcov_dump and
	_gcov_reset to __gcov_reset.
	* doc/gcov-tool.texi: Fix typo.
	* libgcov-util.c: Fix typo and GNU coding style.

From-SVN: r239307
2016-08-09 21:02:24 +00:00
Martin Liska 6dce6418c5 Remove __gcov_indirect_call_profiler
* Makefile.in: Remove __gcov_indirect_call_profiler.
	* libgcov-profiler.c (__gcov_indirect_call_profiler): Remove
	function.
	* libgcov.h: And the declaration of the function.

From-SVN: r239306
2016-08-09 21:01:19 +00:00
Martin Liska dcb1e1379e Fix POW2 histogram
* gcc.dg/tree-prof/val-prof-8.c: New test.
	* value-prof.c (dump_histogram_value): Swap pow2 and non-pow2
	values.
	* libgcov-profiler.c (__gcov_pow2_profiler): Consider 0 as not
	power of two.

From-SVN: r239304
2016-08-09 20:57:14 +00:00
Bill Schmidt d6e69705e2 _divkc3.c: Add copyright/license boilerplate.
2016-07-29  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>

	* config/rs6000/_divkc3.c: Add copyright/license boilerplate.
	* config/rs6000/_mulkc3.c: Likewise.

From-SVN: r238894
2016-07-29 20:15:54 +00:00
Georg-Johann Lay 96aa1f9558 lib1funcs.S (__muldi3): No need to clear zero_reg as previous call to __umulhisi3 already cleared it.
* config/avr/lib1funcs.S (__muldi3) [have MUL]: No need to clear
	zero_reg as previous call to __umulhisi3 already cleared it.

From-SVN: r238850
2016-07-29 09:14:02 +00:00
Aurelien Jarno a1b01d3403 [ARM] Fix PR target/59833
For Aurelien Jarno <aurelien@aurel32.net>

On ARM soft-float, the float to double conversion doesn't convert a sNaN
to qNaN as the IEEE Std 754 standard mandates:

"Under default exception handling, any operation signaling an invalid
operation exception and for which a floating-point result is to be
delivered shall deliver a quiet NaN."

Given the soft float ARM code ignores exceptions and always provides a
result, a float to double conversion of a signaling NaN should return a
quiet NaN. Fix this in extendsfdf2.

gcc/ChangeLog:

	PR target/59833
	* config/arm/ieee754-df.S (extendsfdf2): Convert sNaN to qNaN.

gcc/testsuite/ChangeLog:

	* gcc.dg/pr59833.c: New testcase.

From-SVN: r238584
2016-07-21 08:27:47 +00:00
Nick Clifton 985a47b297 config.host (m32r): Add m32r/t-m32r to tmake_file.
* config.host (m32r): Add m32r/t-m32r to tmake_file.
	Add crtinit.o and crtfini.o to extra_parts.

From-SVN: r238478
2016-07-19 16:07:40 +00:00
Bill Schmidt f906f5edd3 _divkc3.c: New.
[libgcc]

2016-07-12  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>

	* config/rs6000/_divkc3.c: New.
	* config/rs6000/_mulkc3.c: New.
	* config/rs6000/quad-float128.h: Define TFtype; declare _mulkc3
	and _divkc3.
	* config/rs6000/t-float128: Add _mulkc3 and _divkc3 to
	fp128_ppc_funcs.

[gcc/testsuite]

2016-07-12  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>

	* gcc.target/powerpc/divkc3-1.c: New.
	* gcc.target/powerpc/mulkc3-1.c: New.

From-SVN: r238253
2016-07-12 16:05:18 +00:00
Hale Wang 827424041e lib1funcs.S: Add new wrapper.
2016-07-11  Hale Wang  <hale.wang@arm.com>
	    Andre Vieira  <andre.simoesdiasvieira@arm.com>

	* config/arm/lib1funcs.S: Add new wrapper.

Co-Authored-By: Andre Vieira <andre.simoesdiasvieira@arm.com>

From-SVN: r238215
2016-07-11 17:11:31 +00:00
Thomas Preud'homme 05a437c1f3 arm-arches.def (armv8-m.base): Define new architecture.
2016-07-07  Thomas Preud'homme  <thomas.preudhomme@arm.com>

    gcc/
    * config/arm/arm-arches.def (armv8-m.base): Define new architecture.
    (armv8-m.main): Likewise.
    (armv8-m.main+dsp): Likewise.
    * config/arm/arm-protos.h (FL_FOR_ARCH8M_BASE): Define.
    (FL_FOR_ARCH8M_MAIN): Likewise.
    * config/arm/arm-tables.opt: Regenerate.
    * config/arm/bpabi.h: Add armv8-m.base, armv8-m.main and
    armv8-m.main+dsp to BE8_LINK_SPEC.
    * config/arm/arm.h (TARGET_HAVE_LDACQ): Exclude ARMv8-M.
    (enum base_architecture): Add BASE_ARCH_8M_BASE and BASE_ARCH_8M_MAIN.
    * config/arm/arm.c (arm_arch_name): Increase size to work with ARMv8-M
    Baseline and Mainline.
    (arm_option_override_internal): Also disable arm_restrict_it when
    !arm_arch_notm.  Update comment for -munaligned-access to also cover
    ARMv8-M Baseline.
    (arm_file_start): Increase buffer size for printing architecture name.
    * doc/invoke.texi: Document architectures armv8-m.base, armv8-m.main
    and armv8-m.main+dsp.
    (mno-unaligned-access): Clarify that this is disabled by default for
    ARMv8-M Baseline architectures as well.

    gcc/testsuite/
    * lib/target-supports.exp: Generate add_options_for_arm_arch_FUNC and
    check_effective_target_arm_arch_FUNC_multilib for ARMv8-M Baseline and
    ARMv8-M Mainline architectures.

    libgcc/
    * config/arm/lib1funcs.S (__ARM_ARCH__): Define to 8 for ARMv8-M.

From-SVN: r238081
2016-07-07 08:54:40 +00:00
Thomas Preud'homme 3d16d9ec3c lib1funcs.S (HAVE_ARM_CLZ): Define for ARMv6* or later and ARMv5t* rather than for a fixed list of...
2016-07-07  Thomas Preud'homme  <thomas.preudhomme@arm.com>

    libgcc/
    * config/arm/lib1funcs.S (HAVE_ARM_CLZ): Define for ARMv6* or later
    and ARMv5t* rather than for a fixed list of architectures.

From-SVN: r238080
2016-07-07 08:54:28 +00:00
Thomas Preud'homme 6f49395177 elf.h: Use __ARM_ARCH_ISA_THUMB and __ARM_ARCH_ISA_ARM to decide whether to prevent...
2016-07-07  Thomas Preud'homme  <thomas.preudhomme@arm.com>

    gcc/
    * config/arm/elf.h: Use __ARM_ARCH_ISA_THUMB and __ARM_ARCH_ISA_ARM to
    decide whether to prevent some libgcc routines being included for some
    multilibs rather than __ARM_ARCH_6M__ and add comment to indicate the
    link between this condition and the one in
    libgcc/config/arm/lib1func.S.

    gcc/testsuite/
    * lib/target-supports.exp (check_effective_target_arm_cortex_m): Use
    __ARM_ARCH_ISA_ARM to test for Cortex-M devices.

    libgcc/
    * config/arm/bpabi-v6m.S: Clarify what architectures is the
    implementation suitable for.
    * config/arm/lib1funcs.S (__prefer_thumb__): Define among other cases
    for all Thumb-1 only targets.
    (NOT_ISA_TARGET_32BIT): Define for Thumb-1 only targets.
    (THUMB_LDIV0): Test for NOT_ISA_TARGET_32BIT rather than
    __ARM_ARCH_6M__.
    (EQUIV): Likewise.
    (ARM_FUNC_ALIAS): Likewise.
    (umodsi3): Add check to __ARM_ARCH_ISA_THUMB != 1 to guard the idiv
    version.
    (modsi3): Likewise.
    (clzsi2): Test for NOT_ISA_TARGET_32BIT rather than __ARM_ARCH_6M__.
    (clzdi2): Likewise.
    (ctzsi2): Likewise.
    (L_interwork_call_via_rX): Test for __ARM_ARCH_ISA_ARM rather than
    __ARM_ARCH_6M__ in guard for checking whether it is defined.
    (final includes): Test for NOT_ISA_TARGET_32BIT rather than
    __ARM_ARCH_6M__ and add comment to indicate the connection between
    this condition and the one in gcc/config/arm/elf.h.
    * config/arm/libunwind.S: Test for __ARM_ARCH_ISA_THUMB and
    __ARM_ARCH_ISA_ARM rather than __ARM_ARCH_6M__.
    * config/arm/t-softfp: Likewise.

From-SVN: r238079
2016-07-07 08:54:18 +00:00
Trevor Saunders 1770511a8a remove unused CTOR_LISTS_DEFINED_EXTERNALLY macro
The last target to use this was i386-interix, so since that is gone we
don't need this anymore.

libgcc/ChangeLog:

2016-07-06  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>

	* libgcc2.c (SYMBOL__MAIN): Remove checks for
	CTOR_LISTS_DEFINED_EXTERNALLY.

From-SVN: r238067
2016-07-06 23:55:52 +00:00
Walter Lee ba6be749f9 linux.h: Do not include arch/icache.h
gcc/ChangeLog
	* config/tilegx/linux.h: Do not include arch/icache.h
	(CLEAR_INSN_CACHE): Provide inlined definition directly.
	* config/tilepro/linux.h: Do not include arch/icache.h
	(CLEAR_INSN_CACHE): Provide inlined definition directly.

libgcc/ChangeLog
	* config/tilepro/atomic.h: Do not include arch/spr_def.h and
	asm/unistd.h.
	(SPR_CMPEXCH_VALUE): Define for tilegx.
	(__NR_FAST_cmpxchg): Define for tilepro.
	(__NR_FAST_atomic_update): Define for tilepro.
	(__NR_FAST_cmpxchg64): Define for tilepro.

From-SVN: r237824
2016-06-28 16:20:58 +00:00
Jakub Sejdak a34c0db51e config.host: Add suport for arm*-*-phoenix* targets.
2016-06-23  Jakub Sejdak  <jakub.sejdak@phoesys.com>

   * config.host: Add suport for arm*-*-phoenix* targets.

From-SVN: r237729
2016-06-23 07:32:58 +00:00
Trevor Saunders 0609abdad8 remove mep-* support
libgcc/ChangeLog:

2016-06-21  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>

	* config.host: Remove support for mep-*.
	* config/mep/lib1funcs.S: Remove.
	* config/mep/lib2funcs.c: Remove.
	* config/mep/t-mep: Remove.
	* config/mep/tramp.c: Remove.

gcc/ChangeLog:

2016-06-21  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>

	* common/config/mep/mep-common.c: Remove.
	* config.gcc: Remove mep-* support.
	* config/mep/constraints.md: Remove.
	* config/mep/default.h: Remove.
	* config/mep/intrinsics.h: Remove.
	* config/mep/intrinsics.md: Remove.
	* config/mep/ivc2-template.h: Remove.
	* config/mep/mep-c5.cpu: Remove.
	* config/mep/mep-core.cpu: Remove.
	* config/mep/mep-default.cpu: Remove.
	* config/mep/mep-ext-cop.cpu: Remove.
	* config/mep/mep-intrin.h: Remove.
	* config/mep/mep-ivc2.cpu: Remove.
	* config/mep/mep-pragma.c: Remove.
	* config/mep/mep-protos.h: Remove.
	* config/mep/mep.c: Remove.
	* config/mep/mep.cpu: Remove.
	* config/mep/mep.h: Remove.
	* config/mep/mep.md: Remove.
	* config/mep/mep.opt: Remove.
	* config/mep/predicates.md: Remove.
	* config/mep/t-mep: Remove.
	* doc/install.texi: Remove mep-* documentation.
	* doc/md.texi: Likewise.

gcc/testsuite/ChangeLog:

2016-06-21  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>

	* gcc.dg/tree-ssa/forwprop-28.c: Remove mep-* support.
	* gcc.dg/tree-ssa/reassoc-32.c: Likewise.
	* gcc.dg/tree-ssa/reassoc-33.c: Likewise.
	* gcc.dg/tree-ssa/reassoc-34.c: Likewise.
	* gcc.dg/tree-ssa/reassoc-35.c: Likewise.
	* gcc.dg/tree-ssa/reassoc-36.c: Likewise.
	* gcc.dg/tree-ssa/ssa-ifcombine-ccmp-1.c: Likewise.
	* gcc.dg/tree-ssa/ssa-ifcombine-ccmp-2.c: Likewise.
	* gcc.dg/tree-ssa/ssa-ifcombine-ccmp-3.c: Likewise.
	* gcc.dg/tree-ssa/ssa-ifcombine-ccmp-4.c: Likewise.
	* gcc.dg/tree-ssa/ssa-ifcombine-ccmp-5.c: Likewise.
	* gcc.dg/tree-ssa/ssa-ifcombine-ccmp-6.c: Likewise.
	* gcc.dg/tree-ssa/ssa-thread-11.c: Likewise.
	* gcc.dg/tree-ssa/vrp87.c: Likewise.
	* lib/target-supports.exp: Likewise.

contrib/ChangeLog:

2016-06-21  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>

	* config-list.mk: Stop testing mep-elf.

libstdc++-v3/ChangeLog:

2016-06-21  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>

	* configure.host: Remove mep-* support.

From-SVN: r237666
2016-06-21 21:57:49 +00:00
Trevor Saunders 3e32693501 remove avr-rtems support
contrib/ChangeLog:

2016-06-21  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>

	* config-list.mk: Stop testing avr-rtems.

libgcc/ChangeLog:

2016-06-21  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>

	* config.host: Remove support for avr-rtems.
	* config/avr/t-rtems: Remove.

ChangeLog:

2016-06-21  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>

	* configure: Regenerate.
	* configure.ac: Remove support for avr-rtems.

gcc/ChangeLog:

2016-06-21  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>

	* config.gcc: Remove support for avr-rtems.
	* config/avr/gen-avr-mmcu-specs.c: Likewise.
	* config/avr/rtems.h: Remove.
	* config/avr/t-rtems: Remove.

contrib/header-tools/ChangeLog:

2016-06-21  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>

	* README: Remove references to avr-rtems.
	* reduce-headers: Likewise.

From-SVN: r237665
2016-06-21 21:57:44 +00:00
Trevor Saunders 914b155ca9 remove m32-rtems support
libgcc/ChangeLog:

2016-06-21  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>

	* config.host: Remove m32r-rtems support.

gcc/ChangeLog:

2016-06-21  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>

	* config.gcc: Remove m32r-rtems support.
	* config/m32r/rtems.h: Remove.

contrib/ChangeLog:

2016-06-21  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>

	* config-list.mk: Stop testing m32r-rtems.

From-SVN: r237664
2016-06-21 21:57:37 +00:00
Trevor Saunders 5ebf89bde6 remove h8300-rtems support
contrib/ChangeLog:

2016-06-21  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>

	* config-list.mk: Remove h8300-rtems support.

libgcc/ChangeLog:

2016-06-21  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>

	* config.host: Remove h8300-rtems support.

gcc/ChangeLog:

2016-06-21  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>

	* config.gcc: Remove h8300-rtems support.
	* config/h8300/rtems.h: Remove.
	* config/h8300/t-rtems: Remove.

From-SVN: r237663
2016-06-21 21:57:34 +00:00
Trevor Saunders 8466af0668 remove knetbsd support
gcc/ChangeLog:

2016-06-21  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>

	* config.gcc: Remove support for knetbsd.
	* configure.ac: Likewise.
	* config/i386/knetbsd-gnu.h: Remove.  * config/i386/knetbsd-gnu64.h: Remove.
	* config/knetbsd-gnu.h: Remove.
	* configure: Regenerate.

libgcc/ChangeLog:

2016-06-21  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>

	* config.host: Remove support for knetbsd.

libstdc++-v3/ChangeLog:

2016-06-21  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>

	* configure: Regenerate.
	* configure.host: Remove support for knetbsd.
	* crossconfig.m4: Likewise.

contrib/ChangeLog:

2016-06-21  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>

	* config-list.mk: stop testing knetbsd.

From-SVN: r237662
2016-06-21 21:57:30 +00:00
Trevor Saunders d980e73865 remove support for targeting openbsd 2 or 3
contrib/ChangeLog:

2016-06-21  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>

	* config-list.mk: Stop testing openbsd3.0.

libgcc/ChangeLog:

2016-06-21  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>

	* config.host: Remove support for openbsd 2 and 3.

gcc/ChangeLog:

2016-06-21  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>

	* config.gcc: Remove support for openbsd 2 and 3.
	* config/openbsd-oldgas.h: Remove.

From-SVN: r237661
2016-06-21 21:57:25 +00:00
Trevor Saunders ee2499b4d4 remove support for the interix target
contrib/ChangeLog:

2016-06-21  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>

	* config-list.mk: Remove interix target.

libgcc/ChangeLog:

2016-06-21  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>

	* config.host: Remove interix support.
	* config/i386/t-interix: Remove.

config/ChangeLog:

2016-06-21  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>

	* elf.m4: Remove interix support.
	* picflag.m4: Likewise.

fixincludes/ChangeLog:

2016-06-21  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>

	* mkfixinc.sh: Remove interix support.

gcc/ChangeLog:

2016-06-21  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>

	* config.gcc: Remove interix support.
	* config/i386/i386-interix.h: Remove.
	* config/i386/interix.opt: Remove.
	* config/i386/t-interix: Remove.
	* configure: Regenerate.
	* configure.ac: Remove interix support.
	* doc/install.texi: Remove interix documentation.

gcc/testsuite/ChangeLog:

2016-06-21  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>

	* gcc.dg/attr-ms_struct-1.c: Stop testing interix.
	* gcc.dg/attr-ms_struct-2.c: Likewise.
	* gcc.dg/attr-ms_struct-packed1.c: Likewise.
	* gcc.dg/bf-ms-attrib.c: Likewise.
	* gcc.dg/bf-ms-layout-2.c: Likewise.
	* gcc.dg/bf-ms-layout-3.c: Likewise.
	* gcc.dg/bf-ms-layout.c: Likewise.
	* gcc.dg/bf-no-ms-layout.c: Likewise.
	* gcc.target/i386/bitfield1.c: Likewise.
	* gcc.target/i386/bitfield2.c: Likewise.
	* gcc.target/i386/bitfield3.c: Likewise.

From-SVN: r237660
2016-06-21 21:57:20 +00:00
John David Anglin 9f92937bdc fptr.c (__canonicalize_funcptr_for_compare): Don't set least-significant bit in function pointer for fixup.
* config/pa/fptr.c (__canonicalize_funcptr_for_compare): Don't set
	least-significant bit in function pointer for fixup.

From-SVN: r237574
2016-06-18 17:49:58 +00:00
Uros Bizjak 7d6aa9a605 * Partially revert my previous commit.
From-SVN: r237418
2016-06-14 01:11:27 +02:00
Uros Bizjak 385c7747b7 i386-builtin-types.def (INT_FTYPE_FLOAT128): New function type.
* config/i386/i386-builtin-types.def (INT_FTYPE_FLOAT128):
	New function type.
	* config/i386/i386.c (enum ix86_builtins) [IX86_BUILTIN_SIGNBITQ]: New.
	(ix86_init_builtins): Add __builtin_signbitq function.
	(ix86_expand_args_builtin): Handle INT_FTYPE_FLOAT128.
	(ix86_expand_builtin): Handle IX86_BUILTIN_SIGNBITQ.
	* config/i386/i386.md (signbittf2): New expander.
	* config/i386/sse.md (ptesttf2): New insn pattern.
	* doc/extend.texi (x86 Built-in Functions): Document
	__builtin_signbitq.

libgcc/ChangeLog:

	* config.host (i[34567]86-*-* | x86_64-*-*): Always include
	i386/${host_address}/t-softfp in tmake_file.
	* config/i386/32/t-softfp: Update comment for __builtin_copysignq.
	* config/i386/32/tf-signs.c: Add __signbittf2 fallback function.
	* config/i386/64/t-softfp: New file.
	* config/i386/64/tf-signs.c: Ditto.
	* config/i386/libgcc-bsd.ver: Add __signbittf2.
	* config/i386/libgcc-glibc.ver: Ditto.
	* config/i386/libgcc-sol2.ver: Ditto.

testsuite/ChangeLog:

	* gcc.target/i386/float128-3.c: New test.
	* gcc.target/i386/quad-sse4.c: Ditto.
	* gcc.target/i386/quad-sse.c: Use -msse instead of -msse2.
	Update scan strings.

From-SVN: r237415
2016-06-13 23:34:07 +02:00
Aaron Conole 0a0ec53d12 re PR bootstrap/71400 (profiledbootstrap failed)
PR libgcc/71400
	* libgcov-driver-system.c (__gcov_error_file): Disable if IN_GCOV_TOOL.
	(get_gcov_error_file): Check __gcov_error_file before trying to
	initialize it.
	(gcov_error): Always use get_gcov_error_file.

Co-Authored-By: Nathan Sidwell <nathan@acm.org>

From-SVN: r237135
2016-06-06 15:24:24 +00:00
Aaron Conole 8aa5bdd61e On behalf of Aaron Conole <aconole@redhat.com>
On behalf of  Aaron Conole  <aconole@redhat.com>
	* libgcov-driver-system.c (__gcov_error_file): New.
	(get_gcov_error_file): New.
	(gcov_error): Use and set __gcov_error_file.
	(gcov_error_exit): New.
	* libgcov-driver.c (gcov_exit): Call gcov_error_exit.

From-SVN: r237033
2016-06-02 12:22:01 +00:00
Nathan Sidwell 40774fafdc free.asm: Delete.
* config/nvptx/free.asm: Delete.
	* config/nvptx/malloc.asm: Delete.
	* config/nvptx/realloc.c: Delete.
	* t-nvptx: Update.

From-SVN: r236773
2016-05-26 14:22:40 +00:00
Nathan Sidwell 69a6d5ad31 crt0.s: Delete.
libgcc/
	* config/nvptx/crt0.s: Delete.
	* config/nvptx/crt0.c: New.
	* t-nvptx: Update.

	gcc/testsuite/
	* gcc.c-torture/execute/921110-1.c: Fix abort decl.
	add missing 2016-05-20  Nathan Sidwell  <nathan@acm.org> entry

From-SVN: r236702
2016-05-25 12:25:01 +00:00
Sandra Loosemore 6befaff666 cygming.h (DWARF2_UNWIND_INFO): Allow --disable-sjlj-exceptions for TARGET_BI_ARCH to select DWARF-2 EH for...
2016-05-19  Sandra Loosemore  <sandra@codesourcery.com>

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

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

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

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

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

config/
	* picflag.m4:  Remove SH5 support.

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

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

libada/
	* configure: Remove SH5 support.

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

libiberty/
	* configure: Remove SH5 support.

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

From-SVN: r235676
2016-04-30 09:11:03 +00:00
Oleg Endo 9129c8cfcd crt1.S: Remove SH5 support.
libgcc/
	* config/sh/crt1.S: Remove SH5 support.
	* config/sh/crti.S: Likewise.
	* config/sh/crtn.S: Likewise.
	* config/sh/lib1funcs-4-300.S: Likewise.
	* config/sh/lib1funcs-Os-4-200.S: Likewise.
	* config/sh/lib1funcs.S: Likewise.
	* config/sh/linux-unwind.h: Likewise.
	* config/sh/t-sh64: Delete.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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


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

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

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

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

From-SVN: r233505
2016-02-17 20:21:48 +00:00
Marcin Kościelnicki 4cb4721f93 S/390: Add -fsplit-stack support
libgcc/ChangeLog:

	* config.host: Use t-stack and t-stack-s390 for s390*-*-linux.
	* config/s390/morestack.S: New file.
	* config/s390/t-stack-s390: New file.
	* generic-morestack.c (__splitstack_find): Add s390-specific code.

gcc/ChangeLog:

	* common/config/s390/s390-common.c (s390_supports_split_stack):
	New function.
	(TARGET_SUPPORTS_SPLIT_STACK): New macro.
	* config/s390/s390-protos.h: Add s390_expand_split_stack_prologue.
	* config/s390/s390.c (struct machine_function): New field
	split_stack_varargs_pointer.
	(s390_register_info): Mark r12 as clobbered if it'll be used as temp
	in s390_emit_prologue.
	(s390_emit_prologue): Use r12 as temp if r1 is taken by split-stack
	vararg pointer.
	(morestack_ref): New global.
	(SPLIT_STACK_AVAILABLE): New macro.
	(s390_expand_split_stack_prologue): New function.
	(s390_live_on_entry): New function.
	(s390_va_start): Use split-stack vararg pointer if appropriate.
	(s390_asm_file_end): Emit the split-stack note sections.
	(TARGET_EXTRA_LIVE_ON_ENTRY): New macro.
	* config/s390/s390.md (UNSPEC_STACK_CHECK): New unspec.
	(UNSPECV_SPLIT_STACK_CALL): New unspec.
	(UNSPECV_SPLIT_STACK_DATA): New unspec.
	(split_stack_prologue): New expand.
	(split_stack_space_check): New expand.
	(split_stack_data): New insn.
	(split_stack_call): New expand.
	(split_stack_call_*): New insn.
	(split_stack_cond_call): New expand.
	(split_stack_cond_call_*): New insn.

From-SVN: r233421
2016-02-15 10:20:18 +00:00
Walter Lee b29d9a29a1 config.host (tilegx*-*-linux*): remove ti from softfp_int_modes for 32-bit configs.
libgcc/ChangeLog:
        * config.host (tilegx*-*-linux*): remove ti from
          softfp_int_modes for 32-bit configs.

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

From-SVN: r233273
2016-02-10 15:14:05 +00:00
Andreas Tobler 68750bce88 re PR bootstrap/69611 (Bootstrap broken on PowerPC FreeBSD, IEEE 128-bit floating point support.)
2016-02-03  Andreas Tobler  <andreast@gcc.gnu.org>

    PR bootstrap/69611
    * config/rs6000/sfp-machine.h: Guard __sfp_exceptions with
    __FLOAT128__ to compile only for __float128 capable targets.

From-SVN: r233111
2016-02-03 23:15:21 +01:00
Jakub Jelinek 7d29695329 re PR target/69444 (recent changes broke x64_64 -> powerpc crosscompiler build)
PR target/69444
	* config/rs6000/sfp-machine.h: Fix a typo in #ifndef - __NO_FPRS__
	instead of ___NO_FPRS__.

From-SVN: r232805
2016-01-25 22:37:08 +01:00
Michael Meissner e271cba1f5 Add missing file
From-SVN: r232695
2016-01-21 18:45:26 +00:00
Michael Meissner a71c0334f7 float128-sed: New files to convert TF names to KF names for PowerPC IEEE 128-bit floating...
2016-01-21  Michael Meissner  <meissner@linux.vnet.ibm.com>
	    Steven Munroe <munroesj@linux.vnet.ibm.com>
	    Tulio Magno Quites Machado Filho <tulioqm@br.ibm.com>

	* config/rs6000/float128-sed: New files to convert TF names to KF
	names for PowerPC IEEE 128-bit floating point support.
	* config/rs6000/float128-sed-hw: Likewise.

	* config/rs6000/float128-hw.c: New file for ISA 3.0 IEEE 128-bit
	floating point hardware support.

	* config/rs6000/float128-ifunc.c: New file to pick either IEEE
	128-bit floating point software emulation or use ISA 3.0 hardware
	support if it is available.

	* config/rs6000/quad-float128.h: New file to support IEEE 128-bit
	floating point.

	* config/rs6000/extendkftf2-sw.c: New file, convert IEEE 128-bit
	floating point to IBM extended double.

	* config/rs6000/trunctfkf2-sw.c: New file, convert IBM extended
	double to IEEE 128-bit floating point.

	* config/rs6000/t-float128: New Makefile fragments to enable
	building __float128 emulation support.
	* config/rs6000/t-float128-hw: Likewise.

	* config/rs6000/sfp-exceptions.c: New file to provide exception
	support for IEEE 128-bit floating point.

	* config/rs6000/floattikf.c: New files for converting between IEEE
	128-bit floating point and signed/unsigned 128-bit integers.
	* config/rs6000/fixunskfti.c: Likewise.
	* config/rs6000/fixkfti.c: Likewise.
	* config/rs6000/floatuntikf.c: Likewise.

	* config/rs6000/sfp-machine.h (_FP_W_TYPE_SIZE): Use 64-bit types
	when building on 64-bit systems, or when VSX is enabled.
	(_FP_W_TYPE): Likewise.
	(_FP_WS_TYPE): Likewise.
	(_FP_I_TYPE): Likewise.
	(TItype): Define on 64-bit systems.
	(UTItype): Likewise.
	(TI_BITS): Likewise.
	(_FP_MUL_MEAT_D): Add support for using 64-bit types.
	(_FP_MUL_MEAT_Q): Likewise.
	(_FP_DIV_MEAT_D): Likewise.
	(_FP_DIV_MEAT_Q): Likewise.
	(_FP_NANFRAC_D): Likewise.
	(_FP_NANFRAC_Q): Likewise.
	(ISA_BIT): Add exception support if we are being compiled on a
	machine with hardware floating point support to build the IEEE
	128-bit emulation functions.
	(FP_EX_INVALID): Likewise.
	(FP_EX_OVERFLOW): Likewise.
	(FP_EX_UNDERFLOW): Likewise.
	(FP_EX_DIVZERO): Likewise.
	(FP_EX_INEXACT): Likewise.
	(FP_EX_ALL): Likewise.
	(__sfp_handle_exceptions): Likewise.
	(FP_HANDLE_EXCEPTIONS): Likewise.
	(FP_RND_NEAREST): Likewise.
	(FP_RND_ZERO): Likewise.
	(FP_RND_PINF): Likewise.
	(FP_RND_MINF): Likewise.
	(FP_RND_MASK): Likewise.
	(_FP_DECL_EX): Likewise.
	(FP_INIT_ROUNDMODE): Likewise.
	(FP_ROUNDMODE): Likewise.

	* libgcc/config.host (powerpc*-*-linux*): If compiler can compile
	VSX code, enable IEEE 128-bit floating point.  If the compiler can
	compile IEEE 128-bit floating point code with ISA 3.0 IEEE 128-bit
	floating point hardware instructions and it supports declaring
	functions with the ifunc attribute, enable ifunc functions to
	switch between software and hardware support.
	* configure.ac (powerpc*-*-linux*): Likewise.
	* configure: Regenerate.



Co-Authored-By: Steven Munroe <munroesj@linux.vnet.ibm.com>
Co-Authored-By: Tulio Magno Quites Machado Filho <tulioqm@br.ibm.com>

From-SVN: r232685
2016-01-21 17:52:33 +00:00
Nick Clifton bdc27e509c t-msp430 (lib2_mul_none.o): Only use the first dependency as the source file to be compiled.
* config/msp430/t-msp430 (lib2_mul_none.o): Only use the first
	dependency as the source file to be compiled.
	(lib2_mul_16bit.o, lib2hw_mul_16.o, lib2hw_mul_32.o)
	(lib2hw_mul_f5.o): Likewise.

From-SVN: r232402
2016-01-15 08:18:13 +00:00
Michael Meissner 006df05d5c Revert 2016-01-13 change.
From-SVN: r232392
2016-01-14 21:54:16 +00:00
Michael Meissner 29176d57e6 rs6000-builtin.def (BU_FLOAT128_2): Add support for pack/unpack functions for __ibm128.
[gcc]
2016-01-13  Michael Meissner  <meissner@linux.vnet.ibm.com>

	* config/rs6000/rs6000-builtin.def (BU_FLOAT128_2): Add support
	for pack/unpack functions for __ibm128.
	(PACK_IF): Likewise.
	(UNPACK_IF): Likewise.

	* config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add
	support for __ibm128 pack/unpack functions.
	(rs6000_invalid_builtin): Likewise.
	(rs6000_init_builtins): Likewise.
	(rs6000_opt_masks): Likewise.

	* config/rs6000/rs6000.h (MASK_FLOAT128): Add short name.
	(RS6000_BTM_FLOAT128): Add support for __ibm128 pack/unpack
	functions
	(RS6000_BTM_COMMON): Likewise.

	* config/rs6000/rs6000.md (f128_vsx): New mode attribute.
	(unpack<mode>): Use FMOVE128_FPR iterator instead of FMOVE128, to
	disallow __builtin_{pack,unpack}_longdouble if long double is IEEE
	128-bit floating point.  Add support for the double values to be
	in Altivec registers for TF/IF packing and unpacking, but restrict
	TD packing sub-fields to be FPR registers.  Don't allow overlapped
	register support for packing.  Allow pack inputs to be memory
	locations.  Don't build generator functions for unpack<mode>_dm
	and unpack<mode>_nodm.
	(unpack<mode>_dm): Likewise.
	(unpack<mode>_nodm): Likewise.
	(pack<mode>): Likewise.

	* config/rs6000/rs6000-builtin.def (__builtin_pack_ibm128): Add
	built-in functions to pack/unpack explicit __ibm128 values.
	(__builtin_unpack_ibm128): Likewise.

	* doc/extend.texi (PowerPC Built-in Functions): Document
	__builtin_pack_ibm128 and __builtin_unpack_ibm128.

[libgcc]
2016-01-13  Michael Meissner  <meissner@linux.vnet.ibm.com>
	    Steven Munroe <munroesj@linux.vnet.ibm.com>
	    Tulio Magno Quites Machado Filho <tulioqm@br.ibm.com>

	* config/rs6000/sfp-exceptions.c: New file to provide exception
	support for IEEE 128-bit floating point.

	* config/rs6000/float128-hw.c: New file for ISA 3.0 IEEE 128-bit
	floating point hardware support.

	* config/rs6000/floattikf.c: New files for IEEE 128-bit floating
	point conversions.
	* config/rs6000/fixunskfti.c: Likewise.
	* config/rs6000/fixkfti.c: Likewise.
	* config/rs6000/floatuntikf.c: Likewise.
	* config/rs6000/extendkftf2-sw.c: Likewise.
	* config/rs6000/trunctfkf2-sw.c: Likewise.

	* config/rs6000/float128-ifunc.c: New file to pick either IEEE
	128-bit floating point software emulation or use ISA 3.0 hardware
	support if it is available.

	* config/rs6000/quad-float128.h: New file to support IEEE 128-bit
	floating point.

	* config/rs6000/t-float128: New Makefile fragments to enable
	building __float128 emulation support.
	* config/rs6000/t-float128-hw: Likewise.

	* config/rs6000/float128-sed: New file to convert TF names to KF
	names for PowerPC IEEE 128-bit floating point support.

	* config/rs6000/sfp-machine.h (_FP_W_TYPE_SIZE): Use 64-bit types
	when building on 64-bit systems, or when VSX is enabled.
	(_FP_W_TYPE): Likewise.
	(_FP_WS_TYPE): Likewise.
	(_FP_I_TYPE): Likewise.
	(TItype): Define on 64-bit systems.
	(UTItype): Likewise.
	(TI_BITS): Likewise.
	(_FP_MUL_MEAT_D): Add support for using 64-bit types.
	(_FP_MUL_MEAT_Q): Likewise.
	(_FP_DIV_MEAT_D): Likewise.
	(_FP_DIV_MEAT_Q): Likewise.
	(_FP_NANFRAC_D): Likewise.
	(_FP_NANFRAC_Q): Likewise.
	(ISA_BIT): Add exception support if we are being compiled on a
	machine with hardware floating point support to build the IEEE
	128-bit emulation functions.
	(FP_EX_INVALID): Likewise.
	(FP_EX_OVERFLOW): Likewise.
	(FP_EX_UNDERFLOW): Likewise.
	(FP_EX_DIVZERO): Likewise.
	(FP_EX_INEXACT): Likewise.
	(FP_EX_ALL): Likewise.
	(__sfp_handle_exceptions): Likewise.
	(FP_HANDLE_EXCEPTIONS): Likewise.
	(FP_RND_NEAREST): Likewise.
	(FP_RND_ZERO): Likewise.
	(FP_RND_PINF): Likewise.
	(FP_RND_MINF): Likewise.
	(FP_RND_MASK): Likewise.
	(_FP_DECL_EX): Likewise.
	(FP_INIT_ROUNDMODE): Likewise.
	(FP_ROUNDMODE): Likewise.

	* configure.ac (powerpc*-*-linux*): Check whether the PowerPC
	compiler can do __float128.
	* configure: Regenerate.

	* libgcc/config.host (powerpc*-*-linux*): If compiler can compile
	VSX code, enable IEEE 128-bit floating point.

From-SVN: r232346
2016-01-13 20:07:12 +00:00
Olivier Hainque a22189835a aix-unwind.h (ucontext_for): Handle AIX 7.1 specificities.
2016-01-05  Olivier Hainque  <hainque@adacore.com>

	* config/rs6000/aix-unwind.h (ucontext_for): Handle AIX 7.1
	specificities.

From-SVN: r232082
2016-01-05 18:10:31 +00:00
Jakub Jelinek 818ab71a41 Update copyright years.
From-SVN: r232055
2016-01-04 15:30:50 +01:00
Andris Pavenis 5a6c8ffaad Add *-*-msdosdjgpp to lists of i[34567]86-*-* soft-fp targets
* config.host: Add *-*-msdosdjgpp to lists of i[34567]86-*-*
	soft-fp targets

From-SVN: r231803
2015-12-18 06:46:11 +02:00
Bernd Edlinger 077067a5f3 unwind-generic.h (_Unwind_GetTextRelBase): Call __builtin_abort instead of abort to avoid dependency on stdlib.h.
2015-12-16  Bernd Edlinger  <bernd.edlinger@hotmail.de>

        * unwind-generic.h (_Unwind_GetTextRelBase): Call __builtin_abort
        instead of abort to avoid dependency on stdlib.h.

From-SVN: r231697
2015-12-16 15:24:52 +00:00
John David Anglin 787c102712 fptr.c (__canonicalize_funcptr_for_compare): Remove code to initialize call to __dl_fixup once.
* config/pa/fptr.c (__canonicalize_funcptr_for_compare): Remove code
	to initialize call to __dl_fixup once.

From-SVN: r231486
2015-12-10 01:32:10 +00:00
Nick Clifton 04a9ae287f gcc * config.gcc (extra_gcc_objs): Define for MSP430.
* common/config/msp430/msp430-common.c (msp430_handle_option):
	Pass both -mmcu and -mcpu on to the back end if they are both
	defined.
	* config/msp430/msp430.c (hwmult_name): New function.
        (msp430_option_override): If an unrecognised MCU name is
	detected only warn if the user has not provided suitable
        -mhwmult and -mcpu options.  Use msp430_warn_mcu to control
	warning messages.  Generate warnings about conflicts between
	-mmcu and -mcpu and -mhwmult options. 
	If neither -mcpu nor -mmcu have been specified but -mhwmult=
	f5series has the select the 430X isa.
	(msp430_no_hwmult): If -mmcu has not been specified and
	msp430_hwmult_type is AUTO then return true.
	* config/msp430/msp430.h (EXTRA_SPEC_FUNCTIONS): Define.
	(LIB_SPEC): Add hardware multiply library selection.
	* config/msp430/t-msp430: Delete hardware multiply multilibs.
	Add rule to build driver-msp430.o
	* config/msp430/driver-msp430.c: New file.
	* config/msp430/msp430.opt (warn-mcu): New option.
	* doc/invoke.texi: Update description of -mhwmult=auto.
        Document -mwarn-mcu option.

tests	* gcc.target/msp430/msp_abi_div_funcs.c: New test.
	* gcc.target/msp430/mul_main.h: New test support file.
	* gcc.target/msp430/mul_none.c: New test.
	* gcc.target/msp430/mul_16bit.c: New test.
	* gcc.target/msp430/mul_32bit.c: New test.
	* gcc.target/msp430/mul_f5.c: New test.

libgcc	* config/msp430/mpy.c (__mulhi3): Use a faster algorithm.
	Allow for the second argument being negative.
	* config.host (extra_parts): Define for MSP430.  Create separate
	libraries for each of the hardware multiply formats.
	* config/msp430/lib2hw_mul.S: Build only the multiply routines
	that are needed.
	* config/msp430/lib2mul.c: Likewise.
	* config/msp430/t-msp430 (LIB2ADD): Remove lib2hw_mul.S.
	Add rules to build hardware multiply libraries.
	* config/msp430/lib2divSI.c: (__mspabi_divlu): Alias for
	__mspabi_divul function.
	(__mspabi_divllu): New stub function.

From-SVN: r231286
2015-12-04 17:24:30 +00:00
John David Anglin 9a32d4374e fptr.c (__canonicalize_funcptr_for_compare): Initialize fixup values if saved GOT address doesn't match runtime address.
* config/pa/fptr.c (__canonicalize_funcptr_for_compare): Initialize
	fixup values if saved GOT address doesn't match runtime address.
	(fixup_branch_offset): Reorder list.

From-SVN: r231135
2015-12-01 23:59:20 +00:00
Rainer Orth e5ef217c3e Port libvtv to Solaris
libstdc++-v3:
	* acinclude.m4 (GLIBCXX_ENABLE_VTABLE_VERIFY) <solaris2*>: Use
	-Wl,-R in VTV_CXXLINKFLAGS.
	* configure: Regenerate.

	* testsuite/18_support/bad_exception/23591_thread-1.c: Use
	-fvtable-verify=none on Solaris 12+.

	libgcc:
	* Makefile.in (VTV_CFLAGS): New variable.
	(vtv_start$(objext), vtv_end$(objext), vtv_end$(objext))
	(vtv_start_preinit$(objext), vtv_end_preinit$(objext)): Use it.
	* config.host (*-*-solaris2*): Add t-crtstuff-pic to tmake_file.
	Add vtv_start.o, vtv_end.o, vtv_start_preinit.o, vtv_end_preinit.o
	to extra_parts if $enable_vtable_verify = yes.

	libvtv:
	* configure.tgt (*-*-solaris2.[1-9]*): Declare supported.
	* configure.ac: Call AC_USE_SYSTEM_EXTENSIONS.
	<*-*-solaris2*>: Check for init priority support.
	Check for getexecname, __fortify_fail, _obstack_begin.
	(VTV_NO_OBSTACK): New conditional.
	* configure: Regenerate.
	* Makefile.am [VTV_NO_OBSTACK] (obstack.c): Use new condition.
	Create empty config.h
	* Makefile.in: Regenerate.

	* vtv_rts.cc [HAVE_GETEXECNAME] (program_invocation_name): New
	variable.
	(read_section_offset_and_length) [HAVE_GETEXECNAME]: Set it.
	(dl_iterate_phdr_callback) [HAVE_GETEXECNAME]: Set it.

	(__fortify_fail): Wrap in HAVE___FORTIFY_FAIL
	[!HAVE___FORTIFY_FAIL]: Provide non-Cygwin implementation.

	(read_section_offset_and_length): Assert sh_size >= VTV_PAGE_SIZE.
	(iterate_modules): Fix typo.
	Use VTV_PAGE_SIZE.
	(dl_iterate_phdr_callback): Fix typo.
	Use VTV_PAGE_SIZE.
	(__VLTChangePermission): Fix typos.

	include:
	* vtv-change-permission.h (VTV_PAGE_SIZE) [__sun__ && __svr4__ &&
	__sparc__]: Define.

	gcc:
	* config/sol2.h (SUPPORTS_INIT_PRIORITY): Move up.
	(STARTFILE_VTV_SPEC, ENDFILE_VTV_SPEC): Define.
	(STARTFILE_SPEC): Use %(startfile_vtv).
	(ENDFILE_SPEC): Use %(endfile_vtv).
	(SUBTARGET_EXTRA_SPECS): Handle STARTFILE_VTV_SPEC,
	ENDFILE_VTV_SPEC.

	* gcc.c (LINK_COMMAND_SPEC): Move VTABLE_VERIFICATION_SPEC after %{L*}.

From-SVN: r230865
2015-11-25 10:30:25 +00:00
Szabolcs Nagy 78cc43a2ab [ARM] PR target/68059 libgcc should not use __write for printing fatal error
libgcc/
	PR target/68059
	* config/arm/linux-atomic-64bit.c (__write): Rename to...
	(write): ...this and fix the return type.

From-SVN: r230762
2015-11-23 15:17:55 +00:00
DJ Delorie 9afebea2d5 * config/msp430/lib2hw_mul.S: Fix alignment.
From-SVN: r230633
2015-11-19 19:08:50 -05:00
Nathan Sidwell 33f47f4279 nvptx.c (global_lock_var): New.
gcc/
	* config/nvptx/nvptx.c (global_lock_var): New.
	(nvptx_global_lock_addr): New.
	(nvptx_lockless_update): Recomment and adjust for clarity.
	(nvptx_lockfull_update): New.
	(nvptx_reduction_update): New.
	(nvptx_goacc_reduction_fini): Call it.

	libgcc/
	* config/nvptx/reduction.c: New.
	* config/nvptx/t-nvptx (LIB2ADD): Add it.

	libgomp/
	* testsuite/libgomp.oacc-c-c++-common/reduction-cplx-flt.c: Add
	worker & gang cases.
	* testsuite/libgomp.oacc-c-c++-common/reduction-cplx-dbl.c: Likewise.

From-SVN: r230545
2015-11-18 13:49:17 +00:00
David Edelsohn d9adb4761a on_exit.c: New file.
* config/rs6000/on_exit.c: New file.
        * config/rs6000/t-aix-cxa (LIB2ADDEH): Build on_exit.c.
        * config/rs6000/libgcc-aix-cxa.ver (on_exit): Add symbol to exports.

From-SVN: r230398
2015-11-15 18:41:44 -05:00
Claudiu Zissulescu c0ab1970b9 dp-hack.h: Add support for ARCHS.
2015-11-11  Claudiu Zissulescu  <claziss@synopsys.com>

	* config/arc/dp-hack.h: Add support for ARCHS.
	* config/arc/ieee-754/divdf3.S: Likewise.
	* config/arc/ieee-754/divsf3-stdmul.S: Likewise.
	* config/arc/ieee-754/muldf3.S: Likewise.
	* config/arc/ieee-754/mulsf3.S: Likewise
	* config/arc/lib1funcs.S: Likewise
	* config/arc/gmon/dcache_linesz.S: Don't read the build register
	for ARCv2 cores.
	* config/arc/gmon/profil.S (__profil, __profil_irq): Don't profile
	for ARCv2 cores.
	* config/arc/ieee-754/arc-ieee-754.h (MPYHU, MPYH): Define.
	* config/arc/t-arc700-uClibc: Remove hard selection for ARC 700
	cores.

From-SVN: r230151
2015-11-11 12:04:32 +01:00
Rainer Orth e6b6bf09dd Support init priority on Solaris
libgcc:
	* config/ia64/crtbegin.S: Check HAVE_INITFINI_ARRAY_SUPPORT
	value.
	* config/ia64/crtend.S: Likewise.

	gcc:
	* acinclude.m4 (gcc_AC_INITFINI_ARRAY): Allow for differences in
	assembler syntax.
	Support Solaris ld.
	Define HAVE_INITFINI_ARRAY_SUPPORT as 0/1.

	* config/sol2.h (SUPPORTS_INIT_PRIORITY): Define to
	HAVE_INITFINI_ARRAY_SUPPORT.
	* config/initfini-array.h: Check HAVE_INITFINI_ARRAY_SUPPORT
	value.

	* configure.ac (gcc_cv_as_sparc_nobits): Remove.
	* config/sparc/sparc.c (sparc_solaris_elf_asm_named_section):
	Don't check HAVE_AS_SPARC_NOBITS.
	Heed SECTION_NOTYPE.

	* configure: Regenerate.
	* config.in: Regenerate.

From-SVN: r230013
2015-11-09 11:33:30 +00:00
Trevor Saunders a153644f75 replace BITS_PER_UNIT with __CHAR_BIT__ in target libs
libgcc/ChangeLog:

2015-11-07  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>

	* config/visium/lib2funcs.c (__set_trampoline_parity): Use
	__CHAR_BIT__ instead of BITS_PER_UNIT.
	* fixed-bit.h: Likewise.
	* fp-bit.h: Likewise.
	* libgcc2.c (__popcountSI2): Likewise.
	(__popcountDI2): Likewise.
	* libgcc2.h: Likewise.
	* libgcov.h: Likewise.

libobjc/ChangeLog:

2015-11-07  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>

	PR libobjc/24775
	* encoding.c (_darwin_rs6000_special_round_type_align): Use
	__CHAR_BIT__ instead of BITS_PER_UNIT.
	(objc_sizeof_type): Likewise.
	(objc_layout_structure): Likewise.
	(objc_layout_structure_next_member): Likewise.
	(objc_layout_finish_structure): Likewise.
	(objc_layout_structure_get_info): Likewise.

From-SVN: r229936
2015-11-07 19:36:26 +00:00
David Edelsohn 3dee689d8f atexit.c: New file.
* config/rs6000/atexit.c: New file.
* config/rs6000/t-aix-cxa (LIB2ADDEH): Build atexit.c.
* config/rs6000/libgcc-aix-cxa.ver (atexit): Add symbol to exports.
* config/rs6000/cxa_finalize.c
(catomic_compare_and_exchange_bool_acq): Negate return value.

From-SVN: r229932
2015-11-07 09:23:32 -05:00
Venkataramanan Kumar 2ef543e470 libgcc changes for AMD znver1.
2015-10-30  Venkataramanan Kumar  <venkataramanan.kumar@amd.com>

	* config/i386/i386.c (get_builtin_code_for_version): Set priority
	for PROCESSOR_ZNVER1.
	(enum processor_model): Add M_AMDFAM17H_znver1.
	(struct arch_names_table): Likewise.
	* doc/extend.texi: ADD znver1.

2015-10-30  Venkataramanan Kumar  <venkataramanan.kumar@amd.com>

	* config/i386/cpuinfo.c (enum processor_types): Add AMDFAM17H.
	(processor_subtypes): Add znver1.
	(get_amd_cpu): Detect znver1.

From-SVN: r229575
2015-10-30 13:20:42 +00:00
Christophe Lyon 1300f017c8 config.host (arm*-*-eabi*, [...]): Include crtfastmath.o.
2015-10-29  Christophe Lyon  <christophe.lyon@linaro.org>

	* config.host (arm*-*-eabi*, arm*-*-symbianelf*, arm*-*-rtems*):
	Include crtfastmath.o.

From-SVN: r229529
2015-10-29 15:22:56 +01:00
Joern Rennecke 3e5bb7eece re PR libgcc/66883 (config/epiphany/udivsi3-float.c:52: bad if test ?)
PR libgcc/66883
        * config/epiphany/udivsi3-float.c: Fix CONCISE test, and comment typo.

N.B., this is not active code, just documenting a previous approach for this
function in C.

From-SVN: r229236
2015-10-23 12:57:26 +01:00
Kaushik Phatak 793aa938bd divmodqi.S: Return 0x00 by default for div by 0.
* config/rl78/divmodqi.S: Return 0x00 by default for div by 0.
* config/rl78/divmodsi.S: Update return register to r8.
* config/rl78/divmodhi.S: Update return register to r8,r9.
Branch to main_loop_done_himode to pop registers before return.

From-SVN: r228926
2015-10-16 17:47:07 -04:00
Venkataramanan Kumar fac812f0bd Add bdver4 for multiversioning and fix AMD model detection.
2015-10-09  Venkataramanan kumar <venkataramanan.kumar@amd.com>

        * config/i386/cpuinfo.c (get_amd_cpu): Detect bdver4.
        (__cpu_indicator_init): Fix model selection for AMD CPUs.

From-SVN: r228691
2015-10-11 08:06:14 +00:00
Kirill Yukhin 6a192b5a9a cpuinfo.c (get_intel_cpu): Detect "skylake-avx512".
libgcc/
	* config/i386/cpuinfo.c (get_intel_cpu): Detect "skylake-avx512".
gcc/testsuite/
	* gcc.target/i386/builtin_target.c: Add check for "skylake-avx512".

From-SVN: r228481
2015-10-05 13:16:07 +00:00
Max Filippov 4a0a945785 xtensa: add uclinux support
2015-10-03  Max Filippov  <jcmvbkbc@gmail.com>
gcc/
	* config.gcc (xtensa*-*-uclinux*): New configuration.
	* config/xtensa/uclinux.h: New file.
	* config/xtensa/uclinux.opt: New file.

libgcc/
	* config.host (xtensa*-*-uclinux*): New configuration.

From-SVN: r228450
2015-10-03 16:09:07 +00:00
Kirill Yukhin ab91c076b7 AVX-512.
AVX-512. Add missing features to cpuinfo.c
gcc/
	* config/i386/i386.c (processor_features): Add F_AVX512VBMI,
	F_AVX512IFMA.
	(isa_names_table): Handle F_AVX512VBMI and F_AVX512IFMA.
libgcc/
	* config/i386/cpuinfo.c (processor_features): Add
	FEATURE_AVX512VBMI and FEATURE_AVX512VBMI.
testsuite/
	* gcc.target/i386/builtin_target.c: Handle "avx512ifma"
	and "avx512vbmi".

From-SVN: r228399
2015-10-02 15:25:26 +00:00
Joseph Myers 30954527b7 Update soft-fp from glibc.
This patch updates the soft-fp code in libgcc from glibc.  There are
no changes here of significance to the use of soft-fp in GCC (and so
no testsuite additions); it's simply an update to bring in the latest
soft-fp version (which will also hopefully go into Linux 4.4 to
replace the 15-year-old copy currently in Linux).

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

	* soft-fp/adddf3.c: Update from glibc.
	* soft-fp/addsf3.c: Likewise.
	* soft-fp/addtf3.c: Likewise.
	* soft-fp/divdf3.c: Likewise.
	* soft-fp/divsf3.c: Likewise.
	* soft-fp/divtf3.c: Likewise.
	* soft-fp/double.h: Likewise.
	* soft-fp/eqdf2.c: Likewise.
	* soft-fp/eqsf2.c: Likewise.
	* soft-fp/eqtf2.c: Likewise.
	* soft-fp/extenddftf2.c: Likewise.
	* soft-fp/extended.h: Likewise.
	* soft-fp/extendsfdf2.c: Likewise.
	* soft-fp/extendsftf2.c: Likewise.
	* soft-fp/extendxftf2.c: Likewise.
	* soft-fp/fixdfdi.c: Likewise.
	* soft-fp/fixdfsi.c: Likewise.
	* soft-fp/fixdfti.c: Likewise.
	* soft-fp/fixsfdi.c: Likewise.
	* soft-fp/fixsfsi.c: Likewise.
	* soft-fp/fixsfti.c: Likewise.
	* soft-fp/fixtfdi.c: Likewise.
	* soft-fp/fixtfsi.c: Likewise.
	* soft-fp/fixtfti.c: Likewise.
	* soft-fp/fixunsdfdi.c: Likewise.
	* soft-fp/fixunsdfsi.c: Likewise.
	* soft-fp/fixunsdfti.c: Likewise.
	* soft-fp/fixunssfdi.c: Likewise.
	* soft-fp/fixunssfsi.c: Likewise.
	* soft-fp/fixunssfti.c: Likewise.
	* soft-fp/fixunstfdi.c: Likewise.
	* soft-fp/fixunstfsi.c: Likewise.
	* soft-fp/fixunstfti.c: Likewise.
	* soft-fp/floatdidf.c: Likewise.
	* soft-fp/floatdisf.c: Likewise.
	* soft-fp/floatditf.c: Likewise.
	* soft-fp/floatsidf.c: Likewise.
	* soft-fp/floatsisf.c: Likewise.
	* soft-fp/floatsitf.c: Likewise.
	* soft-fp/floattidf.c: Likewise.
	* soft-fp/floattisf.c: Likewise.
	* soft-fp/floattitf.c: Likewise.
	* soft-fp/floatundidf.c: Likewise.
	* soft-fp/floatundisf.c: Likewise.
	* soft-fp/floatunditf.c: Likewise.
	* soft-fp/floatunsidf.c: Likewise.
	* soft-fp/floatunsisf.c: Likewise.
	* soft-fp/floatunsitf.c: Likewise.
	* soft-fp/floatuntidf.c: Likewise.
	* soft-fp/floatuntisf.c: Likewise.
	* soft-fp/floatuntitf.c: Likewise.
	* soft-fp/gedf2.c: Likewise.
	* soft-fp/gesf2.c: Likewise.
	* soft-fp/getf2.c: Likewise.
	* soft-fp/ledf2.c: Likewise.
	* soft-fp/lesf2.c: Likewise.
	* soft-fp/letf2.c: Likewise.
	* soft-fp/muldf3.c: Likewise.
	* soft-fp/mulsf3.c: Likewise.
	* soft-fp/multf3.c: Likewise.
	* soft-fp/negdf2.c: Likewise.
	* soft-fp/negsf2.c: Likewise.
	* soft-fp/negtf2.c: Likewise.
	* soft-fp/op-1.h: Likewise.
	* soft-fp/op-2.h: Likewise.
	* soft-fp/op-4.h: Likewise.
	* soft-fp/op-8.h: Likewise.
	* soft-fp/op-common.h: Likewise.
	* soft-fp/quad.h: Likewise.
	* soft-fp/single.h: Likewise.
	* soft-fp/soft-fp.h: Likewise.
	* soft-fp/subdf3.c: Likewise.
	* soft-fp/subsf3.c: Likewise.
	* soft-fp/subtf3.c: Likewise.
	* soft-fp/truncdfsf2.c: Likewise.
	* soft-fp/trunctfdf2.c: Likewise.
	* soft-fp/trunctfsf2.c: Likewise.
	* soft-fp/trunctfxf2.c: Likewise.
	* soft-fp/unorddf2.c: Likewise.
	* soft-fp/unordsf2.c: Likewise.
	* soft-fp/unordtf2.c: Likewise.

From-SVN: r228223
2015-09-28 22:50:22 +01:00
Richard Earnshaw 4dfe21acc2 ARM: fp16 Fix PR 67624 - Incorrect conversion of float Infinity to __fp16
PR libgcc/67624
	libgcc:
	* config/arm/fp16.c (__gnu_f2h_internal): Handle infinity correctly.
	gcc/testsuite:
	* gcc.target/arm/fp16-inf.c: New test.

From-SVN: r228082
2015-09-24 09:40:06 +00:00
Rainer Orth df2a1cc48b Support PIE on Solaris
gcc/testsuite:
	* lib/target-supports.exp (check_effective_target_pie): Check for
	PIE support on Solaris 11.x and 12.

	libgcc:
	* config.host (*-*-solaris2*): Add t-crtstuff-pic to tmake_file.
	Add crtbeginS.o, crtendS.o to extra_parts if libgcc_cv_solaris_crts.
	* config/sol2/gmon.c: (monstartup): Don't write trailing NUL of
	messages.
	(internal_mcount): Likewise.
	* config/sol2/t-sol2 (crtp.o, crtpg.o, gmon.o): Compile with
	crt_compile, add CRTSTUFF_T_CFLAGS_S.

	gcc:
	* configure.ac (gcc_cv_ld_pie): Check for gld >= 2.26 on Solaris.
	Check for ld -type pie on Solaris 11.x and 12.
	* configure: Regenerate.
	* config.in: Regenerate.

	* gcc.c (LD_PIE_SPEC): Allow redefinition.

	* config/sol2.h (STARTFILE_CRTBEGIN_SPEC): Define.
	(STARTFILE_SPEC): Use it.
	(ENDFILE_CRTEND_SPEC): Define.
	(ENDFILE_SPEC): Use it and ENDFILE_ARCH_SPEC.
	(SUBTARGET_EXTRA_SPECS): Add STARTFILE_CRTBEGIN_SPEC,
	ENDFILE_ARCH_SPEC, ENDFILE_CRTEND_SPEC.
	[HAVE_LD_PIE && HAVE_SOLARIS_CRTS] (LD_PIE_SPEC): Define.
	(!(HAVE_LD_PIE && HAVE_SOLARIS_CRTS)] (LINK_PIE_SPEC): Define.
	* config/i386/sol2.h (ENDFILE_SPEC): Remove.
	(ENDFILE_ARCH_SPEC): Define.
	* config/sparc/sol2.h (ENDFILE_ARCH_SPEC): Define.

From-SVN: r228078
2015-09-24 09:00:22 +00:00
Rainer Orth 2d11044217 Use CRTs provided by Solaris
gcc:
	* configure.ac (gcc_cv_solaris_crts): New test.
	* configure. Regenerate.
	* config.in: Regenerate.
	* config/sol2.h (STARTFILE_SPEC): Simplify, provide
	HAVE_SOLARIS_CRTS variant.

	libgcc:
	* configure.ac (libgcc_cv_solaris_crts): New test.
	* configure: Regenerate.
	* config.in: Regenerate.
	* config/sol2/crtp.c, config/sol2/crtpg.c: New files.
	* config/gmon-sol2.c: Rename to ...
	* config/sol2/gmon.c: ... this.
	Include auto-target.h.
	(internal_mcount): Wrap setup handling in !HAVE_SOLARIS_CRTS.
	* config/t-sol2: Rename to ...
	* config/sol2/t-sol2: ... this.
	(gmon.o): Reflect renaming.
	(crtp.o, crtpg.o): New rules.
	* config.host (*-*-solaris2*): Reflect renaming.
	Use system CRTs if present.
	Remove default CRT case.

From-SVN: r228077
2015-09-24 08:51:39 +00:00
John David Anglin d572e4397d linux-atomic.c (__kernel_cmpxchg2): Reorder error checks.
* config/pa/linux-atomic.c (__kernel_cmpxchg2): Reorder error checks.
	(__sync_fetch_and_##OP##_##WIDTH): Change result to match type of
	__kernel_cmpxchg2.
	(__sync_##OP##_and_fetch_##WIDTH): Likewise.
	(__sync_val_compare_and_swap_##WIDTH): Likewise.
	(__sync_bool_compare_and_swap_##WIDTH): Likewise.
	(__sync_lock_test_and_set_##WIDTH): Likewise.
	(__sync_lock_release_##WIDTH): Likewise.
	(__sync_fetch_and_##OP##_4): Change result to match type of
	__kernel_cmpxchg.
	(__sync_##OP##_and_fetch_4): Likewise.
	(__sync_val_compare_and_swap_4): Likewise.
	(__sync_bool_compare_and_swap_4): likewise.
	(__sync_lock_test_and_set_4): Likewise.
	(__sync_lock_release_4): Likewise.
	(FETCH_AND_OP_2): Add long long variants.
	(OP_AND_FETCH_2): Likewise.
	(COMPARE_AND_SWAP_2 ): Likewise.
	(SYNC_LOCK_TEST_AND_SET_2): Likewise.
	(SYNC_LOCK_RELEASE_2): Likewise.
	(__sync_bool_compare_and_swap_##WIDTH): Correct return.

From-SVN: r228065
2015-09-23 23:27:15 +00:00
Kirill Yukhin 06caf59d7f AVX-512. Introduce SKylake server CPU.
gcc/
	* config.gcc: Support "skylake-avx512".
        * config/i386/i386-c.c (ix86_target_macros_internal): Handle
        PROCESSOR_SKYLAKE_AVX512.
        * config/i386/i386.c (m_SKYLAKE_AVX512): Define.
        (processor_target_table): Add "skylake-avx512".
        (PTA_SKYLAKE_AVX512): Define.
	(ix86_option_override_internal): Add "skylake_avx512".
        (fold_builtin_cpu): Handle "skylake_avx512", add F_AVX512VL
	F_AVX512BW, F_AVX512DQ, F_AVX512ER, F_AVX512PF, F_AVX512CD.
        * config/i386/i386.h (TARGET_SKYLAKE_AVX512): Define.
        (processor_type): Add PROCESSOR_SKYLAKE_AVX512.
	* doc/invoke.texi (skylake-avx512): New.

libgcc/
	* libgcc/config/i386/cpuinfo.c (enum processor_features): Add
	FEATURE_AVX512VL, FEATURE_AVX512BW, FEATURE_AVX512DQ,
	FEATURE_AVX512CD, FEATURE_AVX512ER, FEATURE_AVX512PF.
	(get_available_features): Habdle new features.

gcc/testsuite/
        * gcc.target/i386/funcspec-5.c: Test avx512vl, avx512bw,
	avx512dq, avx512cd, avx512er, avx512pf and skylake-avx512.
	* gcc.target/i386/builtin_target.c: Test  avx512vl, avx512bw,
	avx512dq, avx512cd, avx512er and avx512pf.

From-SVN: r228009
2015-09-22 11:10:21 +00:00
James Bowman 131314e14a [FT32] fixes for the default hardware startup
libgcc/
        * config/ft32/crti-hw.S: Use __PMSIZE to allow configurable
        memory layout. Deal correctly with BSS region larger than 32K.
        Handle a watchdog reset like a power-on reset. Clean up unused
        code.

From-SVN: r227986
2015-09-21 22:31:53 +00:00
David Edelsohn 54f0c25b30 Update copyright.
From-SVN: r227912
2015-09-18 14:14:45 -04:00
Andrew Dixie 04218b3564 config.host (powerpc-ibm-aix*): Add crtdbase.o to extra_parts.
libgcc/
        * config.host (powerpc-ibm-aix*): Add crtdbase.o to extra_parts.
        * config/rs6000/crtdbase.S: New file.
        * config/rs6000/t-aix-cxa: Build crtdbase.o.

gcc/
        * defaults.h (EH_FRAME_SECTION_NAME): Depend on
        EH_FRAME_THROUGH_COLLECT2.
        * dwarf2asm.c (dw2_asm_output_encoded_addr_rtx): Add case for
        DW_EH_PE_datarel.
        * dwarf2out.c (switch_to_eh_frame_section): Use a read-only section
        even if EH_FRAME_SECTION_NAME is undefined.  Restrict special
        collect2 labels to EH_FRAME_THROUGH_COLLECT2.
        * except.c (switch_to_exception_section): Use a read-only section
        even if EH_FRAME_SECTION_NAME is undefined.
        * system.h (EH_FRAME_IN_DATA_SECTION): Poison.
        * collect2.c (write_c_file_stat): Provide dbase on AIX.
        (scan_prog_file): Don't export __dso_handle nor
        __gcc_unwind_dbase.
        * config/rs6000/aix.h (ASM_PREFERRED_EH_DATA_FORMAT): Define.
        (EH_TABLES_CAN_BE_READ_ONLY): Define.
        (ASM_OUTPUT_DWARF_PCREL): Define.
        (ASM_OUTPUT_DWARF_DATAREL): Define.
        (EH_FRAME_THROUGH_COLLECT2): Define.
        (EH_FRAME_IN_DATA_SECTION): Delete.
        * config/rs6000/rs6000.c (rs6000_aix_asm_output_dwarf_pcrel): New.
        (rs6000_aix_asm_output_dwarf_datarel): New.
        (rs6000_xcoff_asm_init_sections): Don't set exception_section.
        * config/spu/spu-elf.h (EH_FRAME_IN_DATA_SECTION): Delete.
        (EH_FRAME_THROUGH_COLLECT2): Define.
        * config/i386/i386-interix.h (EH_FRAME_IN_DATA_SECTION): Delete.
        (EH_FRAME_THROUGH_COLLECT2): Define.
        (EH_TABLES_CAN_BE_READ_ONLY): Define.
        * doc/tm.texi.in (EH_FRAME_IN_DATA_SECTION): Delete.
        (EH_FRAME_THROUGH_COLLECT2): New.
        (ASM_OUTPUT_DWARF_DATAREL): New.
        * doc/tm.texi: Regenerate.

Co-Authored-By: David Edelsohn <dje.gcc@gmail.com>

From-SVN: r227906
2015-09-18 10:10:36 -04:00
Max Filippov c8338173d7 xtensa: fix xtensa_fallback_frame_state for call0 ABI
2015-09-15  Max Filippov  <jcmvbkbc@gmail.com>
gcc/
	* config/xtensa/xtensa.h (DWARF_ALT_FRAME_RETURN_COLUMN): New
	definition.
	(DWARF_FRAME_REGISTERS): Reserve space for one extra register in
	call0 ABI.

libgcc/
	* config/xtensa/linux-unwind.h (xtensa_fallback_frame_state):
	Add support for call0 ABI.

From-SVN: r227809
2015-09-15 19:30:32 +00:00
John David Anglin 7a84bf7192 fptr.c (SIGN_EXTEND): Cast -1 to unsigned.
* config/pa/fptr.c (SIGN_EXTEND): Cast -1 to unsigned.

From-SVN: r227717
2015-09-13 15:05:57 +00:00
Sebastian Huber 4efab40251 RTEMS: Update RTEMS thread model
libgcc/ChangeLog

	* config/gthr-rtems.h (__GTHREADS_CXX0X): New.
	(__GTHREAD_HAS_COND): Likewise.
	(__gthread_t): Likewise.
	(__gthread_cond_t): Likewise.
	(__gthread_time_t): Likewise.
	(__GTHREAD_MUTEX_INIT): Likewise.
	(__GTHREAD_RECURSIVE_MUTEX_INIT): Likewise.
	(__GTHREAD_COND_INIT): Likewise.
	(__GTHREAD_COND_INIT_FUNCTION): Likewise.
	(__GTHREAD_TIME_INIT): Likewise.
	(__gthread_create): Likewise.
	(__gthread_join): Likewise.
	(__gthread_detach): Likewise.
	(__gthread_equal): Likewise.
	(__gthread_self): Likewise.
	(__gthread_yield): Likewise.
	(__gthread_cond_broadcast): Likewise.
	(__gthread_cond_signal): Likewise.
	(__gthread_cond_wait): Likewise.
	(__gthread_cond_timedwait): Likewise.
	(__gthread_cond_wait_recursive): Likewise.
	(__gthread_cond_destroy): Likewise.
	(rtems_gxx_once): Delete.
	(rtems_gxx_key_create): Likewise.
	(rtems_gxx_key_delete): Likewise.
	(rtems_gxx_getspecific): Likewise.
	(rtems_gxx_setspecific): Likewise.
	(rtems_gxx_mutex_init): Likewise.
	(rtems_gxx_mutex_destroy): Likewise.
	(rtems_gxx_mutex_lock): Likewise.
	(rtems_gxx_mutex_trylock): Likewise.
	(rtems_gxx_mutex_unlock): Likewise.
	(rtems_gxx_recursive_mutex_init): Likewise.
	(rtems_gxx_recursive_mutex_lock): Likewise.
	(rtems_gxx_recursive_mutex_trylock): Likewise.
	(rtems_gxx_recursive_mutex_unlock): Likewise.
	(__GTHREAD_ONCE_INIT): Use <pthread.h> initializer.
	(__GTHREAD_MUTEX_INIT_FUNCTION): Use <pthread.h> function.
	(__GTHREAD_RECURSIVE_MUTEX_INIT_FUNCTION): Likewise.
	(__gthread_once): Likewise.
	(__gthread_key_create): Likewise.
	(__gthread_key_delete): Likewise.
	(__gthread_getspecific): Likewise.
	(__gthread_setspecific): Likewise.
	(__gthread_key_t): Use <pthread.h> type.
	(__gthread_once_t): Likewise
	(__gthread_mutex_t): Use <sys/lock.h> type.
	(__gthread_recursive_mutex_t): Likewise
	(__gthread_mutex_lock): Use <sys/lock.h> function.
	(__gthread_mutex_trylock): Likewise.
	(__gthread_mutex_timedlock): Likewise.
	(__gthread_mutex_unlock): Likewise.
	(__gthread_mutex_destroy): Likewise.
	(__gthread_recursive_mutex_lock): Likewise.
	(__gthread_recursive_mutex_trylock): Likewise.
	(__gthread_recursive_mutex_timedlock): Likewise.
	(__gthread_recursive_mutex_unlock): Likewise.
	(__gthread_recursive_mutex_destroy): Likewise.

From-SVN: r227428
2015-09-03 05:28:46 +00:00
Max Filippov 991995c4e7 xtensa: fix _Unwind_GetCFA
Returning context->cfa in _Unwind_GetCFA makes CFA point one stack frame
higher than what was actually used by code at context->ra. This results
in invalid CFA value in signal frames and premature unwinding completion
in forced unwinding used by uClibc NPTL thread cancellation.
Returning context->sp from _Unwind_GetCFA makes all CFA values valid and
matching code that used them.

2015-08-18  Max Filippov  <jcmvbkbc@gmail.com>
libgcc/
	* config/xtensa/unwind-dw2-xtensa.c (_Unwind_GetCFA): Return
	context->sp instead of context->cfa.

From-SVN: r226964
2015-08-18 01:08:22 +00:00
Max Filippov 0e19db59e2 xtensa: use unwind-dw2-fde-dip instead of unwind-dw2-fde
This allows having exception cleanup code in binaries that don't
register their unwind tables.

2015-08-18  Max Filippov  <jcmvbkbc@gmail.com>
libgcc/
	* config/xtensa/t-windowed (LIB2ADDEH): Replace unwind-dw2-fde
	with unwind-dw2-fde-dip.

From-SVN: r226963
2015-08-18 01:07:10 +00:00
Max Filippov b6ac5f6231 xtensa: reimplement register spilling
Spilling windowed registers in userspace is much easier, more portable,
less error-prone and equally effective as in kernel. Now that register
spilling syscall is considered obsolete in the xtensa linux kernel
replace it with CALL12 followed by series of ENTRY in libgcc.

2015-08-18  Max Filippov  <jcmvbkbc@gmail.com>
libgcc/
	* config/xtensa/lib2funcs.S (__xtensa_libgcc_window_spill): Use
	CALL12 followed by series of ENTRY to spill windowed registers.
	(__xtensa_nonlocal_goto): Call __xtensa_libgcc_window_spill
	instead of making linux spill syscall.

From-SVN: r226962
2015-08-18 01:05:44 +00:00
Yuri Rumyantsev 3e0f334989 driver-i386.c (host_detect_local_cpu): Add support for skylake.
gcc/

	* config/i386/driver-i386.c (host_detect_local_cpu): Add support
	for skylake.
	* config/i386/i386.c (PTA_SKYLAKE): New macros.
	(processor_alias_table): Add skylake description.
	(enum processor_model): Add skylake processor.
	(arch_names_table): Add skylake record.
	* doc/invoke.texi: Add skylake item.

gcc/testsuite/

	* gcc.target/i386/builtin_target.c: Add skylake check.

libgcc/

	* config/i386/cpuinfo.c (enum processor_subtypes): Add skylake.
	(get_intel_cpu): Likewise.

From-SVN: r226884
2015-08-14 09:11:01 +00:00
H.J. Lu 51c728b17d Add Knights Landing support to __builtin_cpu_is
This patch adds Knights Landing support to __builtin_cpu_is.

gcc/testsuite/

	* gcc.target/i386/builtin_target.c (check_intel_cpu_model):
	Check Knights Landing support.

libgcc/

	* config/i386/cpuinfo.c (processor_types): Add INTEL_KNL.
	(get_intel_cpu): Add Knights Landing support.

From-SVN: r226817
2015-08-12 07:52:22 -07:00
Uros Bizjak aff4eeac68 re PR target/66954 (function multiversioning fails for target "aes")
libgcc/ChangeLog:

	PR target/66954
	* config/i386/cpuinfo.c (enum processor_features): Add FEATURE_PCLMUL.
	(get_available_features): Handle FEATURE_PCLMUL.

gcc/ChangeLog:

	PR target/66954
	* config/i386/i386.c (get_builtin_code_for_version): Add P_PCLMUL
	to enum feature_priority and feature_list.
	(fold_builtin_cpu): Add F_PCLMUL to enum processor_features
	and isa_names_table.

gcc/testsuite/ChangeLog:

	PR target/66954
	* g++.dg/ext/mv25.C: New test.

From-SVN: r226784
2015-08-11 19:53:41 +02:00
H.J. Lu 736e56dac0 Treat model == 0x4f as Broadwell
gcc/testsuite/

	* gcc.target/i386/builtin_target.c (check_intel_cpu_model):
	Treat model == 0x4f as Broadwell.

libgcc/

	* config/i386/cpuinfo.c (get_intel_cpu): Treat model == 0x4f as
	Broadwell.

From-SVN: r226766
2015-08-10 12:19:05 -07:00
Uros Bizjak 54d22142b1 re PR target/66954 (function multiversioning fails for target "aes")
libgcc/ChangeLog:

	PR target/66954
	* config/i386/cpuinfo.c (enum processor_features): Add FEATURE_AES.
	(get_available_features): Handle FEATURE_AES.

gcc/ChangeLog:

	PR target/66954
	* config/i386/i386.c (get_builtin_code_for_version): Add P_AES
	to enum feature_priority and feature_list.
	(fold_builtin_cpu): Add F_AES to enum processor_features
	and isa_names_table.

gcc/testsuite/ChangeLog:

	PR target/66954
	* g++.dg/ext/mv24.C: New test.

From-SVN: r226081
2015-07-22 20:01:33 +02:00
Chung-Lin Tang 20ca17e480 linux-atomic.c (<asm/unistd.h>): Remove #include.
2015-07-22  Chung-Lin Tang  <cltang@codesourcery.com>

	libgcc/
	* config/nios2/linux-atomic.c (<asm/unistd.h>): Remove #include.
	(EFAULT,EBUSY,ENOSYS): Delete unused #defines.

From-SVN: r226063
2015-07-22 11:39:30 +00:00
Nathan Sidwell ebe4a56073 mkoffload.c (process): Constify host data.
gcc/
	* config/nvptx/mkoffload.c (process): Constify host data.
	* config/i386/intelmic-mkoffload.c (generate_target_descr_file):
	Constify host data.
	(generate_host_descr_file): Likewise.

	libgomp/
	* target.c (struct_offload_image_descr): Constify host_table.
	(gomp_offload_image_to_device): Likewise.
	(GOMP_offload_register, GOMP_offload_unregister): Likewise.

	libgcc/
	* offloadstuff.c: Constify host data.

From-SVN: r225943
2015-07-17 17:12:01 +00:00
Jan Beulich 180744c0cf libgcc: fix build with older make
Make up to 3.80 (documented as minimal permitted version) doesn't
support "else if...".

2015-07-17  Jan Beulich  <jbeulich@suse.com>

	* config/t-softfp: Split up "else ifneq".

From-SVN: r225920
2015-07-17 07:14:25 +00:00
Sandra Loosemore a03c6ae388 tramp.c (MOVHI, ORI, JMP): Conditionalize for __nios2_arch__ level.
2015-07-14  Sandra Loosemore  <sandra@codesourcery.com>
	    Cesar Philippidis  <cesar@codesourcery.com>
	    Chung-Lin Tang  <cltang@codesourcery.com>

	libgcc/
	* config/nios2/tramp.c (MOVHI, ORI, JMP): Conditionalize
	for __nios2_arch__ level.

Co-Authored-By: Cesar Philippidis <cesar@codesourcery.com>
Co-Authored-By: Chung-Lin Tang <cltang@codesourcery.com>

From-SVN: r225794
2015-07-14 18:43:46 -04:00
John Marino 73358db5d1 t-dragonfly: New.
2015-07-13  John Marino  <gnugcc@marino.st>

	* config/i386/t-dragonfly: New.

From-SVN: r225738
2015-07-13 15:53:16 +01:00
John David Anglin f9a12f7b8f linux-atomic.c (__kernel_cmpxchg): Reorder arguments to better match light-weight syscall argument order.
* config/pa/linux-atomic.c (__kernel_cmpxchg): Reorder arguments to
	better match light-weight syscall argument order.
	(__kernel_cmpxchg2): Likewise.
	Adjust callers.

From-SVN: r225267
2015-07-01 17:42:20 +00:00
H.J. Lu cb78b51ca0 IA MCU psABI support: changes to libraries
Patch in the bottom adds support of IA MCU psABI to libgcc (enables
soft-fp) and libdecnumber (enables it for IA MCU).

config/

	* dfp.m4 (enable_decimal_float): Also set to yes for
	i?86*-*-elfiamcu target.

gcc/

	* configure: Regenerated.

libdecnumber/

	* configure: Regenerated.

libgcc/

	* config.host: Support i[34567]86-*-elfiamcu target.
	* config/t-softfp-sfdftf: New file.
	* config/i386/32/t-iamcu: Likewise.
	* configure: Regenerated.

From-SVN: r225198
2015-06-30 09:42:07 -07:00
James Lemke 4fa0f9ea8c lib1funcs.S (aeabi_idiv0, [...]): Add CFI entries.
2015-06-23  James Lemke  <jwlemke@codesourcery.com>

	libgcc/config/arm/
	* lib1funcs.S (aeabi_idiv0, aeabi_ldiv0): Add CFI entries.

From-SVN: r224854
2015-06-23 17:45:18 +00:00
Jeff Law 368054069f Fix FT32 ChangeLogs
From-SVN: r224080
2015-06-03 07:39:45 -06:00
H.J. Lu 428b381275 Add --enable-default-pie option to GCC configure
Add --enable-default-pie option to configure GCC to generate PIE by
default.

gcc/

	* Makefile.in (COMPILER): Add @NO_PIE_CFLAGS@.
	(BUILD_CFLAGS): Likewise.
	(BUILD_CXXFLAGS): Likewise.
	(LINKER): Add @NO_PIE_FLAG@.
	(BUILD_LDFLAGS): Likewise.
	(libgcc.mvars): Set NO_PIE_CFLAGS to -fno-PIE for
	--enable-default-pie.
	* common.opt (fPIE): Initialize to -1.
	(fpie): Likewise.
	(no-pie): New option.
	(pie): Replace "Negative(shared)" with "Negative(no-pie)".
	* configure.ac: Add --enable-default-pie.
	(NO_PIE_CFLAGS): New.  Check if -fno-PIE works.  AC_SUBST.
	(NO_PIE_FLAG): New.  Check if -no-pie works.  AC_SUBST.
	* defaults.h (DEFAULT_FLAG_PIE): New.  Default PIE to -fPIE.
	* gcc.c (NO_PIE_SPEC): New.
	(PIE_SPEC): Likewise.
	(NO_FPIE1_SPEC): Likewise.
	(FPIE1_SPEC): Likewise.
	(NO_FPIE2_SPEC): Likewise.
	(FPIE2_SPEC): Likewise.
	(NO_FPIE2_SPEC): Likewise.
	(FPIE_SPEC): Likewise.
	(NO_FPIE_SPEC): Likewise.
	(NO_FPIC1_SPEC): Likewise.
	(FPIC1_SPEC): Likewise.
	(NO_FPIC2_SPEC): Likewise.
	(FPIC2_SPEC): Likewise.
	(NO_FPIC2_SPEC): Likewise.
	(FPIC_SPEC): Likewise.
	(NO_FPIC_SPEC): Likewise.
	(NO_FPIE1_AND_FPIC1_SPEC): Likewise.
	(FPIE1_OR_FPIC1_SPEC): Likewise.
	(NO_FPIE2_AND_FPIC2_SPEC): Likewise.
	(FPIE2_OR_FPIC2_SPEC): Likewise.
	(NO_FPIE_AND_FPIC_SPEC): Likewise.
	(FPIE_OR_FPIC_SPEC): Likewise.
	(LD_PIE_SPEC): Likewise.
	(LINK_PIE_SPEC): Handle -no-pie.  Use PIE_SPEC and LD_PIE_SPEC.
	* opts.c (finish_options): Update opts->x_flag_pie if it is -1.
	* config/darwin.h (PIE_SPEC): Renamed to ...
	(DARWIN_PIE_SPEC): This.
	(LINK_SPEC): Replace PIE_SPEC with DARWIN_PIE_SPEC.
	* config/darwin9.h (PIE_SPEC): Renamed to ...
	(DARWIN_PIE_SPEC): This.
	* config/gnu-user.h (GNU_USER_TARGET_STARTFILE_SPEC): Use
	PIE_SPEC and NO_PIE_SPEC if HAVE_LD_PIE is defined.
	* config/openbsd.h (ASM_SPEC): Use FPIE1_OR_FPIC1_SPEC and
	FPIE2_OR_FPIC2_SPEC.
	* config/m68k/netbsd-elf.h (ASM_SPEC): Likewise.
	* config/m68k/openbsd.h (ASM_SPEC): Likewise.
	* gcc/config/sol2.h (ASM_PIC_SPEC): Likewise.
	* config/arm/freebsd.h (SUBTARGET_EXTRA_ASM_SPEC): Likewise.
	* config/arm/netbsd-elf.h (SUBTARGET_EXTRA_ASM_SPEC): Likewise.
	* config/arm/semi.h (SUBTARGET_EXTRA_ASM_SPEC): Likewise.
	* config/cris/linux.h (CRIS_ASM_SUBTARGET_SPEC): Likewise.
	* config/m32r/m32r.h (ASM_SPEC): Likewise.
	* config/m68k/uclinux.h (DRIVER_SELF_SPECS): Likewise.
	* config/rs6000/linux64.h (ASM_SPEC32): Likewise.
	* config/rs6000/sysv4.h (ASM_SPEC): Likewise.
	* config/sparc/freebsd.h (ASM_SPEC): Likewise.
	* config/sparc/linux.h (ASM_SPEC): Likewise.
	* config/sparc/linux64.h (ASM_SPEC): Likewise.
	* config/sparc/netbsd-elf.h (ASM_SPEC): Likewise.
	* config/sparc/openbsd64.h (ASM_SPEC): Likewise.
	* config/sparc/sp-elf.h (ASM_SPEC): Likewise.
	* config/sparc/sp64-elf.h (ASM_SPEC): Likewise.
	* config/sparc/sparc.h (ASM_SPEC): Likewise.
	* config/sparc/sysv4.h (ASM_SPEC): Likewise.
	* config/sparc/vxworks.h (ASM_SPEC): Likewise.
	* config/c6x/elf-common.h (ASM_SPEC): Use NO_FPIC2_SPEC,
	FPIC2_SPEC, FPIC1_SPEC and FPIC2_SPEC.
	* config/c6x/uclinux-elf.h (LINK_SPEC): Use FPIE_SPEC.
	* config/frv/frv.h (DRIVER_SELF_SPECS): Use FPIC_SPEC,
	NO_FPIC_SPEC and NO_FPIE1_AND_FPIC1_SPEC.
	(ASM_SPEC): Use FPIE1_OR_FPIC1_SPEC and FPIE2_OR_FPIC2_SPEC.
	* config/m68k/m68k.h (ASM_PCREL_SPEC): Use FPIC_SPEC and
	NO_FPIC_SPEC.
	* config/mips/gnu-user.h (NO_SHARED_SPECS): Use
	NO_FPIE_AND_FPIC_SPEC.
	* config/mips/vxworks.h (SUBTARGET_ASM_SPEC): Use FPIC_SPEC.
	* config/rs6000/freebsd64.h (ASM_SPEC32): Likewise.
	* config/rs6000/vxworks.h (ASM_SPEC): Likewise.
	* config/vax/linux.h (ASM_SPEC): Likewise.
	* doc/install.texi: Document --enable-default-pie.
	* doc/invoke.texi: Document -no-pie.
	* config.in: Regenerated.
	* configure: Likewise.

gcc/ada/

	* gcc-interface/Makefile.in (TOOLS_LIBS): Add @NO_PIE_FLAG@.

libgcc/

	* Makefile.in (CRTSTUFF_CFLAGS): Add $(NO_PIE_CFLAGS).

From-SVN: r223796
2015-05-27 19:36:55 -07:00
John Marino 89c54dd357 config.host (i[34567]86-*-freebsd*, [...]): Set md_unwind_header
* config.host (i[34567]86-*-freebsd*, x86_64-*-freebsd*): Set
        md_unwind_header
        * config/i386/freebsd-unwind.h: New.

From-SVN: r223765
2015-05-27 10:14:10 -06:00
Uros Bizjak 9b789cc15c config.host (i[34567]-*-*, x86_64-*-*): Add t-crtfm instead of i386/t-crtfm to tmake_file.
* config.host (i[34567]-*-*, x86_64-*-*): Add t-crtfm instead of
	i386/t-crtfm to tmake_file.
	* config/i386/crtfastmath.c (set_fast_math_sse): New function.
	(set_fast_math): Use set_fast_math_sse for SSE targets.
	* config/i386/t-crtfm: Remove.

From-SVN: r223578
2015-05-22 16:39:22 +02:00
Alan Modra 3dafb2207e re PR libgcc/66225 (libgcc/config/rs6000/morecore.S will not build on systems with an older assembler)
PR libgcc/66225
	* config/rs6000/morestack.S: Remove ".abiversion 1".

From-SVN: r223464
2015-05-21 09:25:08 +09:30
Alan Modra 0f0fd74525 rs6000-common.c (TARGET_SUPPORTS_SPLIT_STACK): Define.
gcc/
	* common/config/rs6000/rs6000-common.c (TARGET_SUPPORTS_SPLIT_STACK):
	Define.
	(rs6000_supports_split_stack): New function.
	* gcc/config/rs6000/rs6000.c (machine_function): Add
	split_stack_arg_pointer.
	(TARGET_EXTRA_LIVE_ON_ENTRY, TARGET_INTERNAL_ARG_POINTER): Define.
	(setup_incoming_varargs): Use crtl->args.internal_arg_pointer
	rather than virtual_incoming_args_rtx.
	(rs6000_va_start): Likewise.
	(split_stack_arg_pointer_used_p): New function.
	(rs6000_emit_prologue): Set up arg pointer for -fsplit-stack.
	(morestack_ref): New var.
	(gen_add3_const, rs6000_expand_split_stack_prologue,
	rs6000_internal_arg_pointer, rs6000_live_on_entry,
	rs6000_split_stack_space_check): New functions.
	(rs6000_elf_file_end): Call file_end_indicate_split_stack.
	* gcc/config/rs6000/rs6000.md (UNSPEC_STACK_CHECK): Define.
	(UNSPECV_SPLIT_STACK_RETURN): Define.
	(split_stack_prologue, load_split_stack_limit,
	load_split_stack_limit_di, load_split_stack_limit_si,
	split_stack_return, split_stack_space_check): New expands and insns.
	* gcc/config/rs6000/rs6000-protos.h
	(rs6000_expand_split_stack_prologue): Declare.
	(rs6000_split_stack_space_check): Declare.
libgcc/
	* config/rs6000/morestack.S: New.
	* config/rs6000/t-stack-rs6000: New.
	* config.host (powerpc*-*-linux*): Add t-stack and t-stack-rs6000
	to tmake_file.
	* generic-morestack.c: Don't build for powerpc 32-bit.

From-SVN: r223426
2015-05-20 10:56:28 +09:30
Eric Botcazou 515ae71b1c Makefile.in (LIBUNWIND): Move dependency for shared libgcc.
* Makefile.in (LIBUNWIND): Move dependency for shared libgcc.
	Remove useless endif/ifneq ($(enable_shared),yes) pair.

From-SVN: r223412
2015-05-19 19:02:55 +00:00
James Bowman fef939d6a9 FT32 target added. Approved by Jeff Law [law@redhat.com]
From-SVN: r223261
2015-05-16 23:49:08 +00:00
Martin Galvan ff935d0c3d Add support for CFI directives in fp emulation routines for ARM.
2015-05-15  Martin Galvan  <martin.galvan@tallertechnologies.com>

        * config/arm/lib1funcs.S (CFI_START_FUNCTION, CFI_END_FUNCTION):
        New macros.
        * config/arm/ieee754-df.S: Add CFI directives.
        * config/arm/ieee754-sf.S: Add CFI directives.

From-SVN: r223220
2015-05-15 16:57:10 +00:00
Eric Botcazou 9b92a9f3b6 sjlj.m4: New file.
config/
	* sjlj.m4: New file.
libgcc/
	* configure.ac: Include config/sjlj.m4.
	Remove manual SJLJ check, add GCC_CHECK_SJLJ_EXCEPTIONS and adjust.
	* config.in: Regenerate.
	* configure: Likewise.
	* config.host: Replace enable_sjlj_exceptions by ac_cv_sjlj_exceptions.
libjava/
	* configure.ac: Include config/sjlj.m4.
	Remove manual SJLJ check, add GCC_CHECK_SJLJ_EXCEPTIONS and adjust.
	* include/config.h.in: Regenerate.
	* configure: Likewise.
	* exception.cc: Replace SJLJ_EXCEPTIONS by __USING_SJLJ_EXCEPTIONS__.
	* stacktrace.cc: Likewise.
	* include/default-signal.h: Likewise.
	* sysdep/i386/backtrace.h: Likewise.
libobjc/
	* configure.ac: Remove manual SJLJ check.
	* config.h.in: Regenerate.
	* configure: Likewise.
	* exception.c: Replace SJLJ_EXCEPTIONS by __USING_SJLJ_EXCEPTIONS__.
libstdc++-v3/
	* acinclude.m4 (GLIBCXX_ENABLE_SJLJ_EXCEPTIONS): Delete.
	* configure.ac: Remove GLIBCXX_ENABLE_SJLJ_EXCEPTIONS.
	* config.h.in: Regenerate.
	* configure: Likewise.
	* libsupc++/eh_personality.cc: Replace _GLIBCXX_SJLJ_EXCEPTIONS by
	__USING_SJLJ_EXCEPTIONS__.
	* libsupc++/eh_throw.cc: Likewise.
	* libsupc++/eh_ptr.cc: Likewise.
	* doc/html/manual/appendix_porting.html: Remove
	GLIBCXX_ENABLE_SJLJ_EXCEPTIONS
	* doc/xml/manual/build_hacking.xml: Likewise.
	* doc/html/manual/configure.html: Remove --enable-sjlj-exceptions.
	* doc/xml/manual/configure.xml: Likewise.

From-SVN: r223181
2015-05-13 21:15:31 +00:00
Uros Bizjak 98b5dc6118 libgcov-util.c: Add space between string literal and macro name.
* libgcov-util.c: Add space between string literal and macro name.

From-SVN: r223073
2015-05-12 16:40:49 +02:00
Sandra Loosemore 5a0ff57c48 unknown-elf.h (STARTFILE_SPEC): Add conditional linking of crtfastmath.o.
2015-05-06  Sandra Loosemore  <sandra@codesourcery.com>
	    Chris Jones  <chrisj@nvidia.com>
	    Joshua Conner  <jconner@nvidia.com>

	gcc/
	* config/arm/unknown-elf.h (STARTFILE_SPEC): Add conditional
	linking of crtfastmath.o.
	* config/arm/linux-eabi.h (STARTFILE_SPEC): Likewise.

	libgcc/
	* config.host (arm*-*-linux*): Add support for crtfastmath.o.
	(arm*-*-uclinux*): Likewise.
	(arm*-*-eabi* | arm*-*-rtems*): Likewise.
	* config/arm/crtfastmath.c: New file.


Co-Authored-By: Chris Jones <chrisj@nvidia.com>
Co-Authored-By: Joshua Conner <jconner@nvidia.com>

From-SVN: r222857
2015-05-06 12:01:05 -04:00
Bernd Schmidt d28ad5d4c5 Fix libgcc installation for offload targets.
* Makefile.in (real_host_noncanonical): New variable.
	(libsubdir): Use it.
	* configure.ac (real_host_noncanonical): Compute.  Remove special
	case for intelmicemul.
	* configure: Regenerate.

From-SVN: r222585
2015-04-29 16:52:45 +00:00
Uros Bizjak cc86234f0f elf-lib.h: New file.
libgcc/ChangeLog:

	* config/frv/elf-lib.h: New file.
	(CRT_GET_RFIB_DATA): Move definition from gcc/config/frv/frv.h.
	* libgcc/config.host (frv-*elf, frv-*-*linux*): Add frv/elf-lib.h
	to tm_file.

	* config/frv/frvbengin.c: Do not include defaults.h
	* config/frv/frvend.c: Ditto.

gcc/ChangeLog:

	* config/frv/frv.h (CRT_GET_RFIB_DATA): Move definition to
	libgcc/config/frv/elf-lib.h.

From-SVN: r222519
2015-04-28 11:23:40 +02:00
Yoshinori Sato 2f6bd6eb67 config.gcc: Add h8300-*-linux.
gcc/
	* config.gcc: Add h8300-*-linux.
	* config/h8300/linux.h: New.
	* config/h8300/t-linux: New.
	* config/h8300/h8300.c (h8300_option_override): Normal mode
	is not supported for h8300-*-linux.
	(h8300_file_start): Target priority change.
	(get_shift_alg): Likewise.
	(h8300_shift_need_scratch_p): Likewise.
	* config/h8300/h8300.h (TARGET_CPU_CPP_BUILTINS): Likewise.
	* config/h8300/h8300.md (define_peephole2): Remove duplicate condition.

libgcc/

	* config.host: Add h8300-*-linux
	* config/h8300/t-linux: New file.
	* config/h8300/lib1funs.s: Change symbol prefix.
	* config/h8300/sfp-machine.h: 64bit double support.

From-SVN: r222479
2015-04-27 13:16:27 -06:00
Gregor Richards 15aa7b4472 unwind fix for musl
On behalf of szabolcs.nagy@arm.com

2015-04-22  Gregor Richards  <gregor.richards@uwaterloo.ca>
	    Szabolcs Nagy  <szabolcs.nagy@arm.com>

	* unwind-dw2-fde-dip.c (USE_PT_GNU_EH_FRAME): Define it on
	Linux if target provides dl_iterate_phdr.

Co-Authored-By: Szabolcs Nagy <szabolcs.nagy@arm.com>

From-SVN: r222328
2015-04-22 14:20:01 +00:00
H.J. Lu abd0cdc9c0 Hide __cpu_indicator_init/__cpu_model from linker
We shouldn't call external function, __cpu_indicator_init, while an object
is being relocated since its .got.plt section hasn't been updated.  It
works for non-PIE since no update on .got.plt section is required.  This
patch creates libgcc.so as a linker script, hides __cpu_indicator_init
and __cpu_model in libgcc.so.1 from linker, forces linker to resolve
__cpu_indicator_init and __cpu_model to their hidden definitions in
libgcc.a while providing backward binary compatibility.

gcc/testsuite/

	PR target/65612
	* g++.dg/ext/mv18.C: New test.
	* g++.dg/ext/mv19.C: Likewise.
	* g++.dg/ext/mv20.C: Likewise.
	* g++.dg/ext/mv21.C: Likewise.
	* g++.dg/ext/mv22.C: Likewise.
	* g++.dg/ext/mv23.C: Likewise.

libgcc/

	PR target/65612
	* config.host (tmake_file): Add t-slibgcc-libgcc for Linux/x86.
	* config/i386/cpuinfo.c (__cpu_model): Initialize.
	(__cpu_indicator_init@GCC_4.8.0): New.
	(__cpu_model@GCC_4.8.0): Likewise.
	* config/i386/t-linux (HOST_LIBGCC2_CFLAGS): Add
	-DUSE_ELF_SYMVER.

From-SVN: r222178
2015-04-17 05:58:07 -07:00
Nick Clifton 72ed112686 rl78-opts.h (enum rl78_mul_types): Add MUL_G14 and MUL_UNINIT.
* config/rl78/rl78-opts.h (enum rl78_mul_types): Add MUL_G14 and
 	MUL_UNINIT.
 	(enum rl78_cpu_type): New.
 	* config/rl78/rl78-virt.md (attr valloc): Add divhi and divsi.
 	(umulhi3_shift_virt): Remove m constraint from operand 1.
 	(umulqihi3_virt): Likewise.
 	* config/rl78/rl78.c (rl78_option_override): Add code to process
 	-mcpu and -mmul options.
 	(rl78_alloc_physical_registers): Add code to handle divhi and
 	divsi valloc attributes.
 	(set_origin): Likewise.
 	* config/rl78/rl78.h (RL78_MUL_G14): Define.
 	(TARGET_G10, TARGET_G13, TARGET_G14): Define.
 	(TARGET_CPU_CPP_BUILTINS): Define __RL78_MUL_xxx__ and
 	__RL78_Gxx__.
 	(ASM_SPEC): Pass -mcpu on to assembler.
 	* config/rl78/rl78.md (mulqi3): Add a clobber of AX.
 	(mulqi3_rl78): Likewise.
 	(mulhi3_g13): Likewise.
 	(mulhi3): Generate the G13 or G14 versions of the insn directly.
 	(mulsi3): Likewise.
 	(mulhi3_g14): Add clobbers of AX and BC.
 	(mulsi3_g14): Likewise.
 	(mulsi3_g13): Likewise.
 	(udivmodhi4, udivmodhi4_g14, udivmodsi4): New patterns.
 	(udivmodsi4_g14, udivmodsi4_g13): New patterns.
 	* config/rl78/rl78.opt (mmul): Initialise value to
 	RL78_MUL_UNINIT.
 	(mcpu): New option.
 	(m13, m14, mrl78): New option aliases.
 	* config/rl78/t-rl78 (MULTILIB_OPTIONS): Add mg13 and mg14.
 	(MULTILIB_DIRNAMES): Add g13 and g14.
 	* doc/invoke.texi: Document -mcpu and -mmul options.

 	* config/rl78/divmodhi.S: Add G14 and G13 versions of the __divhi3
 	and __modhi3 functions.
	* config/rl78/divmodso.S: Add G14 and G13 versions of the
 	__divsi3, __udivsi3, __modsi3 and __umodsi3 functions.

From-SVN: r222142
2015-04-16 07:57:56 +00:00
Chen Gang d26b2237b3 gthr-single.h (__GTHREAD_MUTEX_INIT_FUNCTION): Use empty do-while loop as macro body to avoid warnings.
2015-04-15  Chen Gang  <gang.chen.5i5j@gmail.com>

       * gthr-single.h (__GTHREAD_MUTEX_INIT_FUNCTION): Use empty
       do-while loop as macro body to avoid warnings.

From-SVN: r222127
2015-04-15 09:29:12 -06:00
Jakub Jelinek cacf1f5906 re PR target/65351 (libiberty's pic version contains non-pic code on m32 darwin; causes bootstrap fail building libcc1.)
PR target/65351
config/
	* mh-darwin: Only apply -mdynamic-no-pic for m32 Darwin when the compiler in
	use supports -mno-dynamic-no-pic.
	* picflag.m4: Only append -mno-dynamic-no-pic for Darwin when -mdynamic-no-pic
	is present in CFLAGS.

libiberty/
	* configure: Regenerate.
libada/
	* configure: Regenerate.
libgcc/
	* configure: Regenerate.
gcc/
	* configure: Regenerate.


Co-Authored-By: Iain Sandoe <iain@codesourcery.com>

From-SVN: r221967
2015-04-10 06:43:52 +00:00
Jakub Jelinek e8a4ed3b9d re PR target/65351 (libiberty's pic version contains non-pic code on m32 darwin; causes bootstrap fail building libcc1.)
PR target/65351
config/
	* picflag.m4: Append -mno-dynamic-no-pic for Darwin.
libiberty/
	* configure: Regenerate.
libada/
	* configure: Regenerate.
libgcc/
	* configure: Regenerate.
gcc/
	* configure: Regenerate.

Co-Authored-By: Iain Sandoe <iain@codesourcery.com>

From-SVN: r221891
2015-04-07 11:57:46 +02:00
Chung-Lin Tang 0341335e61 config.host (nios2-*-linux*): Remove 'extra_parts' setting.
2015-03-25  Chung-Lin Tang  <cltang@codesourcery.com>

	libgcc/
	* config.host (nios2-*-linux*): Remove 'extra_parts' setting.

From-SVN: r221653
2015-03-25 08:32:17 +00:00
Max Filippov 590e26360c Implement call0 ABI for xtensa
call0 is an ABI that doesn't use register windows.

2015-03-03  Max Filippov  <jcmvbkbc@gmail.com>

gcc/
	* config/xtensa/constraints.md ("a" constraint): Include stack
	pointer in case of call0 ABI.
	("q" constraint): Make empty in case of call0 ABI.
	("D" constraint): Include stack pointer in case of call0 ABI.
	* config/xtensa/xtensa-protos.h (xtensa_set_return_address,
	xtensa_expand_epilogue, xtensa_regno_to_class): Add new function
	prototypes.
	* config/xtensa/xtensa.c (xtensa_callee_save_size): New
	variable.
	(xtensa_regno_to_class): Make it a local variable in the
	function xtensa_regno_to_class.
	(xtensa_function_epilogue, TARGET_ASM_FUNCTION_EPILOGUE): Remove
	macro, function prototype and implementation.
	(reg_nonleaf_alloc_order): Make it a local variable in the
	function order_regs_for_local_alloc.
	(xtensa_conditional_register_usage): New function.
	(TARGET_CONDITIONAL_REGISTER_USAGE): Define macro.
	(xtensa_valid_move): Allow direct moves to stack pointer
	register in call0 ABI.
	(xtensa_setup_frame_addresses): Only spill register windows in
	windowed ABI.
	(xtensa_emit_call): Emit call(x)8 or call(x)0 in windowed and
	call0 ABI respectively.
	(xtensa_function_arg_1): Only mark a7 register for copying in
	windowed ABI.
	(xtensa_call_save_reg): New function.
	(compute_frame_size): Add space for callee saved register
	storage to the frame size in call0 ABI.
	(xtensa_expand_prologue): Generate code to set up stack frame
	and save callee-saved registers in call0 ABI.
	(xtensa_expand_epilogue): New function.
	(xtensa_set_return_address): New function.
	(xtensa_return_addr): Calculate return address in call0 ABI.
	(xtensa_builtin_saveregs): Only mark a7 register for copying and
	emit copying code in windowed ABI.
	(order_regs_for_local_alloc): Add preferred register allocation
	order for non-leaf function in call0 ABI.
	(xtensa_static_chain): Add atatic chain passing for call0 ABI.
	(xtensa_asm_trampoline_template): Add trampoline generation for
	call0 ABI.
	(xtensa_trampoline_init): Add trampoline initialization for
	call0 ABI.
	(xtensa_conditional_register_usage, xtensa_regno_to_class): New
	functions.
	* config/xtensa/xtensa.h (TARGET_WINDOWED_ABI): New macro.
	(TARGET_CPU_CPP_BUILTINS): Add built-in define for call0 ABI.
	(CALL_USED_REGISTERS): Modify to encode both windowed and call0
	ABI call-used registers.
	(HARD_FRAME_POINTER_REGNUM): Add frame pointer for call0 ABI.
	(INCOMING_REGNO, OUTGOING_REGNO): Use argument unchanged in
	call0 ABI.
	(REG_CLASS_CONTENTS): Include all registers into the preferred
	reload registers set, adjust the set in the
	xtensa_conditional_register_usage.
	(xtensa_regno_to_class): Drop variable declaration.
	(REGNO_REG_CLASS): Redefine to use xtensa_regno_to_class
	function.
	(WINDOW_SIZE): Define as 8 or 0 for windowed and call0 ABI
	respectively.
	(FUNCTION_PROFILER): Add _mcount call for call0 ABI.
	(TRAMPOLINE_SIZE): Define trampoline size for call0 ABI.
	(RETURN_ADDR_IN_PREVIOUS_FRAME): Define to 0 in call0 ABI.
	(ASM_OUTPUT_POOL_PROLOGUE): Always generate literal pool
	location in call0 ABI.
	(EH_RETURN_STACKADJ_RTX): New definition, use a10 for passing
	stack adjustment size when handling exception.
	(CRT_CALL_STATIC_FUNCTION): Add definition for call0 ABI.
	* config/xtensa/xtensa.md (A9_REG, UNSPECV_BLOCKAGE): New
	definitions.
	("return" pattern): Generate ret.n/ret in call0 ABI.
	("epilogue" pattern): Expand epilogue.
	("nonlocal_goto" pattern): Use default in call0 ABI.
	("eh_return" pattern): Move implementation to eh_set_a0_windowed,
	emit eh_set_a0_* depending on ABI.
	("eh_set_a0_windowed" pattern): Former eh_return pattern.
	("eh_set_a0_call0", "blockage"): New patterns.

libgcc/
	* config/xtensa/lib2funcs.S (__xtensa_libgcc_window_spill,
	__xtensa_nonlocal_goto): Don't compile for call0 ABI.
	(__xtensa_sync_caches): Only use entry and retw in windowed ABI,
	use ret in call0 ABI.
	* config/xtensa/t-windowed: New file.
	* libgcc/config/xtensa/t-xtensa (LIB2ADDEH): Move to t-windowed.
	* libgcc/configure: Regenerated.
	* libgcc/configure.ac: Check if xtensa target is configured for
	windowed ABI and thus needs to use custom unwind code.

From-SVN: r221158
2015-03-03 17:44:01 +00:00
Jonathan Wakely 7727f8f2c0 re PR libgcc/64885 (libstdc++ all_attributes failure)
PR libgcc/64885
	* gthr-single.h: Use __unused__ attribute instead of unused.
	* config/gthr-vxworks.h: Likewise.
	* config/i386/gthr-win32.h: Likewise.

From-SVN: r221120
2015-03-02 18:02:18 +00:00
Kai Tietz 0e4a0def1e re PR libgcc/65038 ([regression 5] Unable to find ftw.h for libgcov-util.c)
PR target/65038
        * config.in: Regenerated.
        * configure: Likewise.
        * configure.ac (AC_HEADER_STDC): Added explicit.
        (AC_CHECK_HEADERS): Check for default headers  plus
        for ftw.h header.
        * libgcov-util.c (gcov_read_profile_dir): Disable use
        of ftw-function, if header is not found.
        (ftw_read_file): Likewise.

From-SVN: r221059
2015-02-27 14:19:38 +01:00
Kai Tietz 0824d92489 Revert change
From-SVN: r221058
2015-02-27 13:32:30 +01:00
Kai Tietz a2a5609b4b re PR libgcc/65038 ([regression 5] Unable to find ftw.h for libgcov-util.c)
PR target/65038
	* config.in: Regenerated.
	* configure: Likewise.
	* configure.ac (AC_HEADER_STDC): Add explicit.
	(AC_CHECK_HEADERS): Check for default headers
	plus for ftw.h one.
	* libgcov-util.c (gcov_read_profile_dir): Disable use
	of ftw-function, if header not found.
	(ftw_read_file): Don't translate if ftw header isn't
	present.

From-SVN: r221055
2015-02-27 13:05:02 +01:00
Thomas Schwinge b6530d0a50 [PR target/65181] nvptx libgcc: Prevent building "advanced" stuff (for example, gcov support)
When building GCC against a proper newlib sysroot, the libgcc build will
include more than what's built in the -Dinhibit_libc configuration used when
building newlib as part of the GCC build process.  See the inhibit_libc logic
in gcc/configure.ac.

To avoid...

    ptxas _gcov_indirect_call_topn_profiler.o, line 101; error   : Type or alignment of argument does not match formal parameter 'ptr'
    ptxas _gcov_indirect_call_topn_profiler.o, line 101; error   : Call has wrong number of parameters
    ptxas _gcov_indirect_call_topn_profiler.o, line 101; error   : Type or alignment of argument does not match formal parameter 'size'
    ptxas fatal   : Ptx assembly aborted due to errors
    nvptx-as: ptxas returned 255 exit status
    make[2]: *** [_gcov_indirect_call_topn_profiler.o] Error 1

..., "dumb down" the libgcc build:

	libgcc/
	PR target/65181
	* config/nvptx/t-nvptx (INHIBIT_LIBC_CFLAGS): Define to
	-Dinhibit_libc.

From-SVN: r220915
2015-02-23 18:51:41 +01:00
Sandra Loosemore 53cfb467cf bpabi.S (test_div_by_zero): Make label names consistent between thumb2 and arm mode cases.
2015-02-17  Sandra Loosemore  <sandra@codesourcery.com>

	libgcc/
	* config/arm/bpabi.S (test_div_by_zero): Make label names
	consistent between thumb2 and arm mode cases.  Separate the
	signed comparison on the high word of the numerator from the
	unsigned comparison on the low word.
	* config/arm/bpabi-v6m.S (test_div_by_zero): Similarly separate
	signed comparison.

	gcc/testsuite/
	* gcc.target/arm/divzero.c: New test case.

From-SVN: r220765
2015-02-17 12:39:22 -05:00
Joseph Myers 77d10a1b20 Avoid dependence on libc headers in nvptx realloc.
* config/nvptx/realloc.c: Include <stddef.h> instead of <stdlib.h>
	and <string.h>.
	(__nvptx_realloc): Call __builtin_memcpy instead of memcpy.

From-SVN: r220764
2015-02-17 16:19:56 +00:00
Kai Tietz 471274de91 Fixed pasto in ChangeLog
From-SVN: r220583
2015-02-10 15:14:09 +01:00
Rainer Emrich 981741888b re PR gcov-profile/61889 (gcov-tool.c uses nftw, ftw.h)
2015-02-10  Rainer Emrich  <rainer@emrich-ebersheim.de>

	PR gcov-profile/61889
	* libgcc/libgcov-driver-system.c: undefine clashing macro for mkdir.

From-SVN: r220582
2015-02-10 15:13:13 +01:00
Nick Clifton 771bef141f fpmath-sf.S (__rl78_int_pack_a_r8): Fix edge case rounding up the fraction.
* config/rl78/fpmath-sf.S (__rl78_int_pack_a_r8): Fix edge case
	rounding up the fraction.

	* config/rl78/rl78.c (rl78_note_reg_set): Note the use of REGs
	inside a MEM.

From-SVN: r220410
2015-02-04 16:39:16 +00:00
John David Anglin 407028931a linux-atomic.c (__kernel_cmpxchg2): Change declaration of oldval and newval to const void *.
* config/pa/linux-atomic.c (__kernel_cmpxchg2): Change declaration of
	oldval and newval to const void *.  Fix typo.
	(FETCH_AND_OP_2): Use __atomic_load_n to load value.
	(FETCH_AND_OP_WORD): Likewise.
	(OP_AND_FETCH_WORD): Likewise.
	(COMPARE_AND_SWAP_2): Likewise.
	(__sync_val_compare_and_swap_4): Likewise.
	(__sync_lock_test_and_set_4): Likewise.
	(SYNC_LOCK_RELEASE_2): Likewise.
	Remove support for long long atomic operations.

From-SVN: r220307
2015-01-31 19:45:53 +00:00
Caroline Tice f7f049fa46 Committing VTV Cygwin patch for Patrick Wollgast
* gcc/config/i386/cygwin.h (STARTFILE_SPEC): Add vtv_start.o,
    if -fvtable-verify=preinit/std is used.
* gcc/config/i386/mingw-w64.h (STARTFILE_SPEC): Likewise.
* gcc/config/i386/mingw32.h (STARTFILE_SPEC): Likewise.
* gcc/config/i386/cygwin.h (ENDFILE_SPEC): Add vtv_end.o,
    if -fvtable-verify=preinit/std is used.
* gcc/config/i386/mingw32.h (ENDFILE_SPEC): Likewise.
* gcc/config/i386/cygwin.h (LIB_SPEC): Pass -lvtv and -lpsapi,
    if -fvtable-verify=preinit/std is used.
* gcc/config/i386/mingw-w64.h (LIB_SPEC): Likewise.
* gcc/config/i386/mingw32.h (LIB_SPEC): Likewise.

* gcc/cp/vtable-class-hierarchy.c (vtv_generate_init_routine): Add
    check for not TARGET_PECOFF at the VTV_PREINIT_PRIORITY checks.

* gcc/varasm.c (assemble_variable): Add code to properly set the comdat
    section and name for the .vtable_map_vars section in case the
    target is PE or COFF.


* libgcc/Makefile.in: Move rules to build vtv_*.o out of the check
    for CUSTOM_CRTSTUFF.
* libgcc/config.host (i[34567]86-*-cygwin*, x86_64-*-cygwin*, i[34567]86-*-mingw*)
    (x86_64-*-mingw*): Only add vtv_*.o to extra_parts if enable_vtable_verify.


* libstdc++-v3/acinclude.m4: Define VTV_CYGMIN.
* libstdc++-v3/configure: Regenerate.

* libstdc++-v3/libsupc++/Makefile.am: Add vtv_sources only to
    libsupc___la_SOURCES and libsupc__convenience_la_SOURCES if VTV_CYGMIN is
    not set.
* libstdc++-v3/libsupc++/Makefile.in: Regenerated.
* libstdc++-v3/libsupc++/vtv_stubs.cc: Add none weak declaration of every
    function for Cygwin and MinGW.

* libstdc++-v3/src/Makefile.am: Add libvtv.la to toolexeclib_LTLIBRARIES,
    if VTV_CYGMIN is set. Define libvtv_la_SOURCES, libvtv_la_LDFLAGS,
    libvtv_la_AM_CXXFLAGS and libvtv_la_LINK if VTV_CYGMIN is set.
* libstdc++-v3/src/Makefile.in: Regenerate.


* libvtv/Makefile.am : Add libvtv.la to toolexeclib_LTLIBRARIES, if VTV_CYGMIN
    is set. Define libvtv_la_LIBADD, libvtv_la_LDFLAGS, libvtv_stubs_la_LDFLAGS
    and libvtv_stubs_la_SOURCES if VTV_CYGMIN is set. Add obstac.c to
    libvtv_la_SOURCES if VTV_CYGMIN is set.
* libvtv/Makefile.in : Regenerate.
* libvtv/aclocal.m4 : Regenerate.
* libvtv/configure : Regenerate.
* libvtv/configure.ac : Add ACX_LT_HOST_FLAGS. Define VTV_CYGMIN.
* libvtv/configure.tgt : (x86_64-*-cygwin*, i?86-*-cygwin*, x86_64-*-mingw*)
    (i?86-*-mingw*): Add to supported targets.
* libvtv/vtv_fail.cc : Skip inclusion of execinfo.h on Cygwin and MinGW.
(log_error_message): Skip calls to backtrace and backtrace_symbols_fd on Cygwin
    and MinGW.
* libvtv/vtv_malloc.cc : Include windows.h and skip sys/mman.h inclusion on
    Cygwin and MinGW. Add sysconf port on Cygwin and MinGW.
(obstack_chunk_alloc): Exchange call to mmap with call to VirtualAlloc on Cygwin
    and MinGW.
(__vtv_malloc_init): Exchange call to sysconf with call to port of sysconf on
    Cygwin and MinGW.
* libvtv/vtv_malloc.h : Declare mprotect and define PROT_READ and PROT_WRITE on
    Cygwin and MinGW.
* libvtv/map.h : Include stdint.h on MinGW.
* libvtv/rts.cc : Include windows.h, winternl.h and psapi.h, skip include of
    execinfo.h, sys/mman.h and link.h on Cygwin and MinGW.
    Add port of __fortify_fail on Cygwin and MinGW.
    Change ElfW (Addr) to uintptr_t on Cygwin and MinGW.
(read_section_offset_and_length): Add port for Cygwin and MinGW
(iterate_modules): New function.
(vtv_unprotect_vtable_vars): Use iterate_modules instead of dl_iterate_phdr on
    Cygwin and MinGW.
(vtv_protect_vtable_vars): Likewise.
(count_all_pages): Likewise.
(dl_iterate_phdr_count_pages): Don't build on Cygwin and MinGW.
* libvtv/utils.cc : Include windows.h and skip execinfo.h inclusion on
    Cygwin and MinGW.
(__vtv_open_log): Exchange call to getuid and getpid with GetCurrentProcessId and
    adjust call to snprintf accordingly on Cygwin and MinGW.
    Adjust calls to mkdir on MinGW.
    Adjust call to open on Cygwin and MinGW.
(__vtv_add_to_log): Adjust call to snprintf on Cygwin and MinGW.
(__vtv_log_verification_failure): Don't generate a backtrace on Cygwin and MinGW.

From-SVN: r220232
2015-01-29 00:03:56 -08:00
Nick Clifton 8410904a77 cmpsi2.S: Use function start and end macros.
* config/rl78/cmpsi2.S: Use function start and end macros.
	(__gcc_bcmp): New function.
	* config/rl78/lshrsi3.S: Use function start and end macros.
	* config/rl78/mulsi3.S: Add support for G10.
	(__mulqi3): New function for G10.
	* config/rl78/signbit.S: Use function start and end macros.
	* config/rl78/t-rl78 (LIB2ADD): Add bit-count.S, fpbit-sf.S and
	fpmath-sf.S.
	(LIB2FUNCS_EXCLUDE): Define.
	(LIB2FUNCS_ST): Define.
	* config/rl78/trampoline.S: Use function start and end macros.
	* config/rl78/vregs.h (START_FUNC): New macro.
	(START_ANOTHER_FUNC): New macro.
	(END_FUNC): New macro.
	(END_ANOTHER_FUNC): New macro.
	* config/rl78/bit-count.S: New file.  Contains assembler
	implementations of the bit counting functions: ___clzhi2,
	__clzsi2, ctzhi2, ctzsi2, ffshi2, ffssi2, __partityhi2,
	__paritysi2, __popcounthi2 and __popcountsi2.
	* config/rl78/fpbit-sf.S: New file.  Contains assembler
	implementationas of the math functions: __negsf2, __cmpsf2,
	__eqsf2, __nesf2, __lesf2, __ltsf2, __gesf2, gtsf2, __unordsf2,
	__fixsfsi,  __fixunssfsi, __floatsisf and __floatunssisf.
	* config/rl78/fpmath-sf.S: New file.  Contains assembler
	implementations of the math functions: __subsf3, __addsf3,
	__mulsf3 and __divsf3

From-SVN: r220162
2015-01-27 11:36:01 +00:00
Rainer Orth f962fbf14c Move Solaris/x86 CRT_GET_RFIB_DATA definition to libgcc
gcc:
	* config/i386/sysv4.h (CRT_GET_RFIB_DATA): Remove.

	libgcc:
	* config.host (i[34567]86-*-solaris2*, x86_64-*-solaris2.1[0-9]*):
	Add i386/elf-lib.h to tm_file.
	* config/i386/elf-lib.h: Fix comment.
	* unwind-dw2-fde-dip.c (_Unwind_IteratePhdrCallback) [__x86_64__
	&& __sun__ && __svr4__]: Remove workaround.

From-SVN: r220160
2015-01-27 10:02:26 +00:00
Allan Sandfeld Jensen 939911c558 i386.c (get_builtin_code_for_version): Add support for BMI and BMI2 multiversion functions.
gcc/ChangeLog:

	* config/i386/i386.c (get_builtin_code_for_version): Add
	support for BMI and BMI2 multiversion functions.
	(fold_builtin_cpu): Add F_BMI and F_BMI2.

libgcc/ChangeLog:

	* config/i386/cpuinfo.c (enum processor_features): Add FEATURE_BMI and
	FEATURE_BMI2.
	(get_available_features): Detect FEATURE_BMI and FEATURE_BMI2.

testsuite/ChangeLog:

	* gcc.target/i386/funcspec-5.c: Test new multiversion targets.
	* g++.dg/ext/mv17.C: Test BMI/BMI2 multiversion dispatcher.


Co-Authored-By: Uros Bizjak <ubizjak@gmail.com>

From-SVN: r220095
2015-01-25 19:17:46 +01:00
H.J. Lu c8f2dff2c6 Support new Intel processor model numbers
gcc/

	* config/i386/driver-i386.c (host_detect_local_cpu): Check new
	Silvermont, Haswell, Broadwell and Knights Landing model numbers.
	* config/i386/i386.c (processor_model): Add
	M_INTEL_COREI7_BROADWELL.
	(arch_names_table): Add "broadwell".

gcc/testsuite/

	* gcc.target/i386/builtin_target.c (check_intel_cpu_model): Add
	Silvermont, Ivy Bridge, Haswell and Broadwell tests.  Update Sandy
	Bridge test.

2015-01-24  H.J. Lu  <hongjiu.lu@intel.com>

	* config/i386/cpuinfo.c (processor_subtypes): Add
	INTEL_COREI7_BROADWELL.
	(get_intel_cpu): Support new Silvermont, Haswell and Broadwell
	model numbers.

From-SVN: r220090
2015-01-24 20:42:50 -08:00
Uros Bizjak 7bbf973451 elf-lib.h: New file.
libgcc/ChangeLog:

	* config/i386/elf-lib.h: New file.
	(CRT_GET_RFIB_DATA): Move definition from gcc/config/i386/gnu-user.h.
	Wrap definition in #ifdef __i386__.
	* libgcc/config.host (i[34567]86-*-linux*, i[34567]86-*-kfreebsd*-gnu)
	(i[34567]86-*-knetbsd*-gnu, i[34567]86-*-gnu*)
	(i[34567]86-*-kopensolaris*-gnu, x86_64-*-linux*)
	(x86_64-*-kfreebsd*-gnu, x86_64-*-knetbsd*-gnu): Add i386/elf-lib.h
	to tm_file.

gcc/ChangeLog:

	* config/i386/gnu-user.h (CRT_GET_RFIB_DATA): Move definition to
	libgcc/config/i386/elf-lib.h.

From-SVN: r220056
2015-01-23 20:46:43 +01:00
Chen Gang 324820f162 unwind-dw2-fde.h (last_fde): Use "(const fde *)" instead of "(char *)" to avoid qualifier warning by 'xgcc'...
* unwind-dw2-fde.h (last_fde): Use "(const fde *)" instead of
 	"(char *)" to avoid qualifier warning by 'xgcc' compiling.

From-SVN: r220004
2015-01-22 09:22:31 -07:00
Chung-Lin Tang a9ce4e4a70 nios2.c (nios2_asm_file_end): Implement TARGET_ASM_FILE_END hook for adding .note.GNU-stack section when needed.
2015-01-20  Chung-Lin Tang  <cltang@codesourcery.com>

	gcc/
	* config/nios2/nios2.c (nios2_asm_file_end): Implement
	TARGET_ASM_FILE_END hook for adding .note.GNU-stack section when
	needed.
	(TARGET_ASM_FILE_END): Define.

	libgcc/
	* config/nios2/linux-unwind.h (nios2_fallback_frame_state):
	Update rt_sigframe format and address for current Nios II
	Linux conventions.

From-SVN: r219898
2015-01-20 14:49:51 +00:00
Andreas Tobler 82a19768cb configure.ac: Don't add ${libgcj} for arm*-*-freebsd*.
toplevel:

    * configure.ac: Don't add ${libgcj} for arm*-*-freebsd*.
    * configure: Regenerate.
gcc:
    * config.gcc (arm*-*-freebsd*): New configuration.
    * config/arm/freebsd.h: New file.
    * config.host: Add extra components for arm*-*-freebsd*.
    * config/arm/arm.h: Introduce MAX_SYNC_LIBFUNC_SIZE.
    * config/arm/arm.c (arm_init_libfuncs): Use MAX_SYNC_LIBFUNC_SIZE.

libgcc:

    * config.host (arm*-*-freebsd*): Add new configuration for
    arm*-*-freebsd*.
    * config/arm/freebsd-atomic.c: New file.
    * config/arm/t-freebsd: Likewise.
    * config/arm/unwind-arm.h: Add __FreeBSD__ to the list of
    'PC-relative indirect' OS's.

libatomic:

    * configure.tgt: Exclude arm*-*-freebsd* from try_ifunc.

libstdc++-v3:

    * configure.host: Add arm*-*-freebsd* port_specific_symbol_files.

From-SVN: r219388
2015-01-09 15:06:02 +01:00
Eric Botcazou 0969ec7d5d configure.ac: Add Visium support.
* configure.ac: Add Visium support.
	* configure: Regenerate.
libgcc/
	* config.host: Add Visium support.
	* config/visium: New directory.
gcc/
	* config.gcc: Add Visium support.
	* configure.ac: Likewise.
	* configure: Regenerate.
	* doc/extend.texi (interrupt attribute): Add Visium.
	* doc/invoke.texi: Document Visium options.
	* doc/install.texi: Document Visium target.
	* doc/md.texi: Document Visium constraints.
	* common/config/visium: New directory.
	* config/visium: Likewise.
gcc/testsuite/
	* lib/target-supports.exp (check_profiling_available): Return 0 for
	Visium.
	(check_effective_target_tls_runtime): Likewise.
	(check_effective_target_logical_op_short_circuit): Return 1 for Visium.
	* gcc.dg/20020312-2.c: Adjust for Visium.
	* gcc.dg/tls/thr-cse-1.c: Likewise
	* gcc.dg/tree-ssa/20040204-1.c: Likewise
	* gcc.dg/tree-ssa/loop-1.c: Likewise.
	* gcc.dg/weak/typeof-2.c: Likewise.

From-SVN: r219219
2015-01-06 08:50:12 +00:00
Jakub Jelinek 5624e564d2 Update copyright years.
From-SVN: r219188
2015-01-05 13:33:28 +01:00
Matthew Fortune 82f84ecbb4 MIPS32R6 and MIPS64R6 support
gcc/

	* config.gcc: Add mipsisa64r6 and mipsisa32r6 cpu support.
	* config/mips/constraints.md (ZD): Add r6 restrictions.
	* config/mips/gnu-user.h (DRIVER_SELF_SPECS): Add MIPS_ISA_LEVEL_SPEC.
	* config/mips/loongson.md
	(<u>div<mode>3, <u>mod<mode>3): Move to mips.md.
	* config/mips/mips-cpus.def (mips32r6, mips64r6): Define.
	* config/mips/mips-modes.def (CCF): New mode.
	* config/mips/mips-protos.h
	(mips_9bit_offset_address_p): New prototype.
	* config/mips/mips-tables.opt: Regenerate.
	* config/mips/mips.c (MIPS_JR): Use JALR $, <reg> for R6.
	(mips_rtx_cost_data): Add pseudo-processors W32 and W64.
	(mips_9bit_offset_address_p): New function.
	(mips_rtx_costs): Account for R6 multiply and FMA instructions.
	(mips_emit_compare): Implement R6 FPU comparisons.
	(mips_expand_conditional_move): Implement R6 selects.
	(mips_expand_conditional_trap): Account for removed trap immediate.
	(mips_expand_block_move): Disable inline move when LWL/LWR are removed.
	(mips_print_float_branch_condition): Update for R6 FPU branches.
	(mips_print_operand): Handle CCF mode compares.
	(mips_interrupt_extra_call_saved_reg_p): Do not attempt to callee-save
	MD_REGS for R6.
	(mips_hard_regno_mode_ok_p): Support CCF mode.
	(mips_mode_ok_for_mov_fmt_p): Likewise.
	(mips_secondary_reload_class): CCFmode can be loaded directly.
	(mips_set_fast_mult_zero_zero_p): Account for R6 multiply instructions.
	(mips_option_override): Ensure R6 is used with fp64.  Set default
	mips_nan modes.  Check for mips_nan support.  Prevent DSP with R6.
	(mips_conditional_register_usage): Disable MD_REGS for R6. Disable
	FPSW for R6.
	(mips_mulsidi3_gen_fn): Support R6 multiply instructions.
	* config/mips/mips.h (ISA_MIPS32R6, ISA_MIPS64R6): Define.
	(TARGET_CPU_CPP_BUILTINS): Rework for mips32/mips64.
	(ISA_HAS_JR): New macro.
	(ISA_HAS_HILO): New macro.
	(ISA_HAS_R6MUL): Likewise.
	(ISA_HAS_R6DMUL): Likewise.
	(ISA_HAS_R6DIV): Likewise.
	(ISA_HAS_R6DDIV): Likewise.
	(ISA_HAS_CCF): Likewise.
	(ISA_HAS_SEL): Likewise.
	(ISA_HAS_COND_TRAPI): Likewise.
	(ISA_HAS_FP_MADDF_MSUBF): Likewise.
	(ISA_HAS_LWL_LWR): Likewise.
	(ISA_HAS_IEEE_754_LEGACY): Likewise.
	(ISA_HAS_IEEE_754_2008): Likewise.
	(ISA_HAS_PREFETCH_9BIT): Likewise.
	(MIPSR6_9BIT_OFFSET_P): New macro.
	(BASE_DRIVER_SELF_SPECS): Use MIPS_ISA_DRIVER_SELF_SPECS.
	(DRIVER_SELF_SPECS): Use MIPS_ISA_LEVEL_SPEC.
	(MULTILIB_ISA_DEFAULT): Handle mips32r6 and mips64r6.
	(MIPS_ISA_LEVEL_SPEC): Likewise.
	(MIPS_ISA_SYNCI_SPEC): Likewise.
	(ISA_HAS_64BIT_REGS): Likewise.
	(ISA_HAS_BRANCHLIKELY): Likewise.
	(ISA_HAS_MUL3): Likewise.
	(ISA_HAS_DMULT): Likewise.
	(ISA_HAS_DDIV): Likewise.
	(ISA_HAS_DIV): Likewise.
	(ISA_HAS_MULT): Likewise.
	(ISA_HAS_FP_CONDMOVE): Likewise.
	(ISA_HAS_8CC): Likewise.
	(ISA_HAS_FP4): Likewise.
	(ISA_HAS_PAIRED_SINGLE): Likewise.
	(ISA_HAS_MADD_MSUB): Likewise.
	(ISA_HAS_FP_RECIP_RSQRT): Likewise.
	* config/mips/mips.md (processor): Add w32 and w64.
	(FPCC): New mode iterator.
	(reg): Add CCF mode.
	(fpcmp): New mode attribute.
	(fcond): Add ordered, ltgt and ne codes.
	(fcond): Update code attribute.
	(sel): New code attribute.
	(selinv): Likewise.
	(ctrap<mode>4): Update condition.
	(*conditional_trap_reg<mode>): New define_insn.
	(*conditional_trap<mode>): Update condition.
	(mul<mode>3): Expand R6 multiply instructions.
	(<su>mulsi3_highpart): Likewise.
	(<su>muldi3_highpart): Likewise.
	(mul<mode>3_mul3_loongson): Rename...
	(mul<mode>3_mul3_hilo): To this.  Add R6 mul instruction.
	(<u>mulsidi3_32bit_r6): New expander.
	(<u>mulsidi3_32bit): Restrict to pre-r6 multiplies.
	(<u>mulsidi3_32bit_r4000): Likewise.
	(<u>mulsidi3_64bit): Likewise.
	(<su>mulsi3_highpart_internal): Likewise.
	(mulsidi3_64bit_r6dmul): New instruction.
	(<su>mulsi3_highpart_r6): Likewise.
	(<su>muldi3_highpart_r6): Likewise.
	(fma<mode>4): Likewise.
	(movccf): Likewise.
	(*sel<code><GPR:mode>_using_<GPR2:mode>): Likewise.
	(*sel<mode>): Likewise.
	(<u>div<mode>3): Moved from loongson.md.  Add R6 instructions.
	(<u>mod<mode>3): Likewise.
	(extvmisalign<mode>): Require ISA_HAS_LWL_LWR.
	(extzvmisalign<mode>): Likewise.
	(insvmisalign<mode>): Likewise.
	(mips_cache): Account for R6 displacement field sizes.
	(*branch_fp): Rename...
	(*branch_fp_<mode>): To this.  Add CCFmode support.
	(*branch_fp_inverted): Rename...
	(*branch_fp_inverted_<mode>): To this.  Add CCFmode support.
	(s<code>_<mode>): Rename...
	(s<code>_<SCALARF:mode>_using_<FPCC:mode>): To this.  Add FCCmode
	condition support.
	(s<code>_<mode> swapped): Rename...
	(s<code>_<SCALARF:mode>_using_<FPCC:mode> swapped): To this. Add
	CCFmode condition support.
	(mov<mode>cc GPR): Expand R6 selects.
	(mov<mode>cc FPR): Expand R6 selects.
	(*tls_get_tp_<mode>_split): Do not .set push for >= mips32r2.
	* config/mips/netbsd.h (TARGET_CPU_CPP_BUILTINS): Update similarly to
	mips.h.
	(ASM_SPEC): Add mips32r6, mips64r6.
	* config/mips/t-isa3264 (MULTILIB_OPTIONS, MULTILIB_DIRNAMES): Update
	for mips32r6/mips64r6.
	* doc/invoke.texi: Document -mips32r6,-mips64r6.
	* doc/md.texi: Update comment for ZD constraint.

libgcc/

	* config.host: Support mipsisa32r6 and mipsisa64r6.
	* config/mips/mips16.S: Do not build for R6.

gcc/testsuite/

	* gcc.dg/torture/mips-hilo-2.c: Unconditionally pass for R6 onwards.
	* gcc.dg/torture/pr19683-1.c: Likewise.
	* gcc.target/mips/branch-cost-2.c: Require MOVN.
	* gcc.target/mips/movcc-1.c: Likewise.
	* gcc.target/mips/movcc-2.c: Likewise.
	* gcc.target/mips/movcc-3.c: Likewise.
	* gcc.target/mips/call-saved-4.c: Require LDC.
	* gcc.target/mips/dmult-1.c: Require R5 or earlier.
	* gcc.target/mips/fpcmp-1.c: Likewise.
	* gcc.target/mips/fpcmp-2.c: Likewise.
	* gcc.target/mips/neg-abs-2.c: Likewise.
	* gcc.target/mips/timode-1.c: Likewise.
	* gcc.target/mips/unaligned-1.c: Likewise.
	* gcc.target/mips/madd-3.c: Require MADD.
	* gcc.target/mips/madd-9.c: Likewise.
	* gcc.target/mips/maddu-3.c: Likewise.
	* gcc.target/mips/msub-3.c: Likewise.
	* gcc.target/mips/msubu-3.c: Likewise.
	* gcc.target/mips/mult-1.c: Require INS and not DMUL.
	* gcc.target/mips/mips-ps-type-2.c: Require MADD.PS.
	* gcc.target/mips/mips.exp (mips_option_groups): Add ins, dmul, ldc,
	movn, madd, maddps.
	(mips-dg-options): INS available from R2.  LDC available from MIPS II,
	DMUL is present in octeon.  Describe all features removed from R6.

Co-Authored-By: Steve Ellcey <sellcey@imgtec.com>

From-SVN: r218973
2014-12-19 20:17:36 +00:00
Oleg Endo 69044fa9eb crt.h: New.
libgcc/
	* config/sh/crt.h: New.
	* config/sh/crti.S: Use GLOBAL macro from crt.h for _init and _fini
	symbols.
	* config/sh/crt1.S: Likewise.

From-SVN: r218807
2014-12-17 02:01:10 +00:00
Uros Bizjak 2405e0ea00 re PR libgcc/63832 (crtstuff.c:400:19: warning: array subscript is above array bounds [-Warray-bounds])
PR libgcc/63832
	* crtstuff.c (__do_global_dtors_aux) [HIDDEN_DTOR_LIST_END]: Use
	func_ptr *dtor_list temporary variable to avoid "array subscript
	is above array bounds" warnings.

From-SVN: r218759
2014-12-15 19:43:26 +01:00
David Edelsohn a06478dd6c Commit missing part of patch.
From-SVN: r218608
2014-12-10 16:14:36 -05:00
Oleg Endo 3f6ad8df42 Fix date in change log entry.
From-SVN: r218542
2014-12-09 22:44:12 +00:00
Oleg Endo 7d0ee249ba Add missing link to PR in change log entry.
From-SVN: r218541
2014-12-09 22:40:20 +00:00
Michael Haubenwallner dd91332382 (libgcc_s) Optional filename-based shared library versioning on AIX.
2014-12-09  Michael Haubenwallner <michael.haubenwallner@ssi-schaefer.com>

        (libgcc_s) Optional filename-based shared library versioning on AIX.
        * gcc/doc/install.texi: Describe --with-aix-soname option.
        * Makefile.in (with_aix_soname): Define.
        * config/rs6000/t-slibgcc-aix: Act upon --with-aix-soname option.
        * configure.ac: Accept --with-aix-soname=aix|svr4|both option.
        * configure: Recreate.

From-SVN: r218539
2014-12-09 15:48:48 -05:00
Olivier Hainque a66272f6d2 defaults.h: (DWARF_REG_TO_UNWIND_COLUMN): Define default.
2014-12-05  Olivier Hainque  <hainque@adacore.com>

        gcc/
        * defaults.h: (DWARF_REG_TO_UNWIND_COLUMN): Define default.
        * dwarf2cfi.c (init_one_dwarf_reg_size): Honor
        DWARF_REG_TO_UNWIND_COLUMN.

        libgcc/
        * unwind-dw2.c (DWARF_REG_TO_UNWIND_COLUMN): Remove default def,
        now provided by defaults.h.

From-SVN: r218429
2014-12-05 17:01:42 +00:00
Oleg Endo 6342b2c592 lib1funcs.S: Check value of __SHMEDIA__ instead of checking whether it's defined.
libgcc/
	* config/sh/lib1funcs.S: Check value of __SHMEDIA__ instead of checking
	whether it's defined.

From-SVN: r218190
2014-11-30 19:03:29 +00:00
Ilya Tocar c17eac8561 Support avx512f in __builtin_cpu_supports.
gcc/

        * config/i386/cpuid.h (bit_MPX, bit_BNDREGS, bit_BNDCSR):
        Define.
        * config/i386/i386.c (get_builtin_code_for_version): Add avx512f.
        (fold_builtin_cpu): Ditto.
        * doc/extend.texi: Documment it.



gcc/testsuite/

        * g++.dg/ext/mv2.C: Add test for target ("avx512f").
        * gcc.target/i386/builtin_target.c: Ditto.



libgcc/

        * config/i386/cpuinfo.c (processor_features): Add FEATURE_AVX512F.
        * config/i386/cpuinfo.c (get_available_features): Detect it.

From-SVN: r218125
2014-11-27 16:51:10 +03:00
Tony Wang 1025cb6c0d lib1funcs.S (FUNC_START): Add conditional section redefine for macro L_arm_muldivsf3 and L_arm_muldivdf3.
2014-11-27  Tony Wang  <tony.wang@arm.com>

    libgcc/
    * config/arm/lib1funcs.S (FUNC_START): Add conditional section
    redefine for macro L_arm_muldivsf3 and L_arm_muldivdf3.
    (SYM_END, ARM_SYM_START): Add macros used to expose function Symbols.

From-SVN: r218124
2014-11-27 13:38:51 +00:00
Segher Boessenkool d19f2e385c crtstuff.c (__do_glbal_ctors_1): Add missing semicolon.
libgcc/
	* crtstuff.c (__do_glbal_ctors_1): Add missing semicolon.

From-SVN: r218055
2014-11-25 18:50:29 +01:00
John David Anglin 17f6e9a357 linux-atomic.c (ABORT_INSTRUCTION): Use __builtin_trap() instead.
* config/pa/linux-atomic.c (ABORT_INSTRUCTION): Use __builtin_trap()
	instead.

From-SVN: r218033
2014-11-24 23:39:47 +00:00
Guy Martin 0cd7c67283 linux-atomic.c (__kernel_cmpxchg2): New.
* config/pa/linux-atomic.c (__kernel_cmpxchg2): New.
	(FETCH_AND_OP_2): New.  Use for subword and double word operations.
	(OP_AND_FETCH_2): Likewise.
	(COMPARE_AND_SWAP_2): Likewise.
	(SYNC_LOCK_TEST_AND_SET_2): Likewise.
	(SYNC_LOCK_RELEASE_2): Likewise.
	(SUBWORD_SYNC_OP): Remove.
	(SUBWORD_VAL_CAS): Likewise.
	(SUBWORD_BOOL_CAS): Likewise.
	(FETCH_AND_OP_WORD): Update.
	Consistently use signed types.
	

Co-Authored-By: John David Anglin <danglin@gcc.gnu.org>

From-SVN: r217956
2014-11-22 00:18:49 +00:00
Bernd Schmidt 85c64bbee9 [PATCH 1/7] OpenMP 4.0 offloading infrastructure: configure and make
* configure: Regenerate.
	* configure.ac (--enable-as-accelerator-for)
	(--enable-offload-targets): New configure options.
gcc/
	* Makefile.in (real_target_noncanonical, accel_dir_suffix)
	(enable_as_accelerator): New variables substituted by configure.
	(libsubdir, libexecsubdir, unlibsubdir): Tweak for the possibility of
	being configured as an offload compiler.
	(DRIVER_DEFINES): Pass new defines DEFAULT_REAL_TARGET_MACHINE and
	ACCEL_DIR_SUFFIX.
	(install-cpp, install-common, install_driver, install-gcc-ar): Do not
	install for the offload compiler.
	* config.in: Regenerate.
	* configure: Regenerate.
	* configure.ac (real_target_noncanonical, accel_dir_suffix)
	(enable_as_accelerator): Compute new variables.
	(ACCEL_COMPILER): Define if the compiler is built as the accel compiler.
	(OFFLOAD_TARGETS): List of target names suitable for offloading.
	(ENABLE_OFFLOADING): Define if list of offload targets is not empty.
gcc/cp/
	* Make-lang.in (c++.install-common): Do not install for the offload
	compiler.
gcc/doc/
	* install.texi (Options specification): Document
	--enable-as-accelerator-for and --enable-offload-targets.
gcc/fortran/
	* Make-lang.in (fortran.install-common): Do not install for the offload
	compiler.
libgcc/
	* Makefile.in (crtoffloadbegin$(objext)): New rule.
	(crtoffloadend$(objext)): Likewise.
	* configure: Regenerate.
	* configure.ac (accel_dir_suffix): Compute new variable.
	(extra_parts): Add crtoffloadbegin.o and crtoffloadend.o
	if enable_offload_targets is not empty.
	* offloadstuff.c: New file.
libgomp/
	* config.h.in: Regenerate.
	* configure: Regenerate.
	* configure.ac: Check for libdl, required for plugin support.
	(PLUGIN_SUPPORT): Define if plugins are supported.
	(enable_offload_targets): Support Intel MIC targets.
	(OFFLOAD_TARGETS): List of target names suitable for offloading.
lto-plugin/
	* Makefile.am (libexecsubdir): Tweak for the possibility of being
	configured for offload compiler.
	(accel_dir_suffix, real_target_noncanonical): New variables substituted
	by configure.
	* Makefile.in: Regenerate.
	* configure: Regenerate.
	* configure.ac (accel_dir_suffix, real_target_noncanonical): Compute new
	variables.


Co-Authored-By: Andrey Turetskiy <andrey.turetskiy@intel.com>
Co-Authored-By: Ilya Verbin <ilya.verbin@intel.com>
Co-Authored-By: Thomas Schwinge <thomas@codesourcery.com>

From-SVN: r217485
2014-11-13 13:28:56 +00:00