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