hotspot/src/cpu/x86/vm/assembler_x86.cpp
changeset 3262 30d1c247fc25
parent 2862 fad636edf18f
child 3598 bfff77083467
equal deleted inserted replaced
3192:607a56c8880f 3262:30d1c247fc25
  6803     cmpb(in_progress, 0);
  6803     cmpb(in_progress, 0);
  6804   }
  6804   }
  6805   jcc(Assembler::equal, done);
  6805   jcc(Assembler::equal, done);
  6806 
  6806 
  6807   // if (x.f == NULL) goto done;
  6807   // if (x.f == NULL) goto done;
  6808   cmpptr(Address(obj, 0), NULL_WORD);
  6808 #ifdef _LP64
       
  6809   load_heap_oop(tmp2, Address(obj, 0));
       
  6810 #else
       
  6811   movptr(tmp2, Address(obj, 0));
       
  6812 #endif
       
  6813   cmpptr(tmp2, (int32_t) NULL_WORD);
  6809   jcc(Assembler::equal, done);
  6814   jcc(Assembler::equal, done);
  6810 
  6815 
  6811   // Can we store original value in the thread's buffer?
  6816   // Can we store original value in the thread's buffer?
  6812 
  6817 
  6813   LP64_ONLY(movslq(tmp, index);)
       
  6814   movptr(tmp2, Address(obj, 0));
       
  6815 #ifdef _LP64
  6818 #ifdef _LP64
       
  6819   movslq(tmp, index);
  6816   cmpq(tmp, 0);
  6820   cmpq(tmp, 0);
  6817 #else
  6821 #else
  6818   cmpl(index, 0);
  6822   cmpl(index, 0);
  6819 #endif
  6823 #endif
  6820   jcc(Assembler::equal, runtime);
  6824   jcc(Assembler::equal, runtime);
  6832   bind(runtime);
  6836   bind(runtime);
  6833   // save the live input values
  6837   // save the live input values
  6834   if(tosca_live) push(rax);
  6838   if(tosca_live) push(rax);
  6835   push(obj);
  6839   push(obj);
  6836 #ifdef _LP64
  6840 #ifdef _LP64
  6837   movq(c_rarg0, Address(obj, 0));
  6841   call_VM_leaf(CAST_FROM_FN_PTR(address, SharedRuntime::g1_wb_pre), tmp2, r15_thread);
  6838   call_VM_leaf(CAST_FROM_FN_PTR(address, SharedRuntime::g1_wb_pre), c_rarg0, r15_thread);
       
  6839 #else
  6842 #else
  6840   push(thread);
  6843   push(thread);
  6841   call_VM_leaf(CAST_FROM_FN_PTR(address, SharedRuntime::g1_wb_pre), tmp2, thread);
  6844   call_VM_leaf(CAST_FROM_FN_PTR(address, SharedRuntime::g1_wb_pre), tmp2, thread);
  6842   pop(thread);
  6845   pop(thread);
  6843 #endif
  6846 #endif