< prev index next >

src/hotspot/cpu/ppc/gc/shared/barrierSetAssembler_ppc.cpp

Print this page
@@ -25,10 +25,11 @@
  
  #include "asm/macroAssembler.inline.hpp"
  #include "classfile/classLoaderData.hpp"
  #include "gc/shared/barrierSetAssembler.hpp"
  #include "gc/shared/barrierSetNMethod.hpp"
+ #include "gc/shared/barrierSetRuntime.hpp"
  #include "interpreter/interp_masm.hpp"
  #include "oops/compressedOops.hpp"
  #include "runtime/jniHandles.hpp"
  #include "runtime/sharedRuntime.hpp"
  #include "runtime/stubRoutines.hpp"

@@ -53,17 +54,19 @@
    case T_ARRAY:
    case T_OBJECT: {
      if (UseCompressedOops && in_heap) {
        Register co = tmp1;
        if (val == noreg) {
+         assert(!not_null, "inconsistent access");
          __ li(co, 0);
        } else {
          co = not_null ? __ encode_heap_oop_not_null(tmp1, val) : __ encode_heap_oop(tmp1, val);
        }
        __ stw(co, ind_or_offs, base, tmp2);
      } else {
        if (val == noreg) {
+         assert(!not_null, "inconsistent access");
          val = tmp1;
          __ li(val, 0);
        }
        __ std(val, ind_or_offs, base, tmp2);
      }

@@ -111,10 +114,23 @@
    }
    default: Unimplemented();
    }
  }
  
+ void BarrierSetAssembler::flat_field_copy(MacroAssembler* masm, DecoratorSet decorators,
+                                           Register src, Register dst, Register inline_layout_info) {
+   // flat_field_copy implementation is fairly complex, and there are not any
+   // "short-cuts" to be made from asm. What there is, appears to have the same
+   // cost in C++, so just "call_VM_leaf" for now rather than maintain hundreds
+   // of hand-rolled instructions...
+   if (decorators & IS_DEST_UNINITIALIZED) {
+     __ call_VM_leaf(CAST_FROM_FN_PTR(address, BarrierSetRuntime::value_copy_is_dest_uninitialized), src, dst, inline_layout_info);
+   } else {
+     __ call_VM_leaf(CAST_FROM_FN_PTR(address, BarrierSetRuntime::value_copy), src, dst, inline_layout_info);
+   }
+ }
+ 
  // Generic implementation. GCs can provide an optimized one.
  void BarrierSetAssembler::resolve_jobject(MacroAssembler* masm, Register value,
                                            Register tmp1, Register tmp2,
                                            MacroAssembler::PreservationLevel preservation_level) {
    Label done, tagged, weak_tagged, verify;
< prev index next >