diff options
author | Richard Henderson <rth@redhat.com> | 2008-09-03 13:15:27 -0700 |
---|---|---|
committer | Richard Henderson <rth@gcc.gnu.org> | 2008-09-03 13:15:27 -0700 |
commit | 27738602d5c08a8725ef63e43899bc6bfb4eab3c (patch) | |
tree | 022b78777d9e0e53c2e59c7d77769cb1fa21caa0 | |
parent | a7f32992e310ba052e04f24dfb8a54a4bc59c35b (diff) | |
download | gcc-27738602d5c08a8725ef63e43899bc6bfb4eab3c.zip gcc-27738602d5c08a8725ef63e43899bc6bfb4eab3c.tar.gz gcc-27738602d5c08a8725ef63e43899bc6bfb4eab3c.tar.bz2 |
alpha.c (alpha_split_lock_test_and_set): Move memory barrier to below the test-and-set.
* config/alpha/alpha.c (alpha_split_lock_test_and_set): Move
memory barrier to below the test-and-set.
(alpha_split_lock_test_and_set_12): Likewise.
From-SVN: r139950
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/config/alpha/alpha.c | 7 |
2 files changed, 10 insertions, 3 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 87e5fcc..60a17b2 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2008-09-03 Richard Henderson <rth@redhat.com> + + * config/alpha/alpha.c (alpha_split_lock_test_and_set): Move + memory barrier to below the test-and-set. + (alpha_split_lock_test_and_set_12): Likewise. + 2008-09-03 Vladimir Makarov <vmakarov@redhat.com> PR rtl-opt/37243 diff --git a/gcc/config/alpha/alpha.c b/gcc/config/alpha/alpha.c index a4d3bf1..3d546be 100644 --- a/gcc/config/alpha/alpha.c +++ b/gcc/config/alpha/alpha.c @@ -4600,8 +4600,6 @@ alpha_split_lock_test_and_set (rtx retval, rtx mem, rtx val, rtx scratch) enum machine_mode mode = GET_MODE (mem); rtx label, x, cond = gen_lowpart (DImode, scratch); - emit_insn (gen_memory_barrier ()); - label = gen_rtx_LABEL_REF (DImode, gen_label_rtx ()); emit_label (XEXP (label, 0)); @@ -4611,6 +4609,8 @@ alpha_split_lock_test_and_set (rtx retval, rtx mem, rtx val, rtx scratch) x = gen_rtx_EQ (DImode, cond, const0_rtx); emit_unlikely_jump (x, label); + + emit_insn (gen_memory_barrier ()); } void @@ -4649,7 +4649,6 @@ alpha_split_lock_test_and_set_12 (enum machine_mode mode, rtx dest, rtx addr, mem = gen_rtx_MEM (DImode, align); MEM_VOLATILE_P (mem) = 1; - emit_insn (gen_memory_barrier ()); label = gen_rtx_LABEL_REF (DImode, gen_label_rtx ()); emit_label (XEXP (label, 0)); @@ -4673,6 +4672,8 @@ alpha_split_lock_test_and_set_12 (enum machine_mode mode, rtx dest, rtx addr, x = gen_rtx_EQ (DImode, scratch, const0_rtx); emit_unlikely_jump (x, label); + + emit_insn (gen_memory_barrier ()); } /* Adjust the cost of a scheduling dependency. Return the new cost of |