From a15b4a3c5dce9d98a9ddbca764a998e6c12e60cb Mon Sep 17 00:00:00 2001 From: rth Date: Wed, 3 Sep 2008 20:15:27 +0000 Subject: [PATCH] * 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@139950 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 6 ++++++ 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 + + * 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 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 -- 2.7.4