< prev index next >

src/hotspot/cpu/x86/gc/shared/barrierSetAssembler_x86.cpp

Print this page
@@ -21,14 +21,16 @@
   * questions.
   *
   */
  
  #include "precompiled.hpp"
+ #include "asm/macroAssembler.inline.hpp"
  #include "classfile/classLoaderData.hpp"
  #include "gc/shared/barrierSet.hpp"
  #include "gc/shared/barrierSetAssembler.hpp"
  #include "gc/shared/barrierSetNMethod.hpp"
+ #include "gc/shared/barrierSetRuntime.hpp"
  #include "gc/shared/collectedHeap.hpp"
  #include "interpreter/interp_masm.hpp"
  #include "memory/universe.hpp"
  #include "runtime/jniHandles.hpp"
  #include "runtime/sharedRuntime.hpp"

@@ -42,10 +44,11 @@
    bool in_heap = (decorators & IN_HEAP) != 0;
    bool in_native = (decorators & IN_NATIVE) != 0;
    bool is_not_null = (decorators & IS_NOT_NULL) != 0;
    bool atomic = (decorators & MO_RELAXED) != 0;
  
+   assert(type != T_INLINE_TYPE, "Not supported yet");
    switch (type) {
    case T_OBJECT:
    case T_ARRAY: {
      if (in_heap) {
  #ifdef _LP64

@@ -101,16 +104,17 @@
    default: Unimplemented();
    }
  }
  
  void BarrierSetAssembler::store_at(MacroAssembler* masm, DecoratorSet decorators, BasicType type,
-                                    Address dst, Register val, Register tmp1, Register tmp2) {
+                                    Address dst, Register val, Register tmp1, Register tmp2, Register tmp3) {
    bool in_heap = (decorators & IN_HEAP) != 0;
    bool in_native = (decorators & IN_NATIVE) != 0;
    bool is_not_null = (decorators & IS_NOT_NULL) != 0;
    bool atomic = (decorators & MO_RELAXED) != 0;
  
+   assert(type != T_INLINE_TYPE, "Not supported yet");
    switch (type) {
    case T_OBJECT:
    case T_ARRAY: {
      if (in_heap) {
        if (val == noreg) {

@@ -193,10 +197,23 @@
      break;
    default: Unimplemented();
    }
  }
  
+ void BarrierSetAssembler::value_copy(MacroAssembler* masm, DecoratorSet decorators,
+                                      Register src, Register dst, Register value_klass) {
+   // value_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, value_klass);
+   } else {
+     __ call_VM_leaf(CAST_FROM_FN_PTR(address, BarrierSetRuntime::value_copy), src, dst, value_klass);
+   }
+ }
+ 
  void BarrierSetAssembler::try_resolve_jobject_in_native(MacroAssembler* masm, Register jni_env,
                                                          Register obj, Register tmp, Label& slowpath) {
    __ clear_jweak_tag(obj);
    __ movptr(obj, Address(obj, 0));
  }
< prev index next >