Enable Java on Cygwin-64

Currently it is not possible to build GCC's libjava support on Cygwin-64.

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

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


boehm-gc/ChangeLog:

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

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

libffi/ChangeLog:

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

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

libgcc/ChangeLog:

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

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

libjava/ChangeLog:

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

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

libjava/classpath/ChangeLog:

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

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



git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@210386 138bc75d-0d04-0410-961f-82ee72b054a4
	PR libstdc++/60497
	* include/debug/array (get): Qualify call to other get overload.
	* include/profile/array (get): Likewise.
	* include/std/array (get): Likewise.
	* include/std/functional (_Mu, _Bind, _Bind_result): Qualify std::get.
	* include/std/mutex (unique_lock, call_once): Use __addressof.
	(__unlock_impl): Remove unused template.
	(__try_to_lock): Declare inline.
	(__try_lock_impl::__do_try_lock): Qualify function calls.
	(lock): Avoid narrowing conversion.
	* testsuite/20_util/bind/60497.cc: New.
	* testsuite/23_containers/array/element_access/60497.cc: New.
	* testsuite/30_threads/call_once/60497.cc: New.
	* testsuite/30_threads/unique_lock/cons/60497.cc: New.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@210388 138bc75d-0d04-0410-961f-82ee72b054a4
	* c-c++-common/pr50459.c: Move cdtor tests to a separate testcase.
	* c-c++-common/pr50459-2.c: New test.


git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@210390 138bc75d-0d04-0410-961f-82ee72b054a4
	PR c/61162
	* c-typeck.c (convert_for_assignment): Pass location to
	WARN_FOR_ASSIGNMENT instead of input_location.

	* gcc.dg/pr61162.c: New test.


git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@210393 138bc75d-0d04-0410-961f-82ee72b054a4
	PR c++/61151
	* semantics.c (is_this_parameter): Allow capture proxies too.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@210394 138bc75d-0d04-0410-961f-82ee72b054a4
Force the use of -ggnu-pubnames when using -gsplit-dwarf.

gcc/
	* opts.c (finish_options): Use -ggnu-pubnames with -gsplit-dwarf.


git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@210395 138bc75d-0d04-0410-961f-82ee72b054a4
	* call.c (print_error_for_call_failure): Say "no match" rather
	than "ambiguous" if there were no strict matches.
	(build_new_method_call_1): Likewise.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@210402 138bc75d-0d04-0410-961f-82ee72b054a4
	* gcc-interface/decl.c (annotate_value): Fix thinko in latest change.


git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@210403 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/
	* doc/sourcebuild.texi: (dfp_hw): Document.
	(p8vector_hw): Likewise.
	(powerpc_eabi_ok): Likewise.
	(powerpc_elfv2): Likewise.
	(powerpc_htm_ok): Likewise.
	(ppc_recip_hw): Likewise.
	(vsx_hw): Likewise.

gcc/testsuite/
	* lib/target-support.exp (check_dfp_hw_available): New function.
	(is-effective-target): Check $arg for dfp_hw.
	(is-effective-target-keyword): Likewise.
	* gcc.target/powerpc/pack03.c: (dg-require-effective-target):
	Change target to dfp_hw.


git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@210404 138bc75d-0d04-0410-961f-82ee72b054a4
Daily bump.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@210410 138bc75d-0d04-0410-961f-82ee72b054a4
2014-05-14  Yury Gribov  <y.gribov@samsung.com>

	PR sanitizer/61100
	* Makefile.am (nodist_saninclude_HEADERS): Install
	public headers.
	* Makefile.in: Regenerate.

	* c-c++-common/asan/asan-interface-1.c: New test.
	* lib/asan-dg.exp (asan_include_flags): New function.
	(asan_init): Call asan_include_flags to obtain path
	to sanitizer headers.


git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@210413 138bc75d-0d04-0410-961f-82ee72b054a4
	PR rtl-optimization/60901
	* config/i386/i386.c (ix86_dependencies_evaluation_hook): Check that
	bb predecessor belongs to the same scheduling region.  Adjust comment.

	* gcc.target/i386/pr60901.c: New test.



git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@210414 138bc75d-0d04-0410-961f-82ee72b054a4
	* cfgcleanup.c (try_forward_edges): Use location_t for locations.
	* cfgrtl.c (rtl_merge_blocks): Fix comment.
	(cfg_layout_merge_blocks): Likewise.
	* except.c (emit_to_new_bb_before): Remove prev_bb local variable.


git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@210416 138bc75d-0d04-0410-961f-82ee72b054a4
	* config/avr/avr.h (REG_CLASS_CONTENTS): Use unsigned suffix for
	shifted values to avoid build warning.



git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@210418 138bc75d-0d04-0410-961f-82ee72b054a4
        PR rtl-optimization/60866
        * sel-sched-ir (sel_init_new_insn): New parameter old_seqno.
        Default it to -1.  Pass it down to init_simplejump_data.
        (init_simplejump_data): New parameter old_seqno.  Pass it down
        to get_seqno_for_a_jump.
        (get_seqno_for_a_jump): New parameter old_seqno.  Use it for
        initializing new jump seqno as a last resort.  Add comment.
        (sel_redirect_edge_and_branch): Save old seqno of the conditional
        jump and pass it down to sel_init_new_insn.
        (sel_redirect_edge_and_branch_force): Likewise.

	* gcc.dg/pr60866.c: New test. 


git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@210420 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/
	* common/config/i386/i386-common.c
	(OPTION_MASK_ISA_CLFLUSHOPT_SET): Define.
	(OPTION_MASK_ISA_XSAVES_SET): Ditto.
	(OPTION_MASK_ISA_XSAVEC_SET): Ditto.
	(OPTION_MASK_ISA_CLFLUSHOPT_UNSET): Ditto.
	(OPTION_MASK_ISA_XSAVES_UNSET): Ditto.
	(OPTION_MASK_ISA_XSAVEC_UNSET): Ditto.
	(ix86_handle_option): Handle OPT_mxsavec, OPT_mxsaves,
	OPT_mclflushopt.
	* config.gcc (i[34567]86-*-*): Add clflushoptintrin.h,
	xsavecintrin.h, xsavesintrin.h.
	(x86_64-*-*): Ditto.
	* config/i386/clflushoptintrin.h: New.
	* config/i386/xsavecintrin.h: Ditto.
	* config/i386/xsavesintrin.h: Ditto.
	* config/i386/cpuid.h (bit_CLFLUSHOPT): Define.
	(bit_XSAVES): Ditto.
	(bit_XSAVES): Ditto.
	* config/i386/driver-i386.c (host_detect_local_cpu): Handle
	-mclflushopt, -mxsavec, -mxsaves, -mno-xsaves, -mno-xsavec,
	-mno-clflushopt.
	* config/i386/i386-c.c (ix86_target_macros_internal): Handle
	OPTION_MASK_ISA_CLFLUSHOPT, OPTION_MASK_ISA_XSAVEC,
	OPTION_MASK_ISA_XSAVES.
	* config/i386/i386.c (ix86_target_string): Handle -mclflushopt,
	-mxsavec, -mxsaves.
	(PTA_CLFLUSHOPT) Define.
	(PTA_XSAVEC): Ditto.
	(PTA_XSAVES): Ditto.
	(ix86_option_override_internal): Handle new options.
	(ix86_valid_target_attribute_inner_p): Ditto.
	(ix86_builtins): Add IX86_BUILTIN_XSAVEC, IX86_BUILTIN_XSAVEC64,
	IX86_BUILTIN_XSAVES, IX86_BUILTIN_XRSTORS, IX86_BUILTIN_XSAVES64,
	IX86_BUILTIN_XRSTORS64, IX86_BUILTIN_CLFLUSHOPT.
	(bdesc_special_args): Add __builtin_ia32_xsaves, __builtin_ia32_xrstors,
	__builtin_ia32_xsavec, __builtin_ia32_xsaves64, __builtin_ia32_xrstors64,
	__builtin_ia32_xsavec64.
	(ix86_init_mmx_sse_builtins): Add __builtin_ia32_clflushopt.
	(ix86_expand_builtin): Handle new builtins.
	* config/i386/i386.h (TARGET_CLFLUSHOPT) Define.
	(TARGET_CLFLUSHOPT_P): Ditto.
	(TARGET_XSAVEC): Ditto.
	(TARGET_XSAVEC_P): Ditto.
	(TARGET_XSAVES): Ditto.
	(TARGET_XSAVES_P): Ditto.
	* config/i386/i386.md (ANY_XSAVE): Add UNSPECV_XSAVEC, UNSPECV_XSAVES.
	(ANY_XSAVE64)" Add UNSPECV_XSAVEC64, UNSPECV_XSAVES64.
	(attr xsave): Add xsavec, xsavec64, xsaves, xsaves64.
	(ANY_XRSTOR): New.
	(ANY_XRSTOR64): Ditto.
	(xrstor): Ditto.
	(xrstor): Change into <xrstor>.
	(xrstor_rex64): Change into <xrstor>_rex64.
	(xrstor64): Change into <xrstor>64
	(clflushopt): New.
	* config/i386/i386.opt (mclflushopt): New.
	(mxsavec): Ditto.
	(mxsaves): Ditto.
	* config/i386/x86intrin.h: Add clflushoptintrin.h, xsavesintrin.h,
	xsavecintrin.h.
	* doc/invoke.texi: Document new options.

gcc/testsuite/
	* gcc.target/i386/clflushopt-1.c: New.
	* gcc.target/i386/xsavec-1.c: Ditto.
	* gcc.target/i386/xsavec64-1.c: Ditto.
	* gcc.target/i386/xsaves-1.c: Ditto.
	* gcc.target/i386/xsaves64-1.c: Ditto.
	* gcc.target/i386/sse-12.c: Test new options.
	* gcc.target/i386/sse-13.c: Ditto.
	* gcc.target/i386/sse-14.c: Ditto.
	* gcc.target/i386/sse-22.c: Ditto.
	* gcc.target/i386/sse-23.c: Ditto.
	* g++.dg/other/i386-2.C: Ditto.
	* g++.dg/other/i386-3.C: Ditto.



git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@210421 138bc75d-0d04-0410-961f-82ee72b054a4
Add execution tests of ARM TRN Intrinsics.

	* gcc.target/arm/simd/vtrnqf32_1.c: New file.
	* gcc.target/arm/simd/vtrnqp16_1.c: New file.
	* gcc.target/arm/simd/vtrnqp8_1.c: New file.
	* gcc.target/arm/simd/vtrnqs16_1.c: New file.
	* gcc.target/arm/simd/vtrnqs32_1.c: New file.
	* gcc.target/arm/simd/vtrnqs8_1.c: New file.
	* gcc.target/arm/simd/vtrnqu16_1.c: New file.
	* gcc.target/arm/simd/vtrnqu32_1.c: New file.
	* gcc.target/arm/simd/vtrnqu8_1.c: New file.
	* gcc.target/arm/simd/vtrnf32_1.c: New file.
	* gcc.target/arm/simd/vtrnp16_1.c: New file.
	* gcc.target/arm/simd/vtrnp8_1.c: New file.
	* gcc.target/arm/simd/vtrns16_1.c: New file.
	* gcc.target/arm/simd/vtrns32_1.c: New file.
	* gcc.target/arm/simd/vtrns8_1.c: New file.
	* gcc.target/arm/simd/vtrnu16_1.c: New file.
	* gcc.target/arm/simd/vtrnu32_1.c: New file.
	* gcc.target/arm/simd/vtrnu8_1.c: New file.



git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@210422 138bc75d-0d04-0410-961f-82ee72b054a4
	* omp-low.c (expand_parallel_call): Remove shadow variable.
	(expand_omp_taskreg): Likewise.


git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@210423 138bc75d-0d04-0410-961f-82ee72b054a4
cleanup bogus entry

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@210424 138bc75d-0d04-0410-961f-82ee72b054a4
libiberty/
2014-05-14  Andrew Burgess  <aburgess@broadcom.com>

	* cplus-dmem.c (internal_cplus_demangle): Free any resources
	allocated by possible previous call to gnu_special.
	(squangle_mop_up): Reset pointers to NULL after calling free.
	* testsuite/demangle-expected: New test case.



git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@210425 138bc75d-0d04-0410-961f-82ee72b054a4