Catherine Moore [Sun, 24 Feb 2013 23:46:44 +0000 (18:46 -0500)]
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
Vladimir Makarov [Fri, 22 Feb 2013 16:30:22 +0000 (16:30 +0000)]
re PR inline-asm/56148 (inline asm matching constraint with different mode)
2013-02-22 Vladimir Makarov <vmakarov@redhat.com>
PR inline-asm/56148
* lra-constraints.c (process_alt_operands): Reload operand
conflicting with earlier clobber only if no more other conflicting
operands.
Jakub Jelinek [Fri, 22 Feb 2013 16:07:36 +0000 (17:07 +0100)]
re PR sanitizer/56393 (SIGSEGV when -fsanitize=address and dynamic lib with global objects)
PR sanitizer/56393
* config/gnu-user.h (LIBASAN_EARLY_SPEC): Link in libasan_preinit.o
if not linking a shared library.
* lib/asan-dg.exp (asan_link_flags): Add
-B${gccpath}/libsanitizer/asan/ to flags.
* asan/Makefile.am (nodist_toolexeclib_HEADERS): Set to
libasan_preinit.o.
(libasan_preinit.o): Depend on asan_preinit.o.
* asan/Makefile.in: Regenerated.
* asan/asan_preinit.cc: New file, synced from upstream.
* asan/asan_rtl.cc: Remove preinit stuff, synced from upstream.
Jakub Jelinek [Thu, 21 Feb 2013 21:29:29 +0000 (22:29 +0100)]
re PR middle-end/56420 (Arithmetic error in computation with compile time unsigned __int128 constant)
PR middle-end/56420
* expmed.c (EXACT_POWER_OF_2_OR_ZERO_P): Do subtraction in uhwi, to
avoid signed wrapping.
(expand_mult): Handle properly multiplication by
((dword_type) -1) << (BITS_PER_WORD - 1). Improve multiplication by
((dword_type) 1) << (BITS_PER_WORD - 1). Avoid undefined behavior
in the compiler if coeff is HOST_WIDE_INT_MIN.
(expand_divmod): Don't make ext_op1 static, change it's type to
uhwi. Avoid undefined behavior in -INTVAL (op1).
Aldy Hernandez [Thu, 21 Feb 2013 20:16:26 +0000 (20:16 +0000)]
re PR middle-end/56108 (Asm statement in transaction_relaxed crashes compiler.)
PR middle-end/56108
* trans-mem.c (execute_tm_mark): Do not expand transactions that
are sure to go irrevocable.
testsuite/
* gcc.dg/tm/memopt-1.c: Declare functions transaction_safe.
Martin Jambor [Thu, 21 Feb 2013 16:08:51 +0000 (17:08 +0100)]
re PR tree-optimization/56310 (ICE: in decide_about_value, at ipa-cp.c:3310 with -fipa-cp -fno-early-inlining -fipa-cp-clone --param=ipa-cp-eval-threshold=1)
2013-02-21 Martin Jambor <mjambor@suse.cz>
PR tree-optimization/56310
* ipa-cp.c (agg_replacements_to_vector): New parameter index, copy
only matching indices and non-negative final offsets.
(intersect_aggregates_with_edge): Pass src_idx to
agg_replacements_to_vector. Pass src_idx insstead of index to
intersect_with_agg_replacements.
Tobias Burnus [Thu, 21 Feb 2013 09:23:31 +0000 (10:23 +0100)]
re PR fortran/56416 (texinfo 5: Many warnings for gfortran's *.texi)
2012-02-21 Tobias Burnus <burnus@net-b.de>
PR fortran/56416
* gfortran.texi (Part II: Language Reference, Extensions,
Non-Fortran Main Program): Sort @menu to match actual section order.
* intrinsic.texi (Intrinsic Procedures): Ditto.
(C_F_POINTER, PRECISION): Move to the alphabetically correct place.
Jan Hubicka [Wed, 20 Feb 2013 15:47:21 +0000 (16:47 +0100)]
re PR tree-optimization/56265 (ICE in ipa_make_edge_direct_to_target)
PR tree-optimization/56265
* ipa-prop.c (ipa_make_edge_direct_to_target): Fixup callgraph when target is
referenced for firs ttime.
* testsuite/g++.dg/ipa/devirt-11.C: New testcase.
Richard Biener [Wed, 20 Feb 2013 15:19:13 +0000 (15:19 +0000)]
tree-call-cdce.c (tree_call_cdce): Do not remove unused locals.
2013-02-20 Richard Biener <rguenther@suse.de>
* tree-call-cdce.c (tree_call_cdce): Do not remove unused locals.
* tree-ssa-forwprop.c (ssa_forward_propagate_and_combine): Likewise.
* tree-ssa-dce.c (perform_tree_ssa_dce): Likewise.
* tree-ssa-copyrename.c (copy_rename_partition_coalesce): Do
not return anything.
(rename_ssa_copies): Do not remove unused locals.
* tree-ssa-ccp.c (do_ssa_ccp): Likewise.
* tree-ssanames.c (pass_release_ssa_names): Remove unused
locals first.
* passes.c (execute_function_todo): Do not schedule unused locals
removal if cleanup_tree_cfg did something.
* tree-ssa-live.c (remove_unused_locals): Dump statistics
about the number of removed locals.
Richard Biener [Wed, 20 Feb 2013 11:39:39 +0000 (11:39 +0000)]
re PR tree-optimization/56396 (memory corruption in cc1)
2013-02-20 Richard Biener <rguenther@suse.de>
Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/56396
* tree-ssa-ccp.c (n_const_val): New static variable.
(get_value): Return NULL for SSA names we don't have a lattice
entry for.
(ccp_initialize): Initialize n_const_val.
* tree-ssa-copy.c (n_copy_of): New static variable.
(init_copy_prop): Initialize n_copy_of.
(get_value): Return NULL_TREE for SSA names we don't have a
lattice entry for.
* gcc.dg/pr56396.c: New testcase.
Co-Authored-By: Jakub Jelinek <jakub@redhat.com>
From-SVN: r196170
Richard Biener [Wed, 20 Feb 2013 09:03:18 +0000 (09:03 +0000)]
tree-ssa-loop-ivopts.c (alloc_use_cost_map): Use bitmap_count_bits and ceil_log2.
2013-02-20 Richard Biener <rguenther@suse.de>
* tree-ssa-loop-ivopts.c (alloc_use_cost_map): Use bitmap_count_bits
and ceil_log2.
(get_use_iv_cost): Terminate hashtable walk when coming across
an empty entry.
Benjamin Kosnik [Wed, 20 Feb 2013 01:52:36 +0000 (01:52 +0000)]
user.cfg.in: Set __cplusplus to 201103L.
2013-02-19 Benjamin Kosnik <bkoz@redhat.com>
* doc/doxygen/user.cfg.in: Set __cplusplus to 201103L. Change to
_GLIBCXX_INCLUDE_AS_CXX11. DIRECTORY_GRAPH, MARKDOWN_SUPPORT,
AUTOLINK_SUPPORT to NO. Update to doxygen 1.8.3.1.
* include/bits/stl_pair.h: Add to utilities group.
* include/std/tuple: Same.
* include/std/typeindex: Same.
Add support for the CLZ insn
* config/microblaze/microblaze.c: microblaze_has_clz = 0
Add version check for v8.10.a to enable microblaze_has_clz
* config/microblaze/microblaze.h: Add TARGET_HAS_CLZ as
combined version and TARGET_PATTERN_COMPARE check
* config/microblaze/microblaze.md: New clzsi2 instruction
Jakub Jelinek [Tue, 19 Feb 2013 09:14:33 +0000 (10:14 +0100)]
re PR tree-optimization/56350 (ICE in vectorizable_reduction, at tree-vect-loop.c:4731)
PR tree-optimization/56350
* tree-vect-loop.c (vectorizable_reduction): If orig_stmt, return false
if haven't found reduction or nested cycle operand, rather than
asserting we must find it.
re PR target/56214 (FAIL: gcc.c-torture/execute/20050121-1.c compilation, ICE)
PR target/56214
* config/pa/predicates.md (base14_operand): Except for BLKmode, QImode
and HImode, require all displacements to be an integer multiple of the
mode size.
* config/pa/pa.c (pa_legitimate_address_p): For REG+BASE addresses,
only allow QImode and HImode when reload is in progress and strict is
true. Likewise for symbolic addresses. Use base14_operand to check
displacements in REG+BASE addresses.
Richard Biener [Mon, 18 Feb 2013 13:03:15 +0000 (13:03 +0000)]
re PR tree-optimization/56350 (ICE in vectorizable_reduction, at tree-vect-loop.c:4731)
2013-02-18 Richard Biener <rguenther@suse.de>
PR middle-end/56350
* cfghooks.c (merge_blocks): If we merge a latch into another
block adjust references to it.
* cfgloop.c (flow_loops_find): Reset latch before recomputing it.
(verify_loop_structure): Verify that a recorded latch is in fact
a latch.
Add TARGET_SUPPORTS_PIC flag and check that the flag_pic = 2
* config/microblaze/linux.h (TARGET_SUPPORTS_PIC): Define as 1.
* config/microblaze/microblaze.h (TARGET_SUPPORTS_PIC): Define as 1.
* config/microblaze/microblaze.c (microblaze_option_override):
Bail out early for PIC modes when target does not support PIC.
* gcc.dg/20020312-2.c: Define MicroBlaze PIC register
microblaze.c (microblaze_asm_trampoline_template): Replace with a microblaze version.
* config/microblaze/microblaze.c (microblaze_asm_trampoline_template):
Replace with a microblaze version.
(microblaze_trampoline_init): Adapt for microblaze.
* gcc/config/microblaze/microblaze.h (TRAMPOLINE_SIZE): Adapt for
microblaze.
Jakub Jelinek [Sat, 16 Feb 2013 09:32:56 +0000 (10:32 +0100)]
[asan] Fix for PR asan/56330
gcc/
* asan.c (get_mem_refs_of_builtin_call): White space and style
cleanup.
(instrument_mem_region_access): Do not forget to always put
instrumentation of the of 'base' and 'base + len' in a "if (len !=
0) statement, even for cases where either 'base' or 'base + len'
are not instrumented -- because they have been previously
instrumented. Simplify the logic by putting all the statements
instrument 'base + len' inside a sequence, and then insert that
sequence right before the current insertion point. Then, to
instrument 'base + len', just get an iterator on that statement.
And do not forget to update the pointer to iterator the function
received as argument.
gcc/testsuite/
* c-c++-common/asan/no-redundant-instrumentation-4.c: New test file.
* c-c++-common/asan/no-redundant-instrumentation-5.c: Likewise.
* c-c++-common/asan/no-redundant-instrumentation-6.c: Likewise.
* c-c++-common/asan/no-redundant-instrumentation-7.c: Likewise.
* c-c++-common/asan/no-redundant-instrumentation-8.c: Likewise.
* c-c++-common/asan/pr56330.c: Likewise.
* c-c++-common/asan/no-redundant-instrumentation-1.c (test1):
Ensure the size argument of __builtin_memcpy is a constant.
Ian Lance Taylor [Fri, 15 Feb 2013 18:55:09 +0000 (18:55 +0000)]
runtime: Do not reserve huge amount of swap on 32 bit architectures.
The mmap() call which reserves the arena should have MAP_NORESERVE
flag as in typical cases this memory will never be (fully) needed.
This matters in environments which do not do Linux style memory
overcommit, such as OpenIndiana/OpenSolaris/Solaris.
The MAP_NORESERVE flag does not exist on all operating systems
(for example FreeBSD). Therefore we define it to zero value in
case it does not exist.
Alan Modra [Fri, 15 Feb 2013 13:53:40 +0000 (00:23 +1030)]
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.