< prev index next >

src/cpu/x86/vm/macroAssembler_x86.cpp

Print this page
rev 12652 : [mq]: kimpatch
rev 12655 : [mq]: kim-review


5142   movptr(value, Address(value, -JNIHandles::weak_tag_value));
5143   verify_oop(value);
5144 #if INCLUDE_ALL_GCS
5145   if (UseG1GC) {
5146     g1_write_barrier_pre(noreg /* obj */,
5147                          value /* pre_val */,
5148                          thread /* thread */,
5149                          tmp /* tmp */,
5150                          true /* tosca_live */,
5151                          true /* expand_call */);
5152   }
5153 #endif // INCLUDE_ALL_GCS
5154   jmp(done);
5155   bind(not_weak);
5156   // Resolve (untagged) jobject.
5157   movptr(value, Address(value, 0));
5158   verify_oop(value);
5159   bind(done);
5160 }
5161 







5162 //////////////////////////////////////////////////////////////////////////////////
5163 #if INCLUDE_ALL_GCS
5164 
5165 void MacroAssembler::g1_write_barrier_pre(Register obj,
5166                                           Register pre_val,
5167                                           Register thread,
5168                                           Register tmp,
5169                                           bool tosca_live,
5170                                           bool expand_call) {
5171 
5172   // If expand_call is true then we expand the call_VM_leaf macro
5173   // directly to skip generating the check by
5174   // InterpreterMacroAssembler::call_VM_leaf_base that checks _last_sp.
5175 
5176 #ifdef _LP64
5177   assert(thread == r15_thread, "must be");
5178 #endif // _LP64
5179 
5180   Label done;
5181   Label runtime;




5142   movptr(value, Address(value, -JNIHandles::weak_tag_value));
5143   verify_oop(value);
5144 #if INCLUDE_ALL_GCS
5145   if (UseG1GC) {
5146     g1_write_barrier_pre(noreg /* obj */,
5147                          value /* pre_val */,
5148                          thread /* thread */,
5149                          tmp /* tmp */,
5150                          true /* tosca_live */,
5151                          true /* expand_call */);
5152   }
5153 #endif // INCLUDE_ALL_GCS
5154   jmp(done);
5155   bind(not_weak);
5156   // Resolve (untagged) jobject.
5157   movptr(value, Address(value, 0));
5158   verify_oop(value);
5159   bind(done);
5160 }
5161 
5162 void MacroAssembler::clear_jweak_tag(Register possibly_jweak) {
5163   const int32_t inverted_jweak_mask = ~static_cast<int32_t>(JNIHandles::weak_tag_mask);
5164   STATIC_ASSERT(inverted_jweak_mask == -2); // otherwise check this code
5165   // The inverted mask is sign-extended
5166   andptr(possibly_jweak, inverted_jweak_mask);
5167 }
5168 
5169 //////////////////////////////////////////////////////////////////////////////////
5170 #if INCLUDE_ALL_GCS
5171 
5172 void MacroAssembler::g1_write_barrier_pre(Register obj,
5173                                           Register pre_val,
5174                                           Register thread,
5175                                           Register tmp,
5176                                           bool tosca_live,
5177                                           bool expand_call) {
5178 
5179   // If expand_call is true then we expand the call_VM_leaf macro
5180   // directly to skip generating the check by
5181   // InterpreterMacroAssembler::call_VM_leaf_base that checks _last_sp.
5182 
5183 #ifdef _LP64
5184   assert(thread == r15_thread, "must be");
5185 #endif // _LP64
5186 
5187   Label done;
5188   Label runtime;


< prev index next >