Commit Graph

149394 Commits

Author SHA1 Message Date
Eric Botcazou
f15fe0af54 * config/sparc/sparc.md (<*vlop:code><VL:mode>3): Remove leading '*'.
From-SVN: r241632
2016-10-27 21:00:22 +00:00
Michael Meissner
787c7a65f6 constraints.md (wH constraint): Add new constraints for allowing 32-bit integers (and eventually 8/16-bit...
[gcc]
2016-10-27  Michael Meissner  <meissner@linux.vnet.ibm.com>

	* config/rs6000/constraints.md (wH constraint): Add new
	constraints for allowing 32-bit integers (and eventually 8/16-bit
	integers) into the vector registers.
	(wI constraint): Likewise.
	(wJ constraint): Likewise.
	(wK constraint): Likewise.
	* config/rs6000/rs6000-cpus.def (ISA_2_7_MASKS_SERVER): Add
	-mvsx-small-integer as a default option for ISA 2.07
	(i.e. power8).
	(POWERPC_MASKS): Likewise.
	* config/rs6000/rs6000.opt (-mvsx-small-integer): Add new debug
	switch to turn off small integer support in vector registers.
	* config/rs6000/rs6000.c (rs6000_hard_regno_mode_ok): Eliminate
	test for -mupper-regs-di, since it is already done with the
	reg_add[mode].scalar_in_vsx_p.  Add support for the switch
	-mvsx-small-integer.
	(rs6000_debug_reg_global): Add support for wH, wI, wJ, and wK
	constraints.
	(rs6000_setup_reg_addr_masks): Likewise.
	(rs6000_init_hard_regno_mode_ok): Likewise.
	(rs6000_option_override_internal): Add consistency checks for
	-mvsx-small-integer.
	(rs6000_secondary_reload_simple_move): SImode is a simple move if
	-mvsx-small-integer.
	(rs6000_secondary_reload): Use std::swap.
	(rs6000_preferred_reload_class): Don't prefer FLOAT_REGS over
	VSX_REGS for small integers in vector registers, since there is no
	D-FORM address mode for such types.
	(rs6000_register_move_cost): Use FIRST_FPR_REGNO instead of 32.
	(rs6000_opt_masks): Add -mvsx-small-integer.
	* config/rs6000/vsx.md (VSINT_84): Add SImode for small integer
	support.
	(VSX_EXTRACT_I2): Clone VSX_EXTRACT_I, but drop V4SI since SImode
	extracts can be done on ISA 2.07.
	(vsx_extract_<mode>): Add support for small integers in vsx
	registers.
	(vsx_extract_<mode>_p9): Use 'v' instead of VSX_EX, since we no
	longer support V4SImode in this pattern.
	(vsx_extract_si): New insn to support extraction of SImode in ISA
	2.07 using either xxextractuw or vspltw.
	(vsx_extract_<mode>_p8): Use 'v' instead of VSX_EX, since we no
	longer support V4SImode in this pattern.
	* config/rs6000/rs6000.h (enum rs6000_reg_class_enum): Add wH, wI,
	wJ, and wK constraints.
	* config/rs6000/rs6000.md (f32_sv): Use correct instruction for
	storing SDmode with VSX instructions.
	(zero_extendsi<mode>2): Reorder pattern, so RLDICL comes after the
	GPR load and before the FPR and VSX loads.  Remove ??, ! from the
	constraints.  Add MFVSRWZ and XXEXTRACTUW instructions to support
	small integers in vector registers.
	(extendsi<mode>2): Reorder pattern, so EXTSW comes after the GPR
	load and before the FPR and VSX loads.  Remove ??, ! from the
	constraints.  Add VEXTSW2D support for small integers in vector
	registers.
	(lfiwax): Remove ! constraint.  Add VEXTSW2D support for small
	integers in vector registers.
	(floatsi<mode>2_lfiwax): If -mvsx-small-integer issue a normal
	move instead of using an UNSPEC.
	(lfiwzx): Remove ! constraint.  Add XXEXTRACTUW support for small
	integers in vector registers.
	(floatunssi<mode>2_lfiwzx): If -mvsx-small-integer issue a normal
	move instead of using an UNSPEC.
	(movsi_internal1): Add support for -mvsx-small-integer.  Align
	columns so that it is more readable.
	(SImode splitter for ISA 3.0 constants): Add splitter for
	-128..127 constants that can easily be constructed on ISA 3.0.
	* doc/md.texi (PowerPC Constraints): Document wH, wI, wJ, and wK
	constraints.

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

	* gcc.target/powerpc/vsx-simode.c: New test.
	* gcc.target/powerpc/vsx-simode2.c: Likewise.
	* gcc.target/powerpc/vsx-simode3.c: Likewise.

From-SVN: r241631
2016-10-27 20:52:07 +00:00
Jakub Jelinek
6f21288f8c re PR fortran/78026 (ICE in gfc_resolve_omp_declare_simd, at fortran/openmp.c:5190)
PR fortran/78026
	* parse.c (decode_statement): Don't create namespace for possible
	select type here and destroy it afterwards.
	(parse_select_type_block): Set gfc_current_ns to new_st.ext.block.ns.
	(parse_executable, gfc_parse_file): Formatting fixes.
	* match.c (gfc_match_select_type): Create namespace for select type
	here, only after matching select type.  Formatting fixes.  Free that
	namespace if not returning MATCH_YES, after gfc_undo_symbols,
	otherwise remember it in new_st.ext.block.ns and switch to parent
	namespace anyway.

	* gfortran.dg/gomp/pr78026.f03: New test.
	* gfortran.dg/select_type_38.f03: New test.

From-SVN: r241630
2016-10-27 21:55:12 +02:00
Uros Bizjak
47ffb5d95e PR70975 Pass valid offset argument to sendfile
PR libstdc++/70975
	* src/filesystem/ops.cc (do_copy_file) [_GLIBCXX_USE_SENDFILE]:
	Pass non-null pointer to sendfile for offset argument.

From-SVN: r241629
2016-10-27 20:55:55 +02:00
Jakub Jelinek
4ce7157987 re PR middle-end/78025 (ICE in simd_clone_adjust, at omp-simd-clone.c:1126)
PR middle-end/78025
	* omp-simd-clone.c (simd_clone_adjust): Handle noreturn declare simd
	functions.

	* g++.dg/gomp/declare-simd-7.C: New test.

From-SVN: r241628
2016-10-27 20:51:28 +02:00
Aldy Hernandez
015c776064 oacc-init.c (goacc_new_thread): Use sizeof of the appropriate size when allocating new thread.
* oacc-init.c (goacc_new_thread): Use sizeof of the appropriate
	size when allocating new thread.

From-SVN: r241627
2016-10-27 17:36:36 +00:00
Fritz Reese
f8da53e093 Fix initialization of UNIONs with -finit-derived.
gcc/fortran/
	* expr.c (generate_union_initializer, get_union_initializer): New.
	* expr.c (component_initializer): Consider BT_UNION specially.
	* resolve.c (resolve_structure_cons): Hack for BT_UNION.
	* trans-expr.c (gfc_trans_subcomponent_assign): Ditto.
	* trans-expr.c (gfc_conv_union_initializer): New.
	* trans-expr.c (gfc_conv_structure): Replace UNION handling code with
	new function gfc_conv_union_initializer.

	gcc/testsuite/gfortran.dg/
	* dec_init_1.f90, dec_init_2.f90: Remove -fdump-tree-original.
	* dec_init_3.f90, dec_init_4.f90: New tests.

From-SVN: r241626
2016-10-27 17:21:46 +00:00
Aldy Hernandez
959c1e2045 builtins.c (expand_builtin_nonlocal_goto): Avoid evaluating PIC_OFFSET_TABLE_REGNUM twice.
* builtins.c (expand_builtin_nonlocal_goto): Avoid evaluating
	PIC_OFFSET_TABLE_REGNUM twice.

From-SVN: r241625
2016-10-27 16:13:19 +00:00
Bin Cheng
93f90bec31 match.pd ((convert (op:s (convert@2 @0) (convert?@3 @1)))): Add support for constant operand for OP.
* match.pd ((convert (op:s (convert@2 @0) (convert?@3 @1)))): Add
	support for constant operand for OP.

	gcc/testsuite
	* gcc.dg/fold-narrowbopcst-1.c: New test.

From-SVN: r241624
2016-10-27 14:59:04 +00:00
Fritz Reese
9a6ac422ec Fix some DEC I/O testcases.
gcc/testsuite/gfortran.dg/
	* dec_io_5.f90, dec_io_6.f90: Don't use "test.txt", and use
	dg-shouldfail/dg-output instead of XFAIL.

From-SVN: r241623
2016-10-27 14:14:44 +00:00
Jakub Jelinek
953f075823 dwarf2out.c (gen_member_die): Only reparent_child instead of splice_child_die if...
* dwarf2out.c (gen_member_die): Only reparent_child instead of
	splice_child_die if child doesn't have DW_AT_specification attribute.

From-SVN: r241622
2016-10-27 15:57:47 +02:00
Jonathan Wakely
e63d7e71a1 Fix target selectors in uniform_inside_sphere_distribution tests
* testsuite/ext/random/uniform_inside_sphere_distribution/cons/
	default.cc: Fix effective target selector.
	* testsuite/ext/random/uniform_inside_sphere_distribution/cons/
	parms.cc: Likewise.
	* testsuite/ext/random/uniform_inside_sphere_distribution/operators/
	equal.cc: Likewise.
	* testsuite/ext/random/uniform_inside_sphere_distribution/operators/
	generate.cc: Likewise.
	* testsuite/ext/random/uniform_inside_sphere_distribution/operators/
	inequal.cc: Likewise.
	* testsuite/ext/random/uniform_inside_sphere_distribution/operators/
	serialize.cc: Likewise.

From-SVN: r241621
2016-10-27 14:55:36 +01:00
Jason Merrill
7c92f4ec61 * class.c (add_method): Allow using-declarations to coexist.
From-SVN: r241620
2016-10-27 09:39:48 -04:00
Andrew Burgess
104700f4e9 Add myself to the MAINTAINERS file
* MAINTAINERS (Reviewers): Add myself.
	(Write After Approval): Add myself.

From-SVN: r241619
2016-10-27 14:04:19 +01:00
Jonathan Wakely
69af1c04e0 Adjust precision of filesystem::last_write_time tests
* testsuite/experimental/filesystem/iterators/directory_iterator.cc:
	Use end() function to get end iterator.
	* testsuite/experimental/filesystem/iterators/pop.cc: Remove printf
	statements that were present for debugging.
	* testsuite/experimental/filesystem/iterators/
	recursive_directory_iterator.cc: Use end() function to get end
	iterator.
	* testsuite/experimental/filesystem/operations/last_write_time.cc:
	Only require file timestamps to be accurate to one second.

From-SVN: r241616
2016-10-27 12:01:49 +01:00
Thomas Preud'homme
ddb92ab95f Enable ARMv8-M atomic and synchronization support for ARMv8-M Baseline
2016-10-27  Thomas Preud'homme  <thomas.preudhomme@arm.com>

    gcc/
    * config/arm/arm.h (TARGET_HAVE_LDREX): Define for ARMv8-M Baseline.
    (TARGET_HAVE_LDREXBH): Likewise.
    (TARGET_HAVE_LDACQ): Likewise.

    gcc/testsuite/
    * gcc.target/arm/atomic-comp-swap-release-acquire-3.c: New test.
    * gcc.target/arm/atomic-op-acq_rel-3.c: Likewise.
    * gcc.target/arm/atomic-op-acquire-3.c: Likewise.
    * gcc.target/arm/atomic-op-char-3.c: Likewise.
    * gcc.target/arm/atomic-op-consume-3.c: Likewise.
    * gcc.target/arm/atomic-op-int-3.c: Likewise.
    * gcc.target/arm/atomic-op-relaxed-3.c: Likewise.
    * gcc.target/arm/atomic-op-release-3.c: Likewise.
    * gcc.target/arm/atomic-op-seq_cst-3.c: Likewise.
    * gcc.target/arm/atomic-op-short-3.c: Likewise.

From-SVN: r241615
2016-10-27 10:19:27 +00:00
Thomas Preud'homme
33cab74617 Adapt other atomic operations to ARMv8-M Baseline
2016-10-27  Thomas Preud'homme  <thomas.preudhomme@arm.com>

    gcc/
    * config/arm/arm.c (arm_split_atomic_op): Add function comment.  Add
    logic to to decide whether to copy over old value to register for new
    value.
    * config/arm/sync.md: Add comments explaning why mode and code
    attribute are not defined in iterators.md
    (thumb1_atomic_op_str): New code attribute.
    (thumb1_atomic_newop_str): Likewise.
    (thumb1_atomic_fetch_op_str): Likewise.
    (thumb1_atomic_fetch_newop_str): Likewise.
    (thumb1_atomic_fetch_oldop_str): Likewise.
    (atomic_exchange<mode>): Add new ARMv8-M Baseline only alternatives to
    mirror the more restrictive constraints of the Thumb-1 insns after
    split compared to Thumb-2 counterpart insns.
    (atomic_<sync_optab><mode>): Likewise.  Add comment to keep constraints
    in sync with non atomic version.
    (atomic_nand<mode>): Likewise.
    (atomic_fetch_<sync_optab><mode>): Likewise.
    (atomic_fetch_nand<mode>): Likewise.
    (atomic_<sync_optab>_fetch<mode>): Likewise.
    (atomic_nand_fetch<mode>): Likewise.
    * config/arm/thumb1.md (thumb1_addsi3): Add comment to keep contraint
    in sync with atomic version.
    (thumb1_subsi3_insn): Likewise.
    (thumb1_andsi3_insn): Likewise.
    (thumb1_iorsi3_insn): Likewise.
    (thumb1_xorsi3_insn): Likewise.

From-SVN: r241614
2016-10-27 10:19:13 +00:00
Nick Clifton
b5300487f1 plugin.c (register_plugin_info): Produce an error message if the plugin is not found in the hash table.
* plugin.c (register_plugin_info): Produce an error message if the
	plugin is not found in the hash table.

From-SVN: r241613
2016-10-27 08:38:07 +00:00
Bin Cheng
ad6e4ba8de match.pd ((convert1 (minmax ((convert2 (x) c)))) -> minmax (x c)): New pattern.
* match.pd ((convert1 (minmax ((convert2 (x) c)))) -> minmax (x c)):
	New pattern.

	gcc/testsuite
	* gcc.dg/fold-convmaxconv-1.c: New test.
	* gcc.dg/fold-convminconv-1.c: New test.

From-SVN: r241612
2016-10-27 08:31:01 +00:00
Steven G. Kargl
fe14572b1a re PR fortran/78092 (ICE when calling SIZEOF on CLASS(*) entry)
2016-10-26  Steven G. Kargl <kargl@gcc.gnu.org>

	PR fortran/78092
	* trans-intrinsic.c (gfc_conv_intrinsic_sizeof):  Fix reference to an
	array element of type CLASS.

2016-10-26  Steven G. Kargl <kargl@gcc.gnu.org>

	PR fortran/78092
	* gfortran.dg/pr78092.f90: New test.

From-SVN: r241610
2016-10-27 03:08:13 +00:00
GCC Administrator
145f20675b Daily bump.
From-SVN: r241609
2016-10-27 00:16:15 +00:00
François Dumont
d72c3f0a36 stl_map.h (map()): Make default.
2016-10-26  François Dumont  <fdumont@gcc.gnu.org>

	* include/bits/stl_map.h (map()): Make default.
	* include/bits/stl_multimap.h (multimap()): Likewise.
	* include/bits/stl_multiset.h (multiset()): Likewise.
	* include/bits/stl_set.h (set()): Likewise.
	* include/bits/stl_tree.h (_Rb_tree_impl()): Add conditional noexcept.
	(_Rb_tree()): Make default.

From-SVN: r241601
2016-10-26 20:52:21 +00:00
Jeff Law
133634de98 sh.c (output_branch): Add missing fallthru comments.
* config/sh/sh.c (output_branch): Add missing fallthru comments.
	(gen_shl_and): Likewise.
	* config/sh/sh.md (movsicc): Add missing fallthru comments.

From-SVN: r241600
2016-10-26 14:25:06 -06:00
Kelvin Nilsen
7a83b391c7 re PR target/78056 (build failure on Power7)
gcc/ChangeLog:

2016-10-26  Kelvin Nilsen  <kelvin@gcc.gnu.org>

	PR target/78056
	* config/rs6000/rs6000.c (spe_init_builtins): Modify loops to not
	define builtin functions from the bdesc_spe_predicates or
	bdesc_spe_evsel arrays if the builtin mask is not compatible with
	the current compiler configuration.
	(paired_init_builtins): Modify loop to not define define builtin
	functions from the bdesc_paried_preds array if the builtin mask is
	not compatible with the current compiler configuration.
	(altivec_init_builtins): Modify loops to not define the
	__builtin_altivec_stxvl function nor the builtin functions from
	the bdesc_dst or bdesc_altivec_preds, or bdesc_abs arrays if the
	builtin mask is not compatible with the current compiler
	configuration.

gcc/testsuite/ChangeLog:

2016-10-26  Kelvin Nilsen  <kelvin@gcc.gnu.org>

	PR target/78056
	* gcc.target/powerpc/vsu/vec-any-eqz-7.c (test_any_equal): Change
	expected error message.
	* gcc.target/powerpc/vsu/vec-xst-len-12.c (store_data): Change
	expected error message.
	* gcc.target/powerpc/vsu/vec-all-nez-7.c
	(test_all_not_equal_and_not_zero): Change expected error message.

From-SVN: r241599
2016-10-26 20:19:39 +00:00
Jeff Law
d47e6b8225 mips.c (mips16_constant_cost): Add missing fallthru comments.
* config/mips/mips.c (mips16_constant_cost): Add missing
	fallthru comments.
	(mips16_build_call_stub): Increase buffer size.  Adjust
	fallthru comment.

From-SVN: r241597
2016-10-26 14:16:57 -06:00
David Malcolm
7574cfd44c Show INSN_UIDs in compact mode
gcc/ChangeLog:
	* print-rtl.c (rtx_writer::print_rtx_operand_code_u): Print
	INSN_UIDs for all insns in compact mode.
	(rtx_writer::print_rtx): Likewise.
	* print-rtl.h (rtx_writer::flag_compact): Update comment.
	* rtl-tests.c (selftest::test_dumping_insns): Update expected
	output to include INSN_UID.
	(selftest::test_uncond_jump): Likewise.

From-SVN: r241593
2016-10-26 18:25:14 +00:00
Bernd Edlinger
a0019047b8 re PR libstdc++/78110 (freestanding libstdc++ fails to compile)
2016-10-26  Bernd Edlinger  <bernd.edlinger@hotmail.de>

        PR libstdc++/78110
        * libsupc++/new_opa.cc: Don't include <malloc.h> in a free standing
        environment.  Declare memalign directly in that case.

From-SVN: r241591
2016-10-26 17:26:00 +00:00
Pat Haugen
6d5c37d004 haifa-sched.c (call_used_regs_num): Rename to...
* haifa-sched.c (call_used_regs_num): Rename to...
	(call_saved_regs_num): ...this.
	(fixed_regs_num): New variable.
	(sched_pressure_start_bb): Subtract out fixed_regs. Scale call_saved 
	regs not call_used.
	(alloc_global_sched_pressure_data): Compute call_saved and fixed regs.

From-SVN: r241590
2016-10-26 17:07:55 +00:00
Jeff Law
eaa402fcc7 microblaze.c (tls_mentioned_p): Avoid fallthru.
* config/microblaze/microblaze.c (tls_mentioned_p): Avoid
	fallthru.

From-SVN: r241587
2016-10-26 11:00:18 -06:00
David Malcolm
36cd856fc3 Introduce class rtx_writer
gcc/ChangeLog:
	* print-rtl-function.c (print_rtx_function): Rewrite in terms of
	class rtx_writer.
	* print-rtl.c (outfile): Delete global.
	(sawclose): Likewise.
	(indent): Likewise.
	(in_call_function_usage): Likewise.
	(flag_compact): Likewise.
	(flag_simple): Likewise.
	(rtx_writer::rtx_writer): New ctor.
	(print_rtx_operand_code_0): Convert to...
	(rtx_writer::print_rtx_operand_code_0): ...this.
	(print_rtx_operand_code_e): Convert to...
	(rtx_writer::print_rtx_operand_code_e): ...this.
	(print_rtx_operand_codes_E_and_V): Convert to...
	(rtx_writer::print_rtx_operand_codes_E_and_V): ...this.
	(print_rtx_operand_code_i): Convert to...
	(rtx_writer::print_rtx_operand_code_i): ...this.
	(print_rtx_operand_code_r): Convert to...
	(rtx_writer::print_rtx_operand_code_r): ...this.
	(print_rtx_operand_code_u): Convert to...
	(rtx_writer::print_rtx_operand_code_u): ...this.
	(print_rtx_operand): Convert to...
	(rtx_writer::print_rtx_operand): ...this.
	(print_rtx): Convert to...
	(rtx_writer::print_rtx): ...this.
	(print_inline_rtx): Rewrite in terms of class rtx_writer.
	(debug_rtx): Likewise.
	(print_rtl): Convert to...
	(rtx_writer::print_rtl): ...this.
	(print_rtl): Reimplement in terms of class rtx_writer.
	(print_rtl_single): Rewrite in terms of class rtx_writer.
	(print_rtl_single_with_indent): Convert to..
	(rtx_writer::print_rtl_single_with_indent): ...this.
	(print_simple_rtl): Rewrite in terms of class rtx_writer.
	* print-rtl.h (flag_compact): Delete decl.
	(class rtx_writer): New class.
	* rtl-tests.c (selftest::assert_rtl_dump_eq): Rewrite in terms of
	class rtx_writer.

From-SVN: r241586
2016-10-26 16:51:53 +00:00
Jeff Law
3bbe0b82a1 arc.c (acr_print_operand): Adjust fallthru comment.
* config/arc/arc.c (acr_print_operand): Adjust fallthru comment.
	(check_if_valid_sleep_operand): Add missing fallthru comment.
	(arc_register_move_cost): Increase buffer size.
	* config/arc/arc.md (cbranch4si_scratch): Add missing fallthru
	comment.
	* config/arc/predicates.md (move_str_operand): Avoid fallthru.

From-SVN: r241585
2016-10-26 10:33:22 -06:00
Jeff Law
f2b2b01c5d cr16.c (cr16_print_operand): Add missing fallthru comment.
* config/cr16/cr16.c (cr16_print_operand): Add missing fallthru
	comment.  Add gcc_unreachable for path that should never happen.

From-SVN: r241584
2016-10-26 10:27:44 -06:00
Jonathan Wakely
790207d645 Fix test for recursive_directory_iterator::pop
* testsuite/experimental/filesystem/iterators/pop.cc: Remove
	unreliable dependency on directory order.

From-SVN: r241583
2016-10-26 17:25:44 +01:00
Jeff Law
f34bf3d939 epiphany.c (epiphany_print_operand): Adjust fallthru comment.
* config/epiphany/epiphany.c (epiphany_print_operand): Adjust
	fallthru comment.

From-SVN: r241582
2016-10-26 10:23:27 -06:00
Jakub Jelinek
3693a620f0 re PR fortran/77973 (ICE in scan_omp_1_op, at omp-low.c:3841)
PR fortran/77973
	* gimplify.c (gimplify_adjust_omp_clauses_1): For all added map
	clauses with OMP_CLAUSE_SIZE being a decl, call omp_notice_variable
	on outer context if any.

	* gfortran.dg/gomp/pr77973.f90: New test.

Co-Authored-By: Martin Liska <mliska@suse.cz>

From-SVN: r241581
2016-10-26 18:21:56 +02:00
Jakub Jelinek
984fa0eacb gen-pass-instances.awk (adjust_linenos): INcrement pass_lines[p] by increment rather than double it.
* gen-pass-instances.awk (adjust_linenos): INcrement pass_lines[p]
	by increment rather than double it.
	(insert_remove_pass): Strip leading whitespace from args[3].  Don't
	emit a space before args[4].
	(END): Don't emit a space before with_arg.

From-SVN: r241580
2016-10-26 18:20:54 +02:00
Jeff Law
32502b58e2 * config/fr30/fr30.c (fr30_print_operand): Adjust fallthru comment.
From-SVN: r241579
2016-10-26 10:19:55 -06:00
Thomas Preud'homme
3a5a75b53a Adapt atomic compare and swap to ARMv8-M Baseline
2016-10-26  Thomas Preud'homme  <thomas.preudhomme@arm.com>

    gcc/
    * config/arm/sync.md (atomic_compare_and_swap<mode>_1): Add new ARMv8-M
    Baseline only alternatives to (i) hold store atomic success value in a
    return register rather than a scratch register, (ii) use a low register
    for it and to (iii) ensure the cbranchsi insn generated by the split
    respect the constraints of Thumb-1 cbranchsi4_insn and
    cbranchsi4_scratch.
    * config/arm/thumb1.md (cbranchsi4_insn): Add comment to indicate
    constraints must match those in atomic_compare_and_swap.
    (cbranchsi4_scratch): Likewise.

From-SVN: r241578
2016-10-26 16:17:54 +00:00
Thomas Preud'homme
12286f25cd Refactor atomic compare_and_swap to make it fit for ARMv8-M Baseline
2016-10-26  Thomas Preud'homme  <thomas.preudhomme@arm.com>

    gcc/
    * config/arm/arm.c (arm_expand_compare_and_swap): Add new bdst local
    variable.  Add the new parameter to the insn generator.  Set that
    parameter to be CC flag for 32-bit targets, bval otherwise.  Set the
    return value from the negation of that parameter for Thumb-1, keeping
    the logic unchanged otherwise except for using bdst as the destination
    register of the compare_and_swap insn.
    (arm_split_compare_and_swap): Add explanation about how is the value
    returned to the function comment.  Rename scratch variable to
    neg_bval.  Adapt initialization of variables holding operands to the
    new operand numbers.  Use return register to hold result of store
    exclusive for Thumb-1, scratch register otherwise.  Construct the
    appropriate cbranch for Thumb-1 targets, keeping the logic unchanged
    for 32-bit targets.  Guard Z flag setting to restrict to 32bit targets.
    Use gen_cbranchsi4 rather than hand-written conditional branch to loop
    for strongly ordered compare_and_swap.
    * config/arm/predicates.md (cc_register_operand): New predicate.
    * config/arm/sync.md (atomic_compare_and_swap<mode>_1): Use a
    match_operand with the new predicate to accept either the CC flag or a
    destination register for the boolean return value, restricting it to
    CC flag only via constraint.  Adapt operand numbers accordingly.

From-SVN: r241577
2016-10-26 16:17:44 +00:00
Jeff Law
4f4bf94e9c frv.c (comparison_string): Do not fall through after an error.
* config/frv/frv.c (comparison_string): Do not fall through after
	an error.

From-SVN: r241576
2016-10-26 10:15:38 -06:00
Jeff Law
4b59261982 iq2000.c (iq2000_function_arg): Adjust fallthru comment.
* config/iq2000/iq2000.c (iq2000_function_arg): Adjust fallthru
	comment.
	(expand_one_builtin): Add missing break.

From-SVN: r241573
2016-10-26 10:10:40 -06:00
Jeff Law
0c57f4bf4a m32c.c (encode_pattern_1): Add fallthru comment.
* config/m32c/m32c.c (encode_pattern_1): Add fallthru comment.
	(m32c_legitimate_address_p): Likewise.

From-SVN: r241572
2016-10-26 10:08:30 -06:00
Jeff Law
6bd3f67140 * config/m32r/m32r.c (m32r_print_operand): Adjust fallthru comment.
From-SVN: r241571
2016-10-26 10:02:58 -06:00
Jeff Law
0c15dfc1dc * config/mcore/mcore.c (mcore_gen_compare): Adjust fallthru comments.
From-SVN: r241569
2016-10-26 09:59:34 -06:00
Jeff Law
1cd20a8fdc microblaze.c (microblaze_function_arg): Adjust fallthru comment.
* config/microblaze/microblaze.c (microblaze_function_arg): Adjust
	fallthru comment.

From-SVN: r241568
2016-10-26 09:52:41 -06:00
Jeff Law
fcbe40f0df msp430.c (msp430_legitimate_address_p): Adjust fallthru comment.
* config/msp430/msp430.c (msp430_legitimate_address_p): Adjust
	fallthru comment.

From-SVN: r241567
2016-10-26 09:49:25 -06:00
Jeff Law
aa315f3463 * config/nios2/nios2.c (nios2_rtx_costs): Avoid fallthru.
From-SVN: r241566
2016-10-26 09:47:48 -06:00
Jeff Law
e741aaa382 rl78.c (rl78_calculate_death_notes): Add fallthru comment.
* config/rl78/rl78.c (rl78_calculate_death_notes): Add fallthru
	comment.
	(rl78_asm_ctor_dtor): Increase buffer size.

From-SVN: r241565
2016-10-26 09:42:11 -06:00
Jeff Law
42ee9611de stormy16.c (xstormy16_asm_output_destrutor): Increase buffer size.
* config/stormy16/stormy16.c (xstormy16_asm_output_destrutor): Increase
	buffer size.
	(xstormy16_asm_output_constructor): Likewise.

From-SVN: r241564
2016-10-26 09:36:48 -06:00
Edward Smith-Rowland
10da5b7cbc Implement uniform_inside_sphere_distribution extension.
2016-10-26  Edward Smith-Rowland  <3dw4rd@verizon.net>

	Implement uniform_inside_sphere_distribution extension.
	* include/ext/random: Implement uniform_inside_sphere_distribution.
	* include/ext/random.tcc: Ditto.
	* testsuite/ext/random/uniform_inside_sphere_distribution/
	cons/default.cc: New.
	* testsuite/ext/random/uniform_inside_sphere_distribution/
	cons/parms.cc: New.
	* testsuite/ext/random/uniform_inside_sphere_distribution/
	operators/equal.cc: New.
	* testsuite/ext/random/uniform_inside_sphere_distribution/
	operators/generate.cc: New.
	* testsuite/ext/random/uniform_inside_sphere_distribution/
	operators/inequal.cc: New.
	* testsuite/ext/random/uniform_inside_sphere_distribution/
	operators/serialize.cc: New.

From-SVN: r241562
2016-10-26 15:34:18 +00:00