hotspot/src/cpu/x86/vm/c1_CodeStubs_x86.cpp
changeset 1394 43b4b8b54e65
parent 1066 717c3345024f
parent 1374 4c24294029a9
child 1412 2bb3fe3e00ea
equal deleted inserted replaced
1112:6d909d5803e3 1394:43b4b8b54e65
   454 #endif
   454 #endif
   455 
   455 
   456   __ jmp(_continuation);
   456   __ jmp(_continuation);
   457 }
   457 }
   458 
   458 
       
   459 /////////////////////////////////////////////////////////////////////////////
       
   460 #ifndef SERIALGC
       
   461 
       
   462 void G1PreBarrierStub::emit_code(LIR_Assembler* ce) {
       
   463 
       
   464   // At this point we know that marking is in progress
       
   465 
       
   466   __ bind(_entry);
       
   467   assert(pre_val()->is_register(), "Precondition.");
       
   468 
       
   469   Register pre_val_reg = pre_val()->as_register();
       
   470 
       
   471   ce->mem2reg(addr(), pre_val(), T_OBJECT, patch_code(), info(), false);
       
   472 
       
   473   __ cmpptr(pre_val_reg, (int32_t) NULL_WORD);
       
   474   __ jcc(Assembler::equal, _continuation);
       
   475   ce->store_parameter(pre_val()->as_register(), 0);
       
   476   __ call(RuntimeAddress(Runtime1::entry_for(Runtime1::g1_pre_barrier_slow_id)));
       
   477   __ jmp(_continuation);
       
   478 
       
   479 }
       
   480 
       
   481 jbyte* G1PostBarrierStub::_byte_map_base = NULL;
       
   482 
       
   483 jbyte* G1PostBarrierStub::byte_map_base_slow() {
       
   484   BarrierSet* bs = Universe::heap()->barrier_set();
       
   485   assert(bs->is_a(BarrierSet::G1SATBCTLogging),
       
   486          "Must be if we're using this.");
       
   487   return ((G1SATBCardTableModRefBS*)bs)->byte_map_base;
       
   488 }
       
   489 
       
   490 void G1PostBarrierStub::emit_code(LIR_Assembler* ce) {
       
   491   __ bind(_entry);
       
   492   assert(addr()->is_register(), "Precondition.");
       
   493   assert(new_val()->is_register(), "Precondition.");
       
   494   Register new_val_reg = new_val()->as_register();
       
   495   __ cmpptr(new_val_reg, (int32_t) NULL_WORD);
       
   496   __ jcc(Assembler::equal, _continuation);
       
   497   ce->store_parameter(addr()->as_register(), 0);
       
   498   __ call(RuntimeAddress(Runtime1::entry_for(Runtime1::g1_post_barrier_slow_id)));
       
   499   __ jmp(_continuation);
       
   500 }
       
   501 
       
   502 #endif // SERIALGC
       
   503 /////////////////////////////////////////////////////////////////////////////
   459 
   504 
   460 #undef __
   505 #undef __