From b3902c959fc7f80947ca0970877b625345bd6fd0 Mon Sep 17 00:00:00 2001 From: rsandifo Date: Fri, 14 Oct 2011 14:38:42 +0000 Subject: [PATCH] gcc/ 2011-10-14 David Alan Gilbert PR target/48126 * config/arm/arm.c (arm_output_sync_loop): Move label before barrier. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@179980 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 5 +++++ gcc/config/arm/arm.c | 5 ++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 6a141e527bd..83e5db56bee 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,10 @@ 2011-10-14 David Alan Gilbert + PR target/48126 + * config/arm/arm.c (arm_output_sync_loop): Move label before barrier. + +2011-10-14 David Alan Gilbert + * config/arm/arm.h (TARGET_HAVE_DMB_MCR): MCR Not available in Thumb1. 2011-10-14 Paolo Carlini diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c index ad733dad1d0..93386f036d3 100644 --- a/gcc/config/arm/arm.c +++ b/gcc/config/arm/arm.c @@ -24217,8 +24217,11 @@ arm_output_sync_loop (emit_f emit, } } - arm_process_output_memory_barrier (emit, NULL); + /* Note: label is before barrier so that in cmp failure case we still get + a barrier to stop subsequent loads floating upwards past the ldrex + PR target/48126. */ arm_output_asm_insn (emit, 1, operands, "%sLSYB%%=:", LOCAL_LABEL_PREFIX); + arm_process_output_memory_barrier (emit, NULL); } static rtx -- 2.11.0