]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
backport: re PR target/48126 (arm_output_sync_loop: misplaced memory barrier)
authorJoey Ye <joey.ye@arm.com>
Tue, 19 Jun 2012 03:01:10 +0000 (03:01 +0000)
committerJoey Ye <jye2@gcc.gnu.org>
Tue, 19 Jun 2012 03:01:10 +0000 (03:01 +0000)
2012-06-18  Joey Ye  <joey.ye@arm.com>

Backported from mainline
2011-10-14  David Alan Gilbert  <david.gilbert@linaro.org>

PR target/48126
* config/arm/arm.c (arm_output_sync_loop): Move label before barrier.

From-SVN: r188766

gcc/ChangeLog
gcc/config/arm/arm.c

index 943fcd5a84dc1c298672ed02ad40431d95e1c273..6a30d39d8d5a825cf258ce923aab3e2e165bcb83 100644 (file)
@@ -1,3 +1,11 @@
+2012-06-18  Joey Ye  <joey.ye@arm.com>
+
+       Backported from mainline
+       2011-10-14  David Alan Gilbert  <david.gilbert@linaro.org>
+
+       PR target/48126
+       * config/arm/arm.c (arm_output_sync_loop): Move label before barrier.
+
 2012-06-17  Uros Bizjak  <ubizjak@gmail.com>
 
        Backport from mainline:
index a5edf04b9ed6f6bbd3b2361ecd51515ca78f4e0c..db2d723ba976747b57a986853fb44c2538f12397 100644 (file)
@@ -23423,8 +23423,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