Commit 916e9b31 by David Daney Committed by David Daney

2009-10-01 David Daney <ddaney@caviumnetworks.com>

	* gcc/config/mips/mips.c (mips_process_sync_loop) Emit syncw
	instructions for TARGET_OCTEON.

From-SVN: r152380
parent 7919373d
2009-10-01 David Daney <ddaney@caviumnetworks.com>
* gcc/config/mips/mips.c (mips_process_sync_loop) Emit syncw
instructions for TARGET_OCTEON.
2009-10-01 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
* config/arm/arm.c (arm_override_options): Turn off
......@@ -11455,7 +11455,22 @@ mips_process_sync_loop (rtx insn, rtx *operands)
/* Output the release side of the memory barrier. */
if (get_attr_sync_release_barrier (insn) == SYNC_RELEASE_BARRIER_YES)
mips_multi_add_insn ("sync", NULL);
{
if (required_oldval == 0 && TARGET_OCTEON)
{
/* Octeon doesn't reorder reads, so a full barrier can be
created by using SYNCW to order writes combined with the
write from the following SC. When the SC successfully
completes, we know that all preceding writes are also
committed to the coherent memory system. It is possible
for a single SYNCW to fail, but a pair of them will never
fail, so we use two. */
mips_multi_add_insn ("syncw", NULL);
mips_multi_add_insn ("syncw", NULL);
}
else
mips_multi_add_insn ("sync", NULL);
}
/* Output the branch-back label. */
mips_multi_add_label ("1:");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment