Make sure arch-specific barriers are properly scoped epsilon-gc-branch
authorshade
Thu, 08 Feb 2018 21:05:35 +0100
branchepsilon-gc-branch
changeset 56096 ab47ddc3f427
parent 56095 97689d6b0494
child 56276 ee5e58456be5
Make sure arch-specific barriers are properly scoped
src/hotspot/cpu/arm/templateTable_arm.cpp
src/hotspot/cpu/s390/templateTable_s390.cpp
src/hotspot/cpu/sparc/templateTable_sparc.cpp
--- a/src/hotspot/cpu/arm/templateTable_arm.cpp	Thu Feb 08 20:56:03 2018 +0100
+++ b/src/hotspot/cpu/arm/templateTable_arm.cpp	Thu Feb 08 21:05:35 2018 +0100
@@ -245,11 +245,13 @@
       }
       break;
     case BarrierSet::Epsilon:
-      if (is_null) {
-        __ store_heap_oop_null(new_val, obj);
-      } else {
-        __ store_heap_oop(new_val, obj); // blows new_val:
-        new_val = noreg;
+      {
+        if (is_null) {
+          __ store_heap_oop_null(new_val, obj);
+        } else {
+          __ store_heap_oop(new_val, obj); // blows new_val:
+          new_val = noreg;
+        }
       }
       break;
     case BarrierSet::ModRef:
--- a/src/hotspot/cpu/s390/templateTable_s390.cpp	Thu Feb 08 20:56:03 2018 +0100
+++ b/src/hotspot/cpu/s390/templateTable_s390.cpp	Thu Feb 08 21:05:35 2018 +0100
@@ -276,10 +276,12 @@
     }
     break;
   case BarrierSet::Epsilon:
-    if (val_is_null) {
-      __ store_heap_oop_null(val, offset, base);
-    } else {
-      __ store_heap_oop(val, offset, base);
+    {
+      if (val_is_null) {
+        __ store_heap_oop_null(val, offset, base);
+      } else {
+        __ store_heap_oop(val, offset, base);
+      }
     }
     break;
   case BarrierSet::ModRef:
--- a/src/hotspot/cpu/sparc/templateTable_sparc.cpp	Thu Feb 08 20:56:03 2018 +0100
+++ b/src/hotspot/cpu/sparc/templateTable_sparc.cpp	Thu Feb 08 21:05:35 2018 +0100
@@ -113,11 +113,13 @@
       }
       break;
     case BarrierSet::Epsilon:
-      if (index == noreg) {
-        assert(Assembler::is_simm13(offset), "fix this code");
-        __ store_heap_oop(val, base, offset);
-      } else {
-        __ store_heap_oop(val, base, index);
+      {
+        if (index == noreg) {
+          assert(Assembler::is_simm13(offset), "fix this code");
+          __ store_heap_oop(val, base, offset);
+        } else {
+          __ store_heap_oop(val, base, index);
+        }
       }
       break;
     case BarrierSet::ModRef: