re PR target/42869 (GOMP_critical_start wrong on Itanium due to __sync miscompilation)

2010-07-21  Steve Ellcey  <sje@cup.hp.com>

        PR target/42869
        * config/ia64/sync.md (sync_compare_and_swap): Move memory fence.

From-SVN: r162387
This commit is contained in:
Steve Ellcey 2010-07-21 22:37:53 +00:00 committed by Steve Ellcey
parent e3a8dd06bb
commit 7fd1b3f8ce
2 changed files with 7 additions and 1 deletions

View File

@ -1,3 +1,9 @@
2010-07-21 Steve Ellcey <sje@cup.hp.com>
Backport from mainline:
PR target/42869
* config/ia64/sync.md (sync_compare_and_swap): Move memory fence.
2010-07-15 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
Backport from mainline:

View File

@ -135,8 +135,8 @@
if (GET_MODE (dst) != DImode)
dst = gen_reg_rtx (DImode);
emit_insn (gen_memory_barrier ());
emit_insn (gen_cmpxchg_rel_<mode> (dst, operands[1], ccv, operands[3]));
emit_insn (gen_memory_barrier ());
if (dst != operands[0])
emit_move_insn (operands[0], gen_lowpart (<MODE>mode, dst));