2013-05-06  Christophe Lyon  <christophe.lyon@linaro.org>

	gcc/
	* config/arm/arm.c (arm_asan_shadow_offset): New function.
	(TARGET_ASAN_SHADOW_OFFSET): Define.
	* config/arm/linux-eabi.h (ASAN_CC1_SPEC): Define.
	(LINUX_OR_ANDROID_CC): Add ASAN_CC1_SPEC.

	libsanitizer/
	* configure.tgt: Add ARM pattern.

	testsuite/
	* lib/target-supports.exp (check_effective_target_hw): New
	function.
	* c-c++-common/asan/clone-test-1.c: Call
	check_effective_target_hw.
	* c-c++-common/asan/rlimit-mmap-test-1.c: Likewise.
	* c-c++-common/asan/heap-overflow-1.c: Update regexps to accept
	possible decorations.
	* c-c++-common/asan/null-deref-1.c: Likewise.
	* c-c++-common/asan/stack-overflow-1.c: Likewise.
	* c-c++-common/asan/strncpy-overflow-1.c: Likewise.
	* c-c++-common/asan/use-after-free-1.c: Likewise.
	* g++.dg/asan/deep-thread-stack-1.C: Likewise.
	* g++.dg/asan/large-func-test-1.C: Likewise.

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

Conflicts:
	gcc/ChangeLog
	gcc/config/arm/linux-eabi.h
	gcc/testsuite/ChangeLog
	libsanitizer/ChangeLog
2013-05-14  Chung-Lin Tang  <cltang@codesourcery.com>

	PR target/42017
	* config/arm/arm.h (EPILOGUE_USES): Only return true
	for LR_REGNUM after epilogue_completed.

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

Conflicts:
	gcc/ChangeLog
Fix PR target/19599 - tailcall function pointers.

2013-05-15  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>

	PR target/19599
	* config/arm/predicates.md (call_insn_operand): New predicate.
	* config/arm/constraints.md ("Cs", "Ss"):  New constraints.
	* config/arm/arm.md (*call_insn, *call_value_insn): Match only
	if insn is not a tail call.
	(*sibcall_insn, *sibcall_value_insn): Adjust for tailcalling through
	registers.
	* config/arm/arm.h (enum reg_class): New caller save register class.
	(REG_CLASS_NAMES): Likewise.
	(REG_CLASS_CONTENTS): Likewise.
	* config/arm/arm.c (arm_function_ok_for_sibcall): Allow tailcalling
	without decls.

2013-05-15  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>

	PR target/19599
	* gcc.target/arm/pr40887.c: Adjust testcase.
	* gcc.target/arm/pr19599.c: New test.

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

Conflicts:
	gcc/ChangeLog
	gcc/testsuite/ChangeLog
Internal memcpy using LDRD/STRD

2013-05-16  Greta Yorsh  <Greta.Yorsh@arm.com>

gcc/

	* config/arm/arm-protos.h (gen_movmem_ldrd_strd): New declaration.
	* config/arm/arm.c (next_consecutive_mem): New function.
	(gen_movmem_ldrd_strd): Likewise.
	* config/arm/arm.md (movmemqi): Update condition and code.
	(unaligned_loaddi, unaligned_storedi): New patterns.

gcc/testsuite

	* gcc.target/arm/unaligned-memcpy-2.c: Adjust expected output.
	* gcc.target/arm/unaligned-memcpy-3.c: Likewise.
	* gcc.target/arm/unaligned-memcpy-4.c: Likewise.

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

Conflicts:
	gcc/ChangeLog
	gcc/testsuite/ChangeLog
Fix breakage with missing decl check for arm-none-eabi builds.

2013-05-16  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>

	PR target/19599
	* config/arm/arm.c (arm_function_ok_for_sibcall): Add check
	for NULL decl.

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

Conflicts:
	gcc/ChangeLog
Fix PR target/57340 and additionally for PR target/19599.

2013-05-22  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>

	PR target/19599
	PR target/57340
	* config/arm/arm.c (any_sibcall_uses_r3): Rename to ..
	(any_sibcall_could_use_r3): this and handle indirect calls.
	(arm_get_frame_offsets): Rename use of any_sibcall_uses_r3.

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

Conflicts:
	gcc/ChangeLog
2013-05-23  Christian Bruel  <christian.bruel@st.com>

        PR debug/57351
        * config/arm/arm.c (arm_dwarf_register_span): Do not use dbx number.

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

Conflicts:
	gcc/ChangeLog
	gcc/testsuite/ChangeLog

Conflicts:
	gcc/testsuite/ChangeLog
This patch is a consolodation of the hash_table patches to the
cxx-conversion branch for files under gcc/config.

Update various hash tables from htab_t to hash_table.
Modify types and calls to match.

* config/arm/arm.c'arm_libcall_uses_aapcs_base::libcall_htab

Fold libcall_eq and libcall_hash into new struct libcall_hasher.

* config/ia64/ia64.c'bundle_state_table

Fold bundle_state_hash and bundle_state_eq_p into new struct
bundle_state_hasher.

* config/mips/mips.c'mips_offset_table

Fold mips_lo_sum_offset_hash and mips_lo_sum_offset_eq into new
struct mips_lo_sum_offset_hasher.

In mips_reorg_process_insns, change call to for_each_rtx to pass
a pointer to the hash_table rather than a htab_t.  This change
requires then dereferencing that pointer in mips_record_lo_sum to
obtain the hash_table.

* config/sol2.c'solaris_comdat_htab

Fold comdat_hash and comdat_eq into new struct comdat_entry_hasher.

* config/i386/winnt.c'i386_pe_section_type_flags::htab

* config/i386/winnt.c'i386_find_on_wrapper_list::wrappers

Fold wrapper_strcmp into new struct wrapped_symbol_hasher.

Tested on x86_64.  Tested with config-list.mk.

Index: gcc/ChangeLog

2013-05-29  Lawrence Crowl  <crowl@google.com>

	* config/arm/t-arm: Update for below.

	* config/arm/arm.c (arm_libcall_uses_aapcs_base::libcall_htab):
	Change type to hash_table.  Update dependent calls and types.

	* config/i386/t-cygming: Update for below.

	* config/i386/t-interix: Update for below.

	* config/i386/winnt.c (i386_pe_section_type_flags::htab):
	Change type to hash_table.  Update dependent calls and types.
	(i386_find_on_wrapper_list::wrappers): Likewise.

	* config/ia64/t-ia64: Update for below.

	* config/ia64/ia64.c (bundle_state_table):
	Change type to hash_table.  Update dependent calls and types.

	* config/mips/mips.c (mips_reorg_process_insns::htab):
	Change type to hash_table.  Update dependent calls and types.

	* config/sol2.c (solaris_comdat_htab):
	Change type to hash_table.  Update dependent calls and types.

	* config/t-sol2: Update for above.

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

Conflicts:
	gcc/ChangeLog
2013-05-30  Zhenqiang Chen  <zhenqiang.chen@linaro.org>

	* config/arm/arm.c (arm_add_cfa_adjust_cfa_note): New added.
	(arm_emit_multi_reg_pop): Add REG_CFA_ADJUST_CFA notes.
	(arm_emit_vfp_multi_reg_pop): Likewise.
	(thumb2_emit_ldrd_pop): Likewise.
	(arm_expand_epilogue): Add misc REG_CFA notes.
	(arm_unwind_emit): Skip REG_CFA_ADJUST_CFA and REG_CFA_RESTORE.

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

Conflicts:
	gcc/ChangeLog
gcc/ChangeLog:
2013-05-30  Bernd Schmidt  <bernds@codesourcery.com>
	    Zhenqiang Chen  <zhenqiang.chen@linaro.org>

	* config/arm/arm-protos.h: Add and update function protos.
	* config/arm/arm.c (use_simple_return_p): New added.
	(thumb2_expand_return): Check simple_return flag.
	* config/arm/arm.md: Add simple_return and conditional simple_return.
	* config/arm/iterators.md: Add iterator for return and simple_return.

gcc/testsuite/ChangeLog:
2013-05-30  Zhenqiang Chen  <zhenqiang.chen@linaro.org>

	* gcc.dg/shrink-wrap-alloca.c: New added.
	* gcc.dg/shrink-wrap-pretend.c: New added.
	* gcc.dg/shrink-wrap-sibcall.c: New added.

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

Conflicts:
	gcc/ChangeLog
	gcc/testsuite/ChangeLog

Conflicts:
	gcc/testsuite/ChangeLog
gcc/
2013-05-31  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>

	PR target/56315
	* config/arm/arm.c (const_ok_for_dimode_op): Handle IOR.
	* config/arm/arm.md (*iordi3_insn): Change to insn_and_split.
	* config/arm/neon.md (iordi3_neon): Remove.
	(neon_vorr<mode>): Generate iordi3 instead of iordi3_neon.
	* config/arm/predicates.md (imm_for_neon_logic_operand):
	Move to earlier in the file.
	(neon_logic_op2): Likewise.
	(arm_iordi_operand_neon): New predicate.

gcc/testsuite/
2013-05-31  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>

	PR target/56315
	* gcc.target/arm/iordi3-opt.c: New test.

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

Conflicts:
	gcc/ChangeLog
	gcc/testsuite/ChangeLog
2013-06-05  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>

	* config/arm/arm.c (MAX_INSN_PER_IT_BLOCK): New macro.
	(arm_option_override): Override arm_restrict_it where appropriate.
	(thumb2_final_prescan_insn): Use MAX_INSN_PER_IT_BLOCK.
	* config/arm/arm.opt (mrestrict-it): New command-line option.
	* doc/invoke.texi: Document -mrestrict-it.

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

Conflicts:
	gcc/ChangeLog
2013-06-05  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>

	* config/arm/arm.md (enabled_for_depr_it): New attribute.
	(predicable_short_it): Likewise.
	(predicated): Likewise.
	(enabled): Handle above.
	(define_cond_exec): Set predicated attribute to yes.

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

Conflicts:
	gcc/ChangeLog
2013-06-06  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>

	* config/arm/sync.md (atomic_loaddi_1):
	Disable predication for arm_restrict_it.
	(arm_load_exclusive<mode>): Likewise.
	(arm_load_exclusivesi): Likewise.
	(arm_load_exclusivedi): Likewise.
	(arm_load_acquire_exclusive<mode>): Likewise.
	(arm_load_acquire_exclusivesi): Likewise.
	(arm_load_acquire_exclusivedi): Likewise.
	(arm_store_exclusive<mode>): Likewise.
	(arm_store_exclusive<mode>): Likewise.
	(arm_store_release_exclusivedi): Likewise.
	(arm_store_release_exclusive<mode>): Likewise.

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

Conflicts:
	gcc/ChangeLog
2013-06-06  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>

	* config/arm/arm-ldmstm.ml: Set "predicable_short_it" to "no"
	where appropriate.
	* config/arm/ldmstm.md: Regenerate.

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

Conflicts:
	gcc/ChangeLog
2013-06-06  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>

	* config/arm/arm-fixed.md (add<mode>3,usadd<mode>3,ssadd<mode>3,
	sub<mode>3, ussub<mode>3, sssub<mode>3, arm_ssatsihi_shift,
	arm_usatsihi): Adjust alternatives for arm_restrict_it.

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

Conflicts:
	gcc/ChangeLog
	* config/arm/arm.c (arm_r3_live_at_start_p): New predicate.
	(arm_compute_static_chain_stack_bytes): Use it.  Tidy up.
	(arm_expand_prologue): Likewise.

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

Conflicts:
	gcc/ChangeLog
2013-06-07  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>

	* config/arm/constraints.md (Df): New constraint.
	* config/arm/arm.md (iordi3_insn): Use Df constraint instead of De.
	Correct length attribute for last two alternatives.

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

Conflicts:
	gcc/ChangeLog
2013-06-07  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>

	* config/arm/arm.md (anddi3_insn): Remove duplicate alternatives.
	Clean up alternatives.

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

Conflicts:
	gcc/ChangeLog
gcc/
2013-06-07  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>

	PR target/56315
	* config/arm/arm.md (*xordi3_insn): Change to insn_and_split.
	(xordi3): Change operand 2 constraint to arm_xordi_operand.
	* config/arm/arm.c (const_ok_for_dimode_op): Handle XOR.
	* config/arm/constraints.md (Dg): New constraint.
	* config/arm/neon.md (xordi3_neon): Remove.
	(neon_veor<mode>): Generate xordi3 instead of xordi3_neon.
	* config/arm/predicates.md (arm_xordi_operand): New predicate.

gcc/testsuite
2013-06-07  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>

	PR target/56315
	* gcc.target/arm/xordi3-opt.c: New test.

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

Conflicts:
	gcc/ChangeLog
	gcc/testsuite/ChangeLog