8209697: ARM: Explicit barriers for C1/assembler
authoravoitylov
Mon, 24 Sep 2018 16:54:42 +0300
changeset 51848 54afe70c50b6
parent 51847 34e2180a6d51
child 51849 4010c90156d1
8209697: ARM: Explicit barriers for C1/assembler Reviewed-by: dsamersoff
src/hotspot/cpu/arm/c1_LIRAssembler_arm.cpp
--- a/src/hotspot/cpu/arm/c1_LIRAssembler_arm.cpp	Mon Sep 24 16:52:12 2018 +0300
+++ b/src/hotspot/cpu/arm/c1_LIRAssembler_arm.cpp	Mon Sep 24 16:54:42 2018 +0300
@@ -2764,6 +2764,9 @@
   assert(length == R4, "code assumption");
 #endif // AARCH64
 
+  __ resolve(ACCESS_READ, src);
+  __ resolve(ACCESS_WRITE, dst);
+
   CodeStub* stub = op->stub();
 
   int flags = op->flags();
@@ -3129,6 +3132,7 @@
     __ b(*op->stub()->entry());
   } else if (op->code() == lir_lock) {
     assert(BasicLock::displaced_header_offset_in_bytes() == 0, "lock_reg must point to the displaced header");
+    __ resolve(ACCESS_READ | ACCESS_WRITE, obj);
     int null_check_offset = __ lock_object(hdr, obj, lock, tmp, *op->stub()->entry());
     if (op->info() != NULL) {
       add_debug_info_for_null_check(null_check_offset, op->info());