Commit fdb6272c by Hans-Peter Nilsson Committed by Hans-Peter Nilsson

* config/cris/sync.md ("atomic_fetch_<atomic_op_name><mode>")

	("atomic_compare_and_swap<mode>"): Gate expand_mem_thread_fence
	calls on result of call to need_atomic_barrier_p.

From-SVN: r189500
parent 031831d6
2012-07-16 Hans-Peter Nilsson <hp@axis.com>
* config/cris/sync.md ("atomic_fetch_<atomic_op_name><mode>")
("atomic_compare_and_swap<mode>"): Gate expand_mem_thread_fence
calls on result of call to need_atomic_barrier_p.
2012-07-15 Richard Sandiford <rdsandiford@googlemail.com> 2012-07-15 Richard Sandiford <rdsandiford@googlemail.com>
* config/mips/mips.md (move_type): Replace mfhilo and mthilo * config/mips/mips.md (move_type): Replace mfhilo and mthilo
......
...@@ -93,11 +93,15 @@ ...@@ -93,11 +93,15 @@
if (<MODE>mode != QImode && TARGET_TRAP_UNALIGNED_ATOMIC) if (<MODE>mode != QImode && TARGET_TRAP_UNALIGNED_ATOMIC)
cris_emit_trap_for_misalignment (operands[1]); cris_emit_trap_for_misalignment (operands[1]);
expand_mem_thread_fence (mmodel); if (need_atomic_barrier_p (mmodel, true))
expand_mem_thread_fence (mmodel);
emit_insn (gen_cris_atomic_fetch_<atomic_op_name><mode>_1 (operands[0], emit_insn (gen_cris_atomic_fetch_<atomic_op_name><mode>_1 (operands[0],
operands[1], operands[1],
operands[2])); operands[2]));
expand_mem_thread_fence (mmodel); if (need_atomic_barrier_p (mmodel, false))
expand_mem_thread_fence (mmodel);
DONE; DONE;
}) })
...@@ -196,13 +200,17 @@ ...@@ -196,13 +200,17 @@
if (<MODE>mode != QImode && TARGET_TRAP_UNALIGNED_ATOMIC) if (<MODE>mode != QImode && TARGET_TRAP_UNALIGNED_ATOMIC)
cris_emit_trap_for_misalignment (operands[2]); cris_emit_trap_for_misalignment (operands[2]);
expand_mem_thread_fence (mmodel); if (need_atomic_barrier_p (mmodel, true))
expand_mem_thread_fence (mmodel);
emit_insn (gen_cris_atomic_compare_and_swap<mode>_1 (operands[0], emit_insn (gen_cris_atomic_compare_and_swap<mode>_1 (operands[0],
operands[1], operands[1],
operands[2], operands[2],
operands[3], operands[3],
operands[4])); operands[4]));
expand_mem_thread_fence (mmodel); if (need_atomic_barrier_p (mmodel, false))
expand_mem_thread_fence (mmodel);
DONE; DONE;
}) })
......
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