Commit Graph

636 Commits

Author SHA1 Message Date
Ulrich Weigand 13e0981af5 linux-unwind.h (ppc_fallback_frame_state): Correct location of CR save area for 64-bit little-endian systems.
2013-11-14  Ulrich Weigand  <Ulrich.Weigand@de.ibm.com>
	    Alan Modra  <amodra@gmail.com>

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


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

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

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

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

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

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

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

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

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

libgcc/ChangeLog:

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

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

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

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

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

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

From-SVN: r204489
2013-11-06 22:46:39 +00:00
Uros Bizjak 02ac9503fd i386-c.c (ix86_target_macros): Define _SOFT_FLOAT for !TARGET_80387.
gcc/

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

libgcc/

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        * gcc_update: Add libvtv files.

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

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

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

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


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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

libgcc:
	* soft-fp/adddf3.c: Update from glibc.
	* soft-fp/addsf3.c: Likewise.
	* soft-fp/addtf3.c: Likewise.
	* soft-fp/divdf3.c: Likewise.
	* soft-fp/divsf3.c: Likewise.
	* soft-fp/divtf3.c: Likewise.
	* soft-fp/double.h: Likewise.
	* soft-fp/eqdf2.c: Likewise.
	* soft-fp/eqsf2.c: Likewise.
	* soft-fp/eqtf2.c: Likewise.
	* soft-fp/extenddftf2.c: Likewise.
	* soft-fp/extended.h: Likewise.
	* soft-fp/extendsfdf2.c: Likewise.
	* soft-fp/extendsftf2.c: Likewise.
	* soft-fp/fixdfdi.c: Likewise.
	* soft-fp/fixdfsi.c: Likewise.
	* soft-fp/fixsfdi.c: Likewise.
	* soft-fp/fixsfsi.c: Likewise.
	* soft-fp/fixtfdi.c: Likewise.
	* soft-fp/fixtfsi.c: Likewise.
	* soft-fp/fixunsdfdi.c: Likewise.
	* soft-fp/fixunsdfsi.c: Likewise.
	* soft-fp/fixunssfdi.c: Likewise.
	* soft-fp/fixunssfsi.c: Likewise.
	* soft-fp/fixunstfdi.c: Likewise.
	* soft-fp/fixunstfsi.c: Likewise.
	* soft-fp/floatdidf.c: Likewise.
	* soft-fp/floatdisf.c: Likewise.
	* soft-fp/floatditf.c: Likewise.
	* soft-fp/floatsidf.c: Likewise.
	* soft-fp/floatsisf.c: Likewise.
	* soft-fp/floatsitf.c: Likewise.
	* soft-fp/floatundidf.c: Likewise.
	* soft-fp/floatundisf.c: Likewise.
	* soft-fp/floatunditf.c: Likewise.
	* soft-fp/floatunsidf.c: Likewise.
	* soft-fp/floatunsisf.c: Likewise.
	* soft-fp/floatunsitf.c: Likewise.
	* soft-fp/gedf2.c: Likewise.
	* soft-fp/gesf2.c: Likewise.
	* soft-fp/getf2.c: Likewise.
	* soft-fp/ledf2.c: Likewise.
	* soft-fp/lesf2.c: Likewise.
	* soft-fp/letf2.c: Likewise.
	* soft-fp/muldf3.c: Likewise.
	* soft-fp/mulsf3.c: Likewise.
	* soft-fp/multf3.c: Likewise.
	* soft-fp/negdf2.c: Likewise.
	* soft-fp/negsf2.c: Likewise.
	* soft-fp/negtf2.c: Likewise.
	* soft-fp/op-1.h: Likewise.
	* soft-fp/op-2.h: Likewise.
	* soft-fp/op-4.h: Likewise.
	* soft-fp/op-8.h: Likewise.
	* soft-fp/op-common.h: Likewise.
	* soft-fp/quad.h: Likewise.
	* soft-fp/single.h: Likewise.
	* soft-fp/soft-fp.h: Likewise.
	* soft-fp/subdf3.c: Likewise.
	* soft-fp/subsf3.c: Likewise.
	* soft-fp/subtf3.c: Likewise.
	* soft-fp/truncdfsf2.c: Likewise.
	* soft-fp/trunctfdf2.c: Likewise.
	* soft-fp/trunctfsf2.c: Likewise.
	* soft-fp/unorddf2.c: Likewise.
	* soft-fp/unordsf2.c: Likewise.
	* soft-fp/unordtf2.c: Likewise.
	* config/aarch64/sfp-machine.h (_FP_QNANNEGATEDP): Define to 0.
	* config/arm/sfp-machine.h (_FP_QNANNEGATEDP): Likewise.
	* config/c6x/sfp-machine.h (_FP_QNANNEGATEDP): Likewise.
	* config/i386/sfp-machine.h (_FP_QNANNEGATEDP): Likewise.
	* config/ia64/sfp-machine.h (_FP_QNANNEGATEDP): Likewise.
	* config/lm32/sfp-machine.h (_FP_QNANNEGATEDP): Likewise.
	* config/moxie/sfp-machine.h (_FP_QNANNEGATEDP): Likewise.
	* config/rs6000/sfp-machine.h (_FP_QNANNEGATEDP): Likewise.
	* config/score/sfp-machine.h (_FP_QNANNEGATEDP): Likewise.
	* config/tilegx/sfp-machine32.h (_FP_QNANNEGATEDP): Likewise.
	* config/tilegx/sfp-machine64.h (_FP_QNANNEGATEDP): Likewise.
	* config/tilepro/sfp-machine.h (_FP_QNANNEGATEDP): Likewise.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        * config/i386/slm.md: New.

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

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

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

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

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

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


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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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


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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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


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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

gcc/

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

gcc/
	* configure: Regenerate.

libdecnumber/
	* configure: Regenerate.

libgcc/
	* configure: Regenerate.

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

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

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

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

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

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

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

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

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

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

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

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


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

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

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

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

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

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

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

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

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

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






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

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

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

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

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

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

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

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

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

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

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

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

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

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

From-SVN: r192458
2012-10-15 13:10:30 +00:00
Uros Bizjak 945a9c1f6d sfp-exceptions.c (__sfp_handle_exceptions): Emit SSE instructions for 64bit targets only.
* config/i386/sfp-exceptions.c (__sfp_handle_exceptions): Emit SSE
	instructions for 64bit targets only.

From-SVN: r192355
2012-10-11 13:44:51 +02:00
Uros Bizjak fb8bf47a34 sfp-machine.h (FP_RND_NEAREST, [...]): Move to ...
* config/i386/sfp-machine.h (FP_RND_NEAREST, FP_RND_ZERO, FP_RND_PINF,
	FP_RND_MINF, FP_RND_MASK, FP_INIT_ROUNDMODE, _FP_DECL_EX): Move to ...
	* config/i386/32/sfp-machine.h: ... here.
	* config/i386/64/sfp-machine.h (FP_RND_NEAREST, FP_RND_ZERO,
	FP_RND_PINF, FP_RND_MINF, FP_RND_MASK, FP_INIT_ROUNDMODE, _FP_DECL_EX):
	New defines.

From-SVN: r192324
2012-10-10 20:35:32 +02:00
Matthias Klose 7c9bc8758e Fix typo in previous commit:
2012-10-07  Matthias Klose  <doko@ubuntu.com>

        * config/arm/unwind-arm.h (__gnu_unwind_24bit): Mark parameters
        as unused.
        (_Unwind_decode_typeinfo_ptr): Mark base as unused.

From-SVN: r192182
2012-10-07 11:46:06 +00:00
Matthias Klose acb72498a7 unwind-arm.h (__gnu_unwind_24bit): Mark parameters as unused.
2012-10-07  Matthias Klose  <doko@ubuntu.com>

        * config/arm/unwind-arm.h (__gnu_unwind_24bit): Mark parameters
        as unused.
        (_Unwind_decode_typeinfo_ptr): Mark base as unused.

From-SVN: r192181
2012-10-07 10:06:30 +00:00
Mark Kettenis 8eaee0f0f1 config.host (*-*-openbsd*): Add t-eh-dw2-dip to tmake_file.
* config.host (*-*-openbsd*): Add t-eh-dw2-dip to tmake_file.
	* unwind-dw2-fde-dip.c: Don't include <elf.h> on OpenBSD.
	(USE_PT_GNU_EH_FRAME): Define for OpenBSD.
	(ElfW): Likewise.

From-SVN: r192148
2012-10-05 23:35:55 +00:00
Jonathan Wakely 5e3e4fe874 re PR other/53889 (Gthreads doesn't support destroying recursive mutexes)
PR other/53889
	* config/i386/gthr-win32.h (__gthread_recursive_mutex_destroy):
	Fix parameter names.

From-SVN: r192114
2012-10-05 08:35:12 +01:00
Oleg Endo 8608637610 re PR target/33135 ([SH] -ffinite-math-only should not be on by default)
PR target/33135
	* config/sh/t-sh (HOST_LIBGCC2_CFLAGS): Delete.
	* config/sh/t-netbsd (HOST_LIBGCC2_CFLAGS): Delete.
	* config/sh/t-linux (HOST_LIBGCC2_CFLAGS): Remove mieee option.

From-SVN: r192097
2012-10-04 18:32:20 +00:00
Oleg Endo 9597375a25 re PR target/50457 (SH2A atomic functions)
PR target/50457
	* config/sh/sh.c (parse_validate_atomic_model_option): Handle name
	strings in sh_atomic_model.
	* config/sh/sh.h (TARGET_CPU_CPP_BUILTINS): Move macro implementation
	to ...
	* config/sh/sh-c.c (sh_cpu_cpp_builtins): ... this new function.
	Add __SH1__ and __SH2__ defines.  Add __SH_ATOMIC_MODEL_*__ define.
	* config/sh/sh-protos.h (sh_atomic_model): Add name and cdef_name
	variables.
	(sh_cpu_cpp_builtins): Declare new function.

	PR target/50457
	* config/sh/linux-atomic.S: Delete.
	* config/sh/linux-atomic.c: New.
	* config/sh/t-linux (LIB2ADD): Replace linux-atomic.S with
	linux-atomic.c.  Add cflags to disable warnings.

From-SVN: r192051
2012-10-03 21:36:14 +00:00
Jonathan Wakely 1504e3e1c4 re PR other/53889 (Gthreads doesn't support destroying recursive mutexes)
libgcc:

	PR other/53889
	* gthr.h (__gthread_recursive_mutex_destroy): Document new required
	function.
	* gthr-posix.h (__gthread_recursive_mutex_destroy): Define.
	* gthr-single.h (__gthread_recursive_mutex_destroy): Likewise.
	* config/gthr-rtems.h (__gthread_recursive_mutex_destroy): Likewise.
	* config/gthr-vxworks.h (__gthread_recursive_mutex_destroy): Likewise.
	* config/i386/gthr-win32.h (__gthread_recursive_mutex_destroy):
	Likewise.
	* config/mips/gthr-mipssde.h (__gthread_recursive_mutex_destroy):
	Likewise.
	* config/pa/gthr-dce.h (__gthread_recursive_mutex_destroy): Likewise.
	* config/s390/gthr-tpf.h (__gthread_recursive_mutex_destroy): Likewise.

libstdc++-v3:

	PR other/53889
	* include/std/mutex (__recursive_mutex_base::~__recursive_mutex_base):
	Use __gthread_recursive_mutex_destroy.
	(__recursive_mutex_base::_S_destroy): Remove.
	(__recursive_mutex_base::_S_destroy_win32): Likewise.
	* include/ext/concurrence.h (__recursive_mutex::~__recursive_mutex):
	Use __gthread_recursive_mutex_destroy.
	(__recursive_mutex::_S_destroy): Remove.
	(__recursive_mutex::_S_destroy_win32): Likewise.

From-SVN: r192002
2012-10-02 21:22:32 +01:00
Mark Kettenis 17f293b014 config.host (hppa-*-openbsd*): New target.
libgcc/:

        * config.host (hppa-*-openbsd*): New target.
        * config/pa/t-openbsd: New file.

gcc:/

        * config.gcc (hppa*-*-openbsd*): New target.
        * config/pa/pa-openbsd.h: New file.
        * config/pa/pa32-openbsd.h: New file.
        * config/host-openbsd.c: Update copyright year.
        (TRY_EXCEPT_VM_SPACE): Define for OpenBSD/hppa.

From-SVN: r191508
2012-09-20 01:20:34 +00:00
Georg-Johann Lay 51526856a1 re PR target/54222 ([avr] Implement fixed-point support)
gcc/
	PR target/54222
	* config/avr/avr-fixed.md (ALL2S, ALL4S, ALL24S, ALL124S,
	ALL124U): New mode iterators.
	(<code_stdname><mode>3): New insns for SS_PLUS, SS_MINUS.
	(<code_stdname><mode>3): New insns for US_PLUS, US_MINUS.
	(usneg<mode>2): New insns.
	(<code_stdname><mode>2): New expanders for SS_NEG, SS_ABS.
	(*<code_stdname><mode>2): New insns for SS_NEG, SS_ABS.
	* config/avr/avr-dimode.md (ALL8U, ALL8S): New mode iterators.
	(avr_out_plus64, avr_out_minus64): Use avr_out_plus instead.
	(<code_stdname><mode>3): New expanders for SS_PLUS, SS_MINUS.
	(<code_stdname><mode>3): New expanders for US_PLUS, US_MINUS.
	(<code_stdname><mode>3_insn): New insns.
	(<code_stdname><mode>3_const_insn): New insns.
	* config/avr/avr.md (cc): Add: plus. Remove: out_plus,
	out_plus_noclobber, minus.
	(length): Add: plus.  Remove: out_plus, out_plus_noclobber,
	plus64, minus, minus64.
	(abelian): New code_attr.
	(code_stdname): Handle: ss_plus, ss_minus, ss_neg, ss_abs,
	us_plus, us_minus, us_neg.
	(*add<mode>3, add<mode>3_clobber, add<mode>3, addpsi3, sub<mode>3):
	Use avr_out_plus to output.
	* config/avr/avr-protos.h (avr_out_plus): Change prototype.
	(avr_out_plus_noclobber, avr_out_minus): Remove.
	(avr_out_plus64, avr_out_minus64): Remove.
	* config/avr/avr.c (avr_out_plus_1): Add new default arguments
	code_sat, sign.  Saturate after operation if code_sat != UNKNOWN.
	(avr_out_plus_symbol): New static function.
	(avr_out_plus): Rewrite.
	(adjust_insn_length): Handle: ADJUST_LEN_PLUS.  Remove handling
	of: ADJUST_LEN_OUT_PLUS, ADJUST_LEN_PLUS64, ADJUST_LEN_MINUS, 
	ADJUST_LEN_MINUS64, ADJUST_LEN_OUT_PLUS_NOCLOBBER.
	(notice_update_cc): Handle: CC_PLUS.  Remove handling of: CC_MINUS,
	CC_OUT_PLUS, CC_OUT_PLUS_NOCLOBBER
	(avr_out_plus_noclobber, avr_out_minus): Remove.
	(avr_out_plus64, avr_out_minus64): Remove.
	(avr_print_operand): Print raw REGNO if 'r' is used with REG.

libgcc/
	PR target/54222
	* config/avr/lib1funcs-fixed.S (__ssneg_2, __ssabs_2, __ssneg_4,
	__ssabs_4, __clr_8, __ssneg_8, __ssabs_8,
	__usadd_8, __ussub_8, __ssadd_8, __sssub_8): New functions.
	(__divsa3): Use __negsi2 to negate r_quoL.
	* config/avr/lib1funcs.S (FALIAS): New macro.
	(__divmodsi4): Break out and use __divmodsi4_neg1 as...
	(__negsi2): ...this new function.
	* config/avr/t-avr (LIB1ASMFUNCS): Add _negsi2, _clr_8,
	_ssneg_2, _ssneg_4, _ssneg_8, _ssabs_2, _ssabs_4,
	_ssabs_8, _ssadd_8, _sssub_8, _usadd_8, _ussub_8.
	(LIB2FUNCS_EXCLUDE): Fix typo for _add _sub.
	Add: _ssadd*, _sssub*, _ssneg*, _ssabs* for signed fixed modes.
	Add: _usadd*, _ussub*, _usneg* for unsigned fixed modes.

gcc/testsuite/
	PR target/54222
	* gcc.target/avr/torture/fix-types.h: New.
	* gcc.target/avr/torture/vals-hr.def: New.
	* gcc.target/avr/torture/vals-r.def: New.
	* gcc.target/avr/torture/vals-k.def: New.
	* gcc.target/avr/torture/vals-ur.def: New.
	* gcc.target/avr/torture/vals-uk.def: New.
	* gcc.target/avr/torture/vals-uhr.def: New.
	* gcc.target/avr/torture/vals-llk.def: New.
	* gcc.target/avr/torture/vals-ullk.def: New.
	* gcc.target/avr/torture/sat-hr-plus-minus.c: New.
	* gcc.target/avr/torture/sat-r-plus-minus.c: New.
	* gcc.target/avr/torture/sat-k-plus-minus.c: New.
	* gcc.target/avr/torture/sat-ur-plus-minus.c: New.
	* gcc.target/avr/torture/sat-uk-plus-minus.c: New.
	* gcc.target/avr/torture/sat-uhr-plus-minus.c: New.
	* gcc.target/avr/torture/sat-llk-plus-minus.c: New.
	* gcc.target/avr/torture/sat-ullk-plus-minus.c: New.

From-SVN: r191345
2012-09-15 15:52:28 +00:00
Oleg Endo aadb5b43ae re PR target/54089 ([SH] Refactor shift patterns)
PR target/54089
	* config/sh/sh.h (SH_DYNAMIC_SHIFT_COST): Set always to 1 if
	dynamic shifts are available.
	(SHIFT_COUNT_TRUNCATED): Always define to 0.  Correct comment.
	* config/sh/sh.c (ashl_lshr_seq, ext_ashl_lshr_seq): Add comments.
	* config/sh/predicates.md (shift_count_operand): Allow
	arith_reg_operand even if TARGET_DYNSHIFT is false.
	* config/sh/sh.md (ashlsi3, lshrsi3): Expand library call patterns
	if needed.
	(ashlsi3_d_call, lshrsi3_d_call): New insns.

	PR target/54089
	* config/sh/lib1funcs.S (ashlsi3): Reimplement as ashlsi3_r0.
	(lshrsi3): Reimplement as lshrsi3_r0.

	PR target/54089
	* gcc.target/sh/pr54089-3.c: New.

From-SVN: r191161
2012-09-10 20:35:25 +00:00
Andreas Schwab d5d66749a3 re PR target/46191 (Non-absolute names in libgcc_s.so)
PR target/46191
* config/t-slibgcc-libgcc (SHLIB_MAKE_SOLINK): Use -lgcc instead
of libgcc.a.

From-SVN: r191160
2012-09-10 20:14:47 +00:00
Teresa Johnson c6c36e7310 This fixes part of the issue described in PR gcov-profile/54487 where there...
This fixes part of the issue described in PR gcov-profile/54487 where
there were warnings about mismatches due to slight differences in the
merged histograms in different object files. This can happen due to
the truncating integer division in the merge routine, which could result
in slightly different histograms when summaries are merged in different
orders.

2012-09-07  Teresa Johnson  <tejohnson@google.com>

        PR gcov-profile/54487
	* libgcc/libgcov.c (gcov_exit): Avoid warning on histogram
        differences.

From-SVN: r191074
2012-09-07 13:49:47 +00:00
Georg-Johann Lay b588ae3074 re PR target/54461 ([avr] add configure option for better AVR-Libc integration)
PR target/54461
	* configure.ac (noconfigdirs,target=avr-*-*): Add target-newlib,
	target-libgloss if not configured --with-avrlibc=no.
	* configure: Regenerate.

libgcc/
	PR target/54461
	* config.host (tmake_file,host=avr-*-*): Add avr/t-avrlibc if
	not configured --with-avrlibc=no.
	* config/avr/t-avrlibc: New file.
	* Makefile.in (FPBIT_FUNCS): filter-out LIB2FUNCS_EXCLUDE.
	(DPBIT_FUNCS): Ditto.
	(TPBIT_FUNCS): Ditto.

gcc/
	PR target/54461
	* config.gcc (tm_file,target=avr-*-*): Add avr/avrlibc.h if
	not configured --with-avrlibc=no.
	(tm_defines,target=avr-*-*): Add WITH_AVRLIBC if not configured
	--with-avrlibc=no.
	* config/avr/avrlibc.h: New file.
	* config/avr/avr-c.c: Build-in define __WITH_AVRLIBC__ if
	not configured --with-avrlibc=no.
	* doc/invoke.texi (AVR Built-in Macros): Document __WITH_AVRLIBC__

From-SVN: r190967
2012-09-05 08:47:50 +00:00
Teresa Johnson abd16fb112 Adding change log entries for r190952:
Enhances the gcov program summary by adding a histogram of arc counter
entries. This is used to compute working set information in the compiler
for use by optimizations that need information on hot vs cold counter
values or the rough working set size in terms of the number of counters.
Each working set data point is the minimum counter value and number of
counters required to reach a given percentage of the cumulative counter
sum across the profiled execution (sum_all in the program summary).

2012-09-04  Teresa Johnson  <tejohnson@google.com>

	* libgcc/libgcov.c (struct gcov_summary_buffer): New structure.
	(gcov_histogram_insert): New function.
	(gcov_compute_histogram): Ditto.
	(gcov_exit): Invoke gcov_compute_histogram, and perform merging of
	histograms during summary merging.
	* gcc/gcov-io.c (gcov_write_summary): Write out non-zero histogram
	entries to function summary along with an occupancy bit vector.
	(gcov_read_summary): Read in the histogram entries.
	(gcov_histo_index): New function.
	(void gcov_histogram_merge): Ditto.
	* gcc/gcov-io.h (gcov_type_unsigned): New type.
	(struct gcov_bucket_type): Ditto.
	(struct gcov_ctr_summary): Include histogram.
	(GCOV_TAG_SUMMARY_LENGTH): Update to include histogram entries.
	(GCOV_HISTOGRAM_SIZE): New macro.
	(GCOV_HISTOGRAM_BITVECTOR_SIZE): Ditto.
	* gcc/profile.c (NUM_GCOV_WORKING_SETS): Ditto.
	(gcov_working_sets): New global variable.
	(compute_working_sets): New function.
	(find_working_set): Ditto.
	(get_exec_counts): Invoke compute_working_sets.
	* gcc/coverage.c (read_counts_file): Merge histograms, and
	fix bug with accessing summary info for non-summable counters.
	* gcc/basic-block.h (gcov_type_unsigned): New type.
	(struct gcov_working_set_info): Ditto.
	(find_working_set): Declare.
	* gcc/gcov-dump.c (tag_summary): Dump out histogram.

From-SVN: r190953
2012-09-04 21:20:30 +00:00
Teresa Johnson 9f71de8404 Enhances the gcov program summary by adding a histogram of arc counter entries.
Enhances the gcov program summary by adding a histogram of arc counter
entries. This is used to compute working set information in the compiler
for use by optimizations that need information on hot vs cold counter
values or the rough working set size in terms of the number of counters.
Each working set data point is the minimum counter value and number of
counters required to reach a given percentage of the cumulative counter
sum across the profiled execution (sum_all in the program summary).

2012-09-04  Teresa Johnson  <tejohnson@google.com>

	* libgcc/libgcov.c (struct gcov_summary_buffer): New structure.
	(gcov_histogram_insert): New function.
	(gcov_compute_histogram): Ditto.
	(gcov_exit): Invoke gcov_compute_histogram, and perform merging of
	histograms during summary merging.
	* gcc/gcov-io.c (gcov_write_summary): Write out non-zero histogram
	entries to function summary along with an occupancy bit vector.
	(gcov_read_summary): Read in the histogram entries.
	(gcov_histo_index): New function.
	(void gcov_histogram_merge): Ditto.
	* gcc/gcov-io.h (gcov_type_unsigned): New type.
	(struct gcov_bucket_type): Ditto.
	(struct gcov_ctr_summary): Include histogram.
	(GCOV_TAG_SUMMARY_LENGTH): Update to include histogram entries.
	(GCOV_HISTOGRAM_SIZE): New macro.
	(GCOV_HISTOGRAM_BITVECTOR_SIZE): Ditto.
	* gcc/profile.c (NUM_GCOV_WORKING_SETS): Ditto.
	(gcov_working_sets): New global variable.
	(compute_working_sets): New function.
	(find_working_set): Ditto.
	(get_exec_counts): Invoke compute_working_sets.
	* gcc/coverage.c (read_counts_file): Merge histograms, and
	fix bug with accessing summary info for non-summable counters.
	* gcc/basic-block.h (gcov_type_unsigned): New type.
	(struct gcov_working_set_info): Ditto.
	(find_working_set): Declare.
	* gcc/gcov-dump.c (tag_summary): Dump out histogram.

From-SVN: r190952
2012-09-04 21:16:18 +00:00
Mark Kettenis 613061fdd0 config.host (x86_64-*-openbsd*): New target.
libgcc/

	* config.host (x86_64-*-openbsd*): New target.

gcc/

	* config.gcc (x86_64-*-openbsd*): New target.
	* config.host (*-*-openbsd*): New target.
	* config/openbsd.h (TARGET_C99_FUNCTIONS): Define.
	* config/i386/openbsdelf.h: Remove some superfluous defines and
	group things together in a more logical fashion.
	(DBX_REGISTER_NUMBER): Provide a
	definition that works on both 32-bit and 64-bit targets.
	(WCHAR_TYPE_SIZE): Hardcode as 32.
	(NO_DOLLAR_IN_LABEL): Remove undef.
	(TARGET_DEFAULT): Remove.
	(SET_ASM_OP): Remove.
	(DEFAULT_PCC_STRUCT_RETURN): Undef first to prevent warning.
	(ASM_OUTPUT_MAX_SKIP_ALIGN): Synch with x86-64.h
	(DWARF2_UNWIND_INFO): Remove define.
	(HAVE_ENABLE_EXECUTE_STACK): Define.
	* config/host-openbsd.c: New file.
	* config/t-openbsd (USER_H): Add EXTRA_HEADERS.
	* config/x-openbsd: New file.

From-SVN: r190863
2012-09-02 14:13:21 +00:00
Chung-Lin Tang 867a834534 crtfastmath.c (set_fast_math): Add 'nomips16' attribute.
2012-08-29  Chung-Lin Tang  <cltang@codesourcery.com>

	libgcc/
	* config/mips/crtfastmath.c (set_fast_math): Add 'nomips16'
	attribute.

From-SVN: r190773
2012-08-29 09:31:52 +00:00
Georg-Johann Lay 4aeaaca35f re PR target/54222 ([avr] Implement fixed-point support)
PR target/54222
	* config/avr/t-avr (conv_X): Rename to func_X.

From-SVN: r190646
2012-08-24 13:01:54 +00:00
Georg-Johann Lay e55e405619 re PR target/54222 ([avr] Implement fixed-point support)
libgcc/
	PR target/54222
	* config/avr/lib1funcs-fixed.S: New file.
	* config/avr/lib1funcs.S: Include it.  Undefine some divmodsi
	after they are used.
	(neg2, neg4): New macros.
	(__mulqihi3,__umulqihi3,__mulhi3): Rewrite non-MUL variants.
	(__mulhisi3,__umulhisi3,__mulsi3): Rewrite non-MUL variants.
	(__umulhisi3): Speed up MUL variant if there is enough flash.
	* config/avr/avr-lib.h (TA, UTA): Adjust according to gcc's
	avr-modes.def.
	* config/avr/t-avr (LIB1ASMFUNCS): Add: _fractqqsf, _fractuqqsf,
	_fracthqsf, _fractuhqsf, _fracthasf, _fractuhasf, _fractsasf,
	_fractusasf, _fractsfqq, _fractsfuqq, _fractsfhq, _fractsfuhq,
	_fractsfha, _fractsfsa, _mulqq3, _muluqq3, _mulhq3, _muluhq3,
	_mulha3, _muluha3, _mulsa3, _mulusa3, _divqq3, _udivuqq3, _divhq3,
	_udivuhq3, _divha3, _udivuha3, _divsa3, _udivusa3.
	(LIB2FUNCS_EXCLUDE): Add supported functions.

gcc/
	PR target/54222
	* avr-modes.def (HA, SA, DA, TA, UTA): Adjust modes.
	* avr/avr-fixed.md: New file.
	* avr/avr.md: Include it.
	(cc): Add: minus.
	(adjust_len): Add: minus, minus64, ufract, sfract.
	(ALL1, ALL2, ALL4, ORDERED234): New mode iterators.
	(MOVMODE): Add: QQ, UQQ, HQ, UHQ, HA, UHA, SQ, USQ, SA, USA.
	(MPUSH): Add: HQ, UHQ, HA, UHA, SQ, USQ, SA, USA.
	(pushqi1, xload8_A, xload_8, movqi_insn, *reload_inqi, addqi3,
	subqi3, ashlqi3, *ashlqi3, ashrqi3, lshrqi3, *lshrqi3, *cmpqi, 
	cbranchqi4, *cpse.eq): Generalize to handle all 8-bit modes in ALL1.
	(*movhi, reload_inhi, addhi3, *addhi3, addhi3_clobber, subhi3,
	ashlhi3, *ashlhi3_const, ashrhi3, *ashirhi3_const, lshrhi3,
	*lshrhi3_const, *cmphi, cbranchhi4): Generalize to handle all
	16-bit modes in ALL2.
	(subhi3, casesi, strlenhi): Add clobber when expanding minus:HI.
	(*movsi, *reload_insi, addsi3, subsi3, ashlsi3, *ashlsi3_const,
	ashrsi3, *ashrhi3_const, *ashrsi3_const, lshrsi3, *lshrsi3_const,
	*reversed_tstsi, *cmpsi, cbranchsi4): Generalize to handle all
	32-bit modes in ALL4.
	* avr-dimode.md (ALL8): New mode iterator.
	(adddi3, adddi3_insn, adddi3_const_insn, subdi3, subdi3_insn,
	subdi3_const_insn, cbranchdi4, compare_di2,
	compare_const_di2, ashrdi3, lshrdi3, rotldi3, ashldi3_insn,
	ashrdi3_insn, lshrdi3_insn, rotldi3_insn): Generalize to handle
	all 64-bit modes in ALL8.
	* config/avr/avr-protos.h (avr_to_int_mode): New prototype.
	(avr_out_fract, avr_out_minus, avr_out_minus64): New prototypes.
	* config/avr/avr.c (TARGET_FIXED_POINT_SUPPORTED_P): Define to...
	(avr_fixed_point_supported_p): ...this new static function.
	(TARGET_BUILD_BUILTIN_VA_LIST): Define to...
	(avr_build_builtin_va_list): ...this new static function.
	(avr_adjust_type_node): New static function.
	(avr_scalar_mode_supported_p): Allow if ALL_FIXED_POINT_MODE_P.
	(avr_builtin_setjmp_frame_value): Use gen_subhi3 and return new
	pseudo instead of gen_rtx_MINUS.
	(avr_print_operand, avr_operand_rtx_cost): Handle: CONST_FIXED.
	(notice_update_cc): Handle: CC_MINUS.
	(output_movqi): Generalize to handle respective fixed-point modes.
	(output_movhi, output_movsisf, avr_2word_insn_p): Ditto.
	(avr_out_compare, avr_out_plus_1): Also handle fixed-point modes.
	(avr_assemble_integer): Ditto.
	(output_reload_in_const, output_reload_insisf): Ditto.
	(avr_compare_pattern): Skip all modes > 4 bytes.
	(avr_2word_insn_p): Skip movuqq_insn, movqq_insn.
	(avr_out_fract, avr_out_minus, avr_out_minus64): New functions.
	(avr_to_int_mode): New function.
	(adjust_insn_length): Handle: ADJUST_LEN_SFRACT,
	ADJUST_LEN_UFRACT, ADJUST_LEN_MINUS, ADJUST_LEN_MINUS64.
	* config/avr/predicates.md (const0_operand): Allow const_fixed.
	(const_operand, const_or_immediate_operand): New.
	(nonmemory_or_const_operand): New.
	* config/avr/constraints.md (Ynn, Y00, Y01, Y02, Ym1, Ym2, YIJ):
	New constraints.
	* config/avr/avr.h (LONG_LONG_ACCUM_TYPE_SIZE): Define.

From-SVN: r190644
2012-08-24 12:42:48 +00:00
Georg-Johann Lay a147b6d28f Makefile.in (fixed-funcs,fixed-conv-funcs): filter-out LIB2FUNCS_EXCLUDE before adding them to libgcc-objects, libgcc-s-objects.
* Makefile.in (fixed-funcs,fixed-conv-funcs): filter-out
	LIB2FUNCS_EXCLUDE before adding them to libgcc-objects,
	libgcc-s-objects.
	* fixed-obj.mk: Only expand dependency if $o is not in
	LIB2FUNCS_EXCLUDE.

From-SVN: r190624
2012-08-23 15:41:03 +00:00
H.J. Lu c637141af0 Add -mlong-double-64/-mlong-double-80 to i386
gcc/

	* doc/invoke.texi: Document -mlong-double-64/-mlong-double-80.

	* config/i386/i386.c (flag_opts): Add -mlong-double-64.
	(TARGET_HAS_BIONIC): Default long double to 64-bit for Bionic.

	* config/i386/i386.h (LONG_DOUBLE_TYPE_SIZE): Use 64 if
	TARGET_LONG_DOUBLE_64 is true.
	(LIBGCC2_LONG_DOUBLE_TYPE_SIZE): New macro.
	(WIDEST_HARDWARE_FP_SIZE): Defined to 80.

	* config/i386/i386.opt (mlong-double-80): New option.
	(mlong-double-64): Likewise.

	* config/i386/i386-c.c (ix86_target_macros): Define
	__LONG_DOUBLE_64__ for TARGET_LONG_DOUBLE_64.

gcc/testsuite/

	* gcc.target/i386/long-double-64-1.c: New file.
	* gcc.target/i386/long-double-64-2.c: Likewise.
	* gcc.target/i386/long-double-64-3.c: Likewise.
	* gcc.target/i386/long-double-64-4.c: Likewise.
	* gcc.target/i386/long-double-80-1.c: Likewise.
	* gcc.target/i386/long-double-80-2.c: Likewise.
	* gcc.target/i386/long-double-80-3.c: Likewise.
	* gcc.target/i386/long-double-80-4.c: Likewise.
	* gcc.target/i386/long-double-80-5.c: Likewise.
	* gcc.target/i386/long-double-80-6.c: Likewise.
	* gcc.target/i386/long-double-80-7.c: Likewise.

libgcc/

	* config/i386/t-linux (HOST_LIBGCC2_CFLAGS): New.

From-SVN: r190599
2012-08-22 12:46:28 -07:00