From: David Alan Gilbert Date: Fri, 14 Oct 2011 14:38:42 +0000 (+0000) Subject: re PR target/48126 (arm_output_sync_loop: misplaced memory barrier) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=3e2a46fe397751855594e35cc6ef15b41794e0d9;p=gcc.git re PR target/48126 (arm_output_sync_loop: misplaced memory barrier) gcc/ 2011-10-14 David Alan Gilbert PR target/48126 * config/arm/arm.c (arm_output_sync_loop): Move label before barrier. From-SVN: r179980 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 6a141e527bd..83e5db56bee 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +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. 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