Commit Graph

1055 Commits

Author SHA1 Message Date
Jonathan Yong 126437c5da unwind-seh.c: Suppress warnings for RtlUnwindEx calls.
* unwind-seh.c: Suppress warnings for RtlUnwindEx calls.

From-SVN: r245834
2017-03-02 11:00:28 +00:00
Andrew Pinski 31927af6c7 value-unwind.h: New file.
* config/aarch64/value-unwind.h: New file.
	* config.host (aarch64*-*-*): Add aarch64/value-unwind.h
	to tm_file.

From-SVN: r245508
2017-02-16 16:27:42 +00:00
Palmer Dabbelt 0bd99911ee RISC-V Port: libgcc
libgcc/ChangeLog:

2017-02-06  Palmer Dabbelt <palmer@dabbelt.com>

        * config.host: Add RISC-V tuples.
        * config/riscv/atomic.c: New file.
        * config/riscv/crti.S: Likewise.
        * config/riscv/crtn.S: Likewise.
        * config/riscv/div.S: Likewise.
        * config/riscv/linux-unwind.h: Likewise.
        * config/riscv/muldi3.S: Likewise.
        * config/riscv/multi3.S: Likewise.
        * config/riscv/save-restore.S: Likewise.
        * config/riscv/sfp-machine.h: Likewise.
        * config/riscv/t-elf: Likewise.
        * config/riscv/t-elf32: Likewise.
        * config/riscv/t-elf64: Likewise.
        * config/riscv/t-softfp32: Likewise.
        * config/riscv/t-softfp64: Likewise.

From-SVN: r245226
2017-02-06 21:38:51 +00:00
Jakub Jelinek a8c9ef2a39 op-common.h (_FP_MUL, [...]): Add /* FALLTHRU */ comments.
* soft-fp/op-common.h (_FP_MUL, _FP_FMA, _FP_DIV): Add
	/* FALLTHRU */ comments.

From-SVN: r244884
2017-01-24 23:32:30 +01:00
Gerald Pfeifer c6c82710ed * config/i386/cygming-crtbegin.c (LIBGCJ_SONAME): No longer #define.
From-SVN: r244743
2017-01-21 08:52:32 +00:00
Jiong Wang a876231c40 [AArch64] Only build & test pauth code for LP64
gcc/
	* config/aarch64/aarch64-builtins.c (aarch64_init_builtins): Register
	register pauth builtins for LP64 only.

libgcc/
	* config/aarch64/aarch64-unwind.h: Empty this file on ILP32.
	* unwind-dw2.c (execute_cfa_program):  Only multiplexing
	DW_CFA_GNU_window_save for AArch64 and LP64.

gcc/testsuite/
	* testsuite/gcc.target/aarch64/return_address_sign_1.c: Enable on LP64
	only.
	* testsuite/gcc.target/aarch64/return_address_sign_2.c: Likewise.
	* testsuite/gcc.target/aarch64/return_address_sign_3.c: Likewise.

From-SVN: r244732
2017-01-20 21:03:41 +00:00
Jiong Wang aa348be2b0 [AArch64] Always include linux-unwind.h
libgcc/
        * config/aarch64/linux-unwind.h: Always include aarch64-unwind.h.

From-SVN: r244710
2017-01-20 12:27:46 +00:00
Jiong Wang f2f6dece0e [AArch64, libgcc] Add missing file, forget "svn add"
From-SVN: r244674
2017-01-20 00:21:34 +00:00
Jiong Wang 5636faf2bc [AArch64][4/4] libgcc unwinder support for return address signing
libgcc/
	* config/aarch64/aarch64-unwind.h: New file.
	(DWARF_REGNUM_AARCH64_RA_STATE): Define.
	(MD_POST_EXTRACT_ROOT_ADDR): New target marcro and define it on AArch64.
	(MD_POST_EXTRACT_FRAME_ADDR): Likewise.
	(MD_POST_FROB_EH_HANDLER_ADDR): Likewise.
	(MD_FROB_UPDATE_CONTEXT): Define it on AArch64.
	(aarch64_post_extract_frame_addr): New function.
	(aarch64_post_frob_eh_handler_addr): New function.
	(aarch64_frob_update_context): New function.
	* config/aarch64/linux-unwind.h: Include aarch64-unwind.h
	* config.host (aarch64*-*-elf, aarch64*-*-rtems*,
	aarch64*-*-freebsd*):
	Initialize md_unwind_header to include aarch64-unwind.h.
	* unwind-dw2.c (struct _Unwind_Context): Define "RA_A_SIGNED_BIT".
	(execute_cfa_program): Multiplex DW_CFA_GNU_window_save for
	__aarch64__.
	(uw_update_context): Honor MD_POST_EXTRACT_FRAME_ADDR.
	(uw_init_context_1): Honor MD_POST_EXTRACT_ROOT_ADDR.
	(uw_frob_return_addr): New function.
	(uw_install_context): Use uw_frob_return_addr.

From-SVN: r244673
2017-01-20 00:19:01 +00:00
Joe Seymour 4701fba31c t-msp430 (LIB2ADD): Remove mpy.c
libgcc/
	* config/msp430/t-msp430 (LIB2ADD): Remove mpy.c
	(mpy.o): New rule.
	(libmul_none.a): Add mpy.o

	gcc/testsuite/
	* gcc.target/msp430/mul_f5_muldef.c: New test.

From-SVN: r244564
2017-01-17 22:56:10 -05:00
Jakub Jelinek 3c36aa6ba2 re PR other/79046 (g++ -print-file-name=plugin uses full version number in path)
PR other/79046
	* configure: Regenerated.
config/
	* acx.m4 (GCC_BASE_VER): New m4 function.
	(ACX_TOOL_DIRS): Require GCC_BASE_VER, for
	--with-gcc-major-version-only use just major number from BASE-VER.
gcc/
	* configure.ac: Add GCC_BASE_VER.
	* Makefile.in (version): Use @get_gcc_base_ver@ instead of cat to get
	version from BASE-VER file.
	(CFLAGS-gcc.o): Add -DBASEVER=$(BASEVER_s).
	(gcc.o): Depend on $(BASEVER).
	* common.opt (dumpfullversion): New option.
	* gcc.c (driver_handle_option): Handle OPT_dumpfullversion.
	* doc/invoke.texi: Document -dumpfullversion.
	* doc/install.texi: Document --with-gcc-major-version-only.
	* configure: Regenerated.
libatomic/
	* configure.ac: Add GCC_BASE_VER.
	* Makefile.am (gcc_version): Use @get_gcc_base_ver@ instead of cat to
	get version from BASE-VER file.
	* testsuite/Makefile.in: Regenerated.
	* configure: Regenerated.
	* Makefile.in: Regenerated.
libgomp/
	* configure.ac: Add GCC_BASE_VER.
	* Makefile.am (gcc_version): Use @get_gcc_base_ver@ instead of cat to
	get version from BASE-VER file.
	* testsuite/Makefile.in: Regenerated.
	* configure: Regenerated.
	* Makefile.in: Regenerated.
libgcc/
	* configure.ac: Add GCC_BASE_VER.
	* Makefile.in (version): Use @get_gcc_base_ver@ instead of cat to get
	version from BASE-VER file.
	* configure: Regenerated.
libssp/
	* configure.ac: Add GCC_BASE_VER.
	* Makefile.am (gcc_version): Use @get_gcc_base_ver@ instead of cat to
	get version from BASE-VER file.
	* configure: Regenerated.
	* Makefile.in: Regenerated.
liboffloadmic/
	* configure.ac: Add GCC_BASE_VER.
	* Makefile.am (gcc_version): Use @get_gcc_base_ver@ instead of cat to
	get version from BASE-VER file.
	* aclocal.m4: Include ../config/acx.m4.
	* configure: Regenerated.
	* Makefile.in: Regenerated.
libquadmath/
	* configure.ac: Add GCC_BASE_VER.
	* Makefile.am (gcc_version): Use @get_gcc_base_ver@ instead of cat to
	get version from BASE-VER file.
	* configure: Regenerated.
	* Makefile.in: Regenerated.
libmpx/
	* configure.ac: Add GCC_BASE_VER.
	* Makefile.am (gcc_version): Use @get_gcc_base_ver@ instead of cat to
	get version from BASE-VER file.
	* configure: Regenerated.
	* Makefile.in: Regenerated.
libada/
	* configure.ac: Add GCC_BASE_VER.
	* Makefile.in (version): Use @get_gcc_base_ver@ instead of cat to get
	version from BASE-VER file.
	* configure: Regenerated.
lto-plugin/
	* configure.ac: Add GCC_BASE_VER.
	* Makefile.am (gcc_version): Use @get_gcc_base_ver@ instead of cat to
	get version from BASE-VER file.
	* configure: Regenerated.
	* Makefile.in: Regenerated.
libitm/
	* configure.ac: Add GCC_BASE_VER.
	* Makefile.am (gcc_version): Use @get_gcc_base_ver@ instead of cat to
	get version from BASE-VER file.
	* testsuite/Makefile.in: Regenerated.
	* configure: Regenerated.
	* Makefile.in: Regenerated.
fixincludes/
	* configure.ac: Add GCC_BASE_VER.
	* Makefile.in (gcc_version): Use @get_gcc_base_ver@ instead of cat to
	get version from BASE-VER file.
	* configure: Regenerated.
libcilkrts/
	* configure.ac: Add GCC_BASE_VER.
	* Makefile.am (gcc_version): Use @get_gcc_base_ver@ instead of cat to
	get version from BASE-VER file.
	* aclocal.m4: Include ../config/acx.m4.
	* configure: Regenerated.
	* Makefile.in: Regenerated.
libcc1/
	* configure.ac: Add GCC_BASE_VER.  For --with-gcc-major-version-only
	use just major number from BASE-VER.
	* configure: Regenerated.
	* Makefile.in: Regenerated.
libobjc/
	* configure.ac: Add GCC_BASE_VER.
	* Makefile.in (gcc_version): Use @get_gcc_base_ver@ instead of cat to
	get version from BASE-VER file.
	* configure: Regenerated.
libstdc++-v3/
	* configure.ac: Add GCC_BASE_VER.
	* fragment.am (gcc_version): Use @get_gcc_base_ver@ instead of cat to
	get version from BASE-VER file.
	* po/Makefile.in: Regenerated.
	* libsupc++/Makefile.in: Regenerated.
	* testsuite/Makefile.in: Regenerated.
	* src/Makefile.in: Regenerated.
	* configure: Regenerated.
	* Makefile.in: Regenerated.
	* include/Makefile.in: Regenerated.
	* doc/Makefile.in: Regenerated.
	* python/Makefile.in: Regenerated.
	* src/c++11/Makefile.in: Regenerated.
	* src/c++98/Makefile.in: Regenerated.
	* src/filesystem/Makefile.in: Regenerated.
libvtv/
	* configure.ac: Add GCC_BASE_VER.
	* Makefile.am (gcc_version): Use @get_gcc_base_ver@ instead of cat to
	get version from BASE-VER file.
	* testsuite/Makefile.in: Regenerated.
	* configure: Regenerated.
	* Makefile.in: Regenerated.
libsanitizer/
	* configure.ac: Add GCC_BASE_VER.
	* Makefile.am (gcc_version): Use @get_gcc_base_ver@ instead of cat to
	get version from BASE-VER file.
	* libbacktrace/Makefile.in: Regenerated.
	* interception/Makefile.in: Regenerated.
	* asan/Makefile.in: Regenerated.
	* ubsan/Makefile.in: Regenerated.
	* configure: Regenerated.
	* sanitizer_common/Makefile.in: Regenerated.
	* lsan/Makefile.in: Regenerated.
	* Makefile.in: Regenerated.
	* tsan/Makefile.in: Regenerated.
libgfortran/
	* configure.ac: Add GCC_BASE_VER.
	* Makefile.am (gcc_version): Use @get_gcc_base_ver@ instead of cat to
	get version from BASE-VER file.
	* configure: Regenerated.
	* Makefile.in: Regenerated.

From-SVN: r244521
2017-01-17 10:38:48 +01:00
Joe Seymour 829afb8f05 t-msp430 (libmul_none.a, [...]): Filter archived prerequisites.
2017-01-13  Joe Seymour  <joe.s@somniumtech.com>
* config/msp430/t-msp430 (libmul_none.a, libmul_16.a, libmul_32.a,
libmul_f5.a): Filter archived prerequisites.

From-SVN: r244455
2017-01-13 17:18:07 -05:00
Uros Bizjak fbed6f3695 builtin_target.c (check_features): Check all supported __builtin_cpu_supports options.
* gcc.target/i386/builtin_target.c (check_features): Check all
	supported __builtin_cpu_supports options.

From-SVN: r244375
2017-01-12 18:30:03 +01:00
Andrew Senkevich 79fc8ffe6c Enable AVX-512 VPOPCNTD/VPOPCNTQ instructions.
gcc/
	* common/config/i386/i386-common.c (OPTION_MASK_ISA_AVX512VPOPCNTDQ_SET,
	OPTION_MASK_ISA_AVX512VPOPCNTDQ_UNSET): New.
	* config.gcc: Add avx512vpopcntdqintrin.h.
	* config/i386/avx512vpopcntdqintrin.h: New.
	* config/i386/cpuid.h (bit_AVX512VPOPCNTDQ): New.
	* config/i386/i386-builtin-types.def: Add new types.
	* config/i386/i386-builtin.def (__builtin_ia32_vpopcountd_v16si,
	__builtin_ia32_vpopcountd_v16si_mask, __builtin_ia32_vpopcountq_v8di,
	__builtin_ia32_vpopcountq_v8di_mask): New.
	* config/i386/i386-c.c (ix86_target_macros_internal): Define
	__AVX512VPOPCNTDQ__.
	* config/i386/i386.c (ix86_target_string): Add -mavx512vpopcntdq.
	(PTA_AVX512VPOPCNTDQ): Define.
	* config/i386/i386.h (TARGET_AVX512VPOPCNTDQ,
	TARGET_AVX512VPOPCNTDQ_P): Define.
	* config/i386/i386.opt: Add mavx512vpopcntdq.
	* config/i386/immintrin.h: Include avx512vpopcntdqintrin.h.
	* config/i386/sse.md (define_insn "vpopcount<mode><mask_name>"): New.

libgcc/
	* config/i386/cpuinfo.h (processor_features): Add
	FEATURE_AVX512VPOPCNTDQ.
	* config/i386/cpuinfo.c (get_available_features): Habdle new
	feature.

gcc/testsuite/
	* g++.dg/other/i386-2.C: Add -mavx512vpopcntdq.
	* g++.dg/other/i386-3.C: Ditto.
	* gcc.target/i386/sse-12.c: Ditto.
	* gcc.target/i386/sse-13.c: Ditto.
	* gcc.target/i386/sse-22.c: Ditto.
	* gcc.target/i386/sse-23.c: Ditto.
	* gcc.target/i386/builtin_target.c: Handle new option.
	* gcc.target/i386/funcspec-56.inc: Test new attributes.
	* gcc.target/i386/avx512vpopcntdq-vpopcntd.c: New test.
	* gcc.target/i386/avx512vpopcntdq-vpopcntq.c: Ditto.

From-SVN: r244263
2017-01-10 12:55:41 +00:00
Joseph Myers fec5f4e041 Make MIPS soft-fp preserve NaN payloads for NAN2008.
The MIPS sfp-machine.h has an _FP_CHOOSENAN implementation which
emulates hardware semantics of not preserving signaling NaN payloads
for an operation with two NaN arguments (although that doesn't suffice
to avoid sNaN payload preservation in any case with just one NaN
argument).

However, those are only hardware semantics in the legacy NaN case; in
the NAN2008 case, the architecture documentation says hardware
preserves payloads in such cases.  Furthermore, this implementation
assumes legacy NaN semantics, so in the NAN2008 case the
implementation actually has the effect of preserving sNaN payloads but
not preserving qNaN payloads, when both should be preserved.

This patch fixes the code just to copy from the first argument (at the
level of libgcc, it's not meaningful which argument is the first and
which is the second).

Tested for mips64-linux-gnu (soft float, NAN2008) with the glibc math/
tests.

	* config/mips/sfp-machine.h (_FP_CHOOSENAN): Always preserve NaN
	payload if [__mips_nan2008].

From-SVN: r244059
2017-01-04 17:06:33 +00:00
Alan Modra 8f56cb5163 Update configure deps, remove stray \xA0 in picflag.m4, regenerate
Also fix a stray changelog entry.  Some of the regen here is due to
previous changes not being regenerated properly, in part due to the
missing configure dependencies.

	* configure: Regenerate.
config/
	* picflag.m4: Remove stray \xA0 in comment.
gcc/
	* Makefile.in (aclocal_deps): Update and order as per aclocal.m4.
	* configure: Regenerate.
	* config.in: Regenerate.
libada/
	* Makefile.in (configure_deps): Update and order as per
	configure.ac sinclude.
	* configure: Regenerate.
libgcc/
	* Makefile.in (configure_deps): Update.
	* configure: Regenerate.
libiberty/
	* Makefile.in (configure_deps): Update.
	* configure: Regenerate.
libitm/
	* Makefile.in: Regenerate.
	* testsuite/Makefile.in: Regenerate.

From-SVN: r244049
2017-01-04 18:59:34 +10:30
Jakub Jelinek cbe34bb5ed Update copyright years.
From-SVN: r243994
2017-01-01 13:07:43 +01:00
Krister Walfridsson ab955692fe config.host (*-*-netbsd*): Add t-eh-dw2-dip to tmake_file.
2016-12-19  Krister Walfridsson  <krister.walfridsson@gmail.com>

	* config.host (*-*-netbsd*): Add t-eh-dw2-dip to tmake_file.
	* crtstuff.c (BSD_DL_ITERATE_PHDR_AVAILABLE): Define for NetBSD.
	* unwind-dw2-fde-dip.c (USE_PT_GNU_EH_FRAME, ElfW): Likewise.

From-SVN: r243790
2016-12-19 09:21:09 +00:00
Matthias Klose de34320fba gmon: Remove empty directory.
2016-12-17  Matthias Klose  <doko@ubuntu.com>

        * config/arc/gmon: Remove empty directory.

From-SVN: r243775
2016-12-17 12:42:03 +00:00
Claudiu Zissulescu e04ea1daa9 [ARC] Rework code for profiling.
gcc/
2016-12-16  Claudiu Zissulescu  <claziss@synopsys.com>

	* config/arc/arc.h (LINK_SPEC): Tidy up.
	(ENDFILE_SPEC): Likewise.
	(LIB_SPEC): Likewise.
	(STARTFILE_SPEC): Include gcrt0 when profiling.
	(FUNCTION_PROFILER): Use __mcount.
	* config/arc/arc.opt (mucb-mcount): Remove.
	* doc/invoke.texi (ARC): Remove mucb-mcount doc.
	* arc/arc-protos.h (arc_profile_call): Remove.
	* config/arc/arc.c (write_profile_sections): Likewise.
	(arc_profile_call): Likewise.
	(unspec_prof_hash): Likewise.
	(unspec_prof_htab_eq): Likewise.
	(arc_legitimate_constant_p): Remove UNSPEC_PROF.
	(arc_reorg): Remove call to write_profile_sections.
	* config/arc/arc.md (call): Remove call to arc_profile_call.
	(call_value): Likewise.
	(sibcall): Likewise.
	(sibcall_value): Likewise.
	(define_constants): Remove UNSPEC_PROF.

libgcc/
	* config.host (arc*-*-linux-uclibc*): Remove libgmon, crtg, and
	crtgend.
	(arc*-*-elf*): Likewise.
	* config/arc/t-arc: Remove old gmon lib targets.
	* config/arc/crtg.S: Remove.
	* config/arc/crtgend.S: Likewise.
	* config/arc/gmon/atomic.h: Likewise.
	* config/arc/gmon/auxreg.h: Likewise.
	* config/arc/gmon/dcache_linesz.S: Likewise.
	* config/arc/gmon/gmon.c: Likewise.
	* config/arc/gmon/machine-gmon.h: Likewise.
	* config/arc/gmon/mcount.c: Likewise.
	* config/arc/gmon/prof-freq-stub.S: Likewise.
	* config/arc/gmon/prof-freq.c: Likewise.
	* config/arc/gmon/profil.S: Likewise.
	* config/arc/gmon/sys/gmon.h: Likewise.
	* config/arc/gmon/sys/gmon_out.h: Likewise.
	* config/arc/t-arc-newlib: Likewise.
	* config/arc/t-arc700-uClibc: Renamed to t-arc-uClibc.

From-SVN: r243742
2016-12-16 13:56:21 +01:00
George Spelvin 8ae1c2c129 lib1funcs.S (__ashrdi3): Fix typo from r243545.
libgcc/
	* config/avr/lib1funcs.S (__ashrdi3): Fix typo from r243545.

From-SVN: r243546
2016-12-12 11:57:33 +00:00
George Spelvin a5b947fa66 lib1funcs.S (__ashldi3): Use __tmp_reg__ to restore R16 instead of push + pop.
libgcc/
	2016-12-12  George Spelvin  <linux@sciencehorizons.net>
	* config/avr/lib1funcs.S (__ashldi3): Use __tmp_reg__ to restore
	R16 instead of push + pop.
	(__ashrdi3, __lshrdi3): Same. And use __zero_reg__ for signs.

From-SVN: r243545
2016-12-12 11:25:51 +00:00
Krister Walfridsson d6574dd103 config.host (i[34567]86-*-netbsdelf*): Add i386/t-crtstuff to tmake_file.
2016-12-10  Krister Walfridsson  <krister.walfridsson@gmail.com>

	* config.host (i[34567]86-*-netbsdelf*): Add i386/t-crtstuff to
	tmake_file.

From-SVN: r243518
2016-12-10 20:59:52 +00:00
Cupertino Miranda 62440b4f0e [ARC] Fix PIE.
gcc/
2016-12-05  Cupertino Miranda  <cmiranda@synopsys.com>

	* config/arc/arc.h (STARTFILE_SPEC): Use default linux specs.
	(ENDFILE_SPEC): Likewise.

libgcc/
2016-12-05  Cupertino Miranda  <cmiranda@synopsys.com>

	* config.host (arc*-*-linux-uclibc*): Use default extra
	objects. Include linux-android header.
	* config/arc/crti.S (_init): Declare symbol as function.
	(_fini): Likewise.

From-SVN: r243245
2016-12-05 12:16:52 +01:00
Thomas Koenig 31cfd83286 re PR libfortran/78379 (Processor-specific versions for matmul)
2016-12-03  Thomas Koenig  <tkoenig@gcc.gnu.org>

        PR fortran/78379
        * config/i386/cpuinfo.c:  Move denums for processor vendors,
        processor type, processor subtypes and declaration of
        struct __processor_model into
        * config/i386/cpuinfo.h:  New header file.
        * Makefile.am:  Add dependence of m4/matmul_internal_m4 to
        mamtul files..
        * Makefile.in:  Regenerated.
        * acinclude.m4:  Check for AVX, AVX2 and AVX512F.
        * config.h.in:  Add HAVE_AVX, HAVE_AVX2 and HAVE_AVX512F.
        * configure:  Regenerated.
        * configure.ac:  Use checks for AVX, AVX2 and AVX_512F.
        * m4/matmul_internal.m4:  New file. working part of matmul.m4.
        * m4/matmul.m4:  Implement architecture-specific switching
        for AVX, AVX2 and AVX512F by including matmul_internal.m4
        multiple times.
        * generated/matmul_c10.c: Regenerated.
        * generated/matmul_c16.c: Regenerated.
        * generated/matmul_c4.c: Regenerated.
        * generated/matmul_c8.c: Regenerated.
        * generated/matmul_i1.c: Regenerated.
        * generated/matmul_i16.c: Regenerated.
        * generated/matmul_i2.c: Regenerated.
        * generated/matmul_i4.c: Regenerated.
        * generated/matmul_i8.c: Regenerated.
        * generated/matmul_r10.c: Regenerated.
        * generated/matmul_r16.c: Regenerated.
        * generated/matmul_r4.c: Regenerated.
        * generated/matmul_r8.c: Regenerated.

From-SVN: r243219
2016-12-03 09:44:35 +00:00
Andre Vieira c92e08e3d7 ARMv8-M Security Extension's cmse_nonsecure_call: use __gnu_cmse_nonsecure_call
gcc/ChangeLog:
    2016-12-02  Andre Vieira  <andre.simoesdiasvieira@arm.com>
		Thomas Preud'homme  <thomas.preudhomme@arm.com>

	* config/arm/arm.c (detect_cmse_nonsecure_call): New.
	(cmse_nonsecure_call_clear_caller_saved): New.
	(arm_reorg): Use cmse_nonsecure_call_clear_caller_saved.
	(arm_function_ok_for_sibcall): Disable sibcalls for
	cmse_nonsecure_call.
	* config/arm/arm-protos.h (detect_cmse_nonsecure_call): New.
	* config/arm/arm.md (call): Handle cmse_nonsecure_entry.
	(call_value): Likewise.
	(nonsecure_call_internal): New.
	(nonsecure_call_value_internal): New.
	* config/arm/thumb1.md (*nonsecure_call_reg_thumb1_v5): New.
	(*nonsecure_call_value_reg_thumb1_v5): New.
	* config/arm/thumb2.md (*nonsecure_call_reg_thumb2): New.
	(*nonsecure_call_value_reg_thumb2): New.
	* config/arm/unspecs.md (UNSPEC_NONSECURE_MEM): New.

    libgcc/ChangeLog:
    2016-12-02  Andre Vieira  <andre.simoesdiasvieira@arm.com>
	       Thomas Preud'homme  <thomas.preudhomme@arm.com>

	* config/arm/cmse_nonsecure_call.S: New.
	* config/arm/t-arm: Compile cmse_nonsecure_call.S

    gcc/testsuite/ChangeLog:
    2016-12-02  Andre Vieira  <andre.simoesdiasvieira@arm.com>
		Thomas Preud'homme  <thomas.preudhomme@arm.com>

	* gcc.target/arm/cmse/cmse.exp: Run tests in mainline dir.
	* gcc.target/arm/cmse/cmse-9.c: Added some extra tests.
	* gcc.target/arm/cmse/cmse-14.c: New.
	* gcc.target/arm/cmse/baseline/bitfield-4.c: New.
	* gcc.target/arm/cmse/baseline/bitfield-5.c: New.
	* gcc.target/arm/cmse/baseline/bitfield-6.c: New.
	* gcc.target/arm/cmse/baseline/bitfield-7.c: New.
	* gcc.target/arm/cmse/baseline/bitfield-8.c: New.
	* gcc.target/arm/cmse/baseline/bitfield-9.c: New.
	* gcc.target/arm/cmse/baseline/bitfield-and-union-1.c: New.
	* gcc.target/arm/cmse/baseline/cmse-11.c: New.
	* gcc.target/arm/cmse/baseline/cmse-13.c: New.
	* gcc.target/arm/cmse/baseline/cmse-6.c: New.
	* gcc.target/arm/cmse/baseline/union-1.c: New.
	* gcc.target/arm/cmse/baseline/union-2.c: New.
	* gcc.target/arm/cmse/mainline/bitfield-4.c: New.
	* gcc.target/arm/cmse/mainline/bitfield-5.c: New.
	* gcc.target/arm/cmse/mainline/bitfield-6.c: New.
	* gcc.target/arm/cmse/mainline/bitfield-7.c: New.
	* gcc.target/arm/cmse/mainline/bitfield-8.c: New.
	* gcc.target/arm/cmse/mainline/bitfield-9.c: New.
	* gcc.target/arm/cmse/mainline/bitfield-and-union-1.c: New.
	* gcc.target/arm/cmse/mainline/union-1.c: New.
	* gcc.target/arm/cmse/mainline/union-2.c: New.
	* gcc.target/arm/cmse/mainline/hard-sp/cmse-13.c: New.
	* gcc.target/arm/cmse/mainline/hard-sp/cmse-7.c: New.
	* gcc.target/arm/cmse/mainline/hard-sp/cmse-8.c: New.
	* gcc.target/arm/cmse/mainline/hard/cmse-13.c: New.
	* gcc.target/arm/cmse/mainline/hard/cmse-7.c: New.
	* gcc.target/arm/cmse/mainline/hard/cmse-8.c: New.
	* gcc.target/arm/cmse/mainline/soft/cmse-13.c: New.
	* gcc.target/arm/cmse/mainline/soft/cmse-7.c: New.
	* gcc.target/arm/cmse/mainline/soft/cmse-8.c: New.
	* gcc.target/arm/cmse/mainline/softfp-sp/cmse-7.c: New.
	* gcc.target/arm/cmse/mainline/softfp-sp/cmse-8.c: New.
	* gcc.target/arm/cmse/mainline/softfp/cmse-13.c: New.
	* gcc.target/arm/cmse/mainline/softfp/cmse-7.c: New.
	* gcc.target/arm/cmse/mainline/softfp/cmse-8.c: New.


Co-Authored-By: Thomas Preud'homme <thomas.preudhomme@arm.com>

From-SVN: r243192
2016-12-02 15:33:26 +00:00
Andre Vieira de7b572345 Add support for ARMv8-M's Secure Extensions flag and intrinsics
gcc/ChangeLog:
    2016-12-02  Andre Vieira  <andre.simoesdiasvieira@arm.com>
	        Thomas Preud'homme  <thomas.preudhomme@arm.com>

	* config.gcc (extra_headers): Added arm_cmse.h.
	* config/arm/arm-arches.def (ARM_ARCH):
	(armv8-m): Add FL2_CMSE.
	(armv8-m.main): Likewise.
	(armv8-m.main+dsp): Likewise.
	* config/arm/arm-c.c
	(arm_cpu_builtins): Added __ARM_FEATURE_CMSE macro.
	* config/arm/arm-flags.h: Define FL2_CMSE.
	* config/arm.c (arm_arch_cmse): New.
	(arm_option_override): New error for unsupported cmse target.
	* config/arm/arm.h (arm_arch_cmse): New.
	* config/arm/arm.opt (mcmse): New.
	* config/arm/arm_cmse.h: New file.
	* doc/invoke.texi (ARM Options): Add -mcmse.
	* doc/sourcebuild.texi (arm_cmse_ok): Add new effective target.
	* doc/extend.texi: Add ARMv8-M Security Extensions entry.

    gcc/testsuite/ChangeLog:
    2016-12-02  Andre Vieira  <andre.simoesdiasvieira@arm.com>
	        Thomas Preud'homme  <thomas.preudhomme@arm.com>

	* gcc.target/arm/cmse/cmse.exp: New.
	* gcc.target/arm/cmse/cmse-1.c: New.
	* gcc.target/arm/cmse/cmse-12.c: New.
	* lib/target-supports.exp
	(check_effective_target_arm_cmse_ok): New.

    libgcc/ChangeLog:
    2016-12-02  Andre Vieira  <andre.simoesdiasvieira@arm.com>
	    Thomas Preud'homme  <thomas.preudhomme@arm.com>

	* config/arm/t-arm (HAVE_CMSE): New.
	* config/arm/cmse.c: New.


Co-Authored-By: Thomas Preud'homme <thomas.preudhomme@arm.com>

From-SVN: r243187
2016-12-02 15:22:43 +00:00
Thomas Petazzoni b3a5bff4d7 re PR target/74748 (libgcc_s.so.1 isn't created correctly for Blackfin FDPIC)
PR gcc/74748
	* libgcc/config/bfin/libgcc-glibc.ver, libgcc/config/bfin/t-linux:
	use generic linker version information on Blackfin.

2016-11-27  Iain Sandoe  <iain@codesourcery.com>

From-SVN: r242934
2016-11-28 14:30:40 -07:00
Thomas Petazzoni 7a0d2bce7f re PR target/74748 (libgcc_s.so.1 isn't created correctly for Blackfin FDPIC)
PR gcc/74748
	* libgcc/mkmap-symver.awk: add support for skip_underscore

From-SVN: r242933
2016-11-28 14:27:47 -07:00
Iain Sandoe b410cf1dc0 [Darwin] fix PR67710 by updating 'as' specs to handle newer assembler versions.
A/ Newer versions of ld64 check the min_version command, and newer versions of
   the system assembler inserts this in response to "-mmacosx-version-min=" on
   the assembler line. Unless one makes sensible versions, some object is bound
   to conflict.

B/ Additionally, there's a difference in behaviour between "as" and "ld" when
   presented with xx.yy.zz (ld truncates to xx.yy, as doesn't); net result is
   that one needs to pass a truncated version to "as".

So (if the assembler supports minversion commands)
(a) provide a truncated minversion (as asm_macosx_version_min, which is a
    driver-only var).
(b) pass this to "as"
(c) Update tests to determine 'HAVE_AS_MMACOSX_VERSION_MIN_OPTION'
    (Rainer's patch)
(d) For some reason the testcases are "run" (it's not obvious they need to be,
    they are checking compile-time issues)
  - anyway, to preserve the status quo, I've left them as exec.  However, the
    minimum version that can be code-gened for is target-dependent (there are no
    released x86 versions before 10.4, for example).  To avoid conflicts where
    the "as" is assuming some minimum, I've set the testversion to 10.5 (which
    is supported by all the archs we have)
(e) We need to ensure that libgcc and crts are generated with a sufficiently
    old minversion not to conflict.

gcc/

2016-11-27  Iain Sandoe  <iain@codesourcery.com>
	    Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>

	PR target/67710
	* config.in: Regenerate
	* config/darwin-driver.c (darwin_driver_init): Emit a version string
	for the assembler.
	* config/darwin.h(ASM_MMACOSX_VERSION_MIN_SPEC): New, new tests.
	* config/darwin.opt(asm_macosx_version_min): New.
	* config/i386/darwin.h: Handle ASM_MMACOSX_VERSION_MIN_SPEC.
	* configure: Regenerate
	* configure.ac: Check for mmacosx-version-min handling.

gcc/testsuite/

2016-11-27  Iain Sandoe  <iain@codesourcery.com>
	    Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
	    Dominique d'Humieres  <dominiq@lps.ens.fr>

	PR target/67710
	*  gcc.dg/darwin-minversion-1.c: Update min version check.
	*  gcc.dg/darwin-minversion-2.c: Likewise.
	*  gcc.dg/darwin-minversion-3.c: Likewise.

libgcc/

2016-11-27  Iain Sandoe  <iain@codesourcery.com>
	    Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>

	PR target/67710
	*  config/t-darwin: Default builds to 10.5 codegen.


Co-Authored-By: Dominique d'Humieres <dominiq@lps.ens.fr>
Co-Authored-By: Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>

From-SVN: r242898
2016-11-27 15:07:22 +00:00
James Greenhalgh 2e5f8203d2 [Patch libgcc AArch64 12/17] Enable hfmode soft-float conversions and truncations
gcc/

	* config/aarch64/aarch64-c.c (aarch64_scalar_mode_supported_p): New.
	(TARGET_SCALAR_MODE_SUPPORTED_P): Define.

libgcc/

	* config/aarch64/sfp-machine.h (_FP_NANFRAC_H): Define.
	(_FP_NANSIGN_H): Likewise.
	* config/aarch64/t-softfp (softfp_extensions): Add hftf.
	(softfp_truncations): Add tfhf.
	(softfp_extras): Add required conversion functions.

From-SVN: r242844
2016-11-24 18:16:55 +00:00
James Greenhalgh bea64ca303 [Patch 15/17 libgcc ARM] Add double to half conversions.
libgcc/

	* config/arm/fp16.c (binary64): New.
	(__gnu_d2h_internal): New.
	(__gnu_d2h_ieee): New.
	(__gnu_d2h_alternative): New.



Co-Authored-By: Matthew Wahab <matthew.wahab@arm.com>

From-SVN: r242782
2016-11-23 17:31:25 +00:00
James Greenhalgh 8630cadbc5 [Patch 14/17] [libgcc, ARM] Generalise float-to-half conversion function.
libgcc/

	* config/arm/fp16.c (struct format): New.
	(binary32): New.
	(__gnu_float2h_internal): New.  Body moved from
	__gnu_f2h_internal and generalize.
	(_gnu_f2h_internal): Move body to function __gnu_float2h_internal.
	Call it with binary32.



Co-Authored-By: Matthew Wahab <matthew.wahab@arm.com>

From-SVN: r242781
2016-11-23 17:30:02 +00:00
James Greenhalgh 5823ef2335 [Patch libgcc 9/17] Update soft-fp from glibc
libgcc/

	* soft-fp/extendhftf2.c: New.
	* soft-fp/fixhfti.c: Likewise.
	* soft-fp/fixunshfti.c: Likewise.
	* soft-fp/floattihf.c: Likewise.
	* soft-fp/floatuntihf.c: Likewise.
	* soft-fp/half.h: Likewise.
	* soft-fp/trunctfhf2.c: Likewise.

From-SVN: r242779
2016-11-23 17:27:27 +00:00
Marc Glisse 62a7df9f59 Protect __TMC_END__ - __TMC_LIST__ == 0
2016-11-20  Marc Glisse  <marc.glisse@inria.fr>

        PR libgcc/77813
        * crtstuff.c (deregister_tm_clones, register_tm_clones): Hide
        __TMC_END__ behind a passthrough asm.

From-SVN: r242635
2016-11-20 13:35:27 +00:00
Walter Lee 7a384912f9 TILEPro: force gcc to link against libgcc.a when creating shared
libraries.

        * config.host (tilepro*-*-linux*): Add t-slibgcc-libgcc.

From-SVN: r242615
2016-11-19 02:28:00 +00:00
H.J. Lu 9775c1a5ea Add avx5124vnniw/avx5124fmaps to target attributes
gcc/

2016-11-17  Andrew Senkevich <andrew.senkevich@intel.com>

	* config/i386/i386.c (processor_features): Add F_AVX5124VNNIW,
	F_AVX5124FMAPS.
	(isa_names_table): Handle new features.

gcc/testsuite/

2016-11-17  Andrew Senkevich <andrew.senkevich@intel.com>

	* gcc.target/i386/builtin_target.c: Handle new "avx5124vnniw",
	"avx5124fmaps".
	* gcc.target/i386/funcspec-56.inc: Test new attributes.

libgcc/

2016-11-17  Andrew Senkevich <andrew.senkevich@intel.com>

	* config/i386/cpuinfo.c (processor_features): Add
	FEATURE_AVX5124VNNIW, FEATURE_AVX5124FMAPS.

From-SVN: r242570
2016-11-17 14:18:23 -08:00
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