447
448 ce->align_call(lir_static_call);
449
450 ce->emit_static_call_stub();
451 AddressLiteral resolve(SharedRuntime::get_resolve_static_call_stub(),
452 relocInfo::static_call_type);
453 __ call(resolve);
454 ce->add_call_info_here(info());
455
456 #ifndef PRODUCT
457 __ incrementl(ExternalAddress((address)&Runtime1::_arraycopy_slowcase_cnt));
458 #endif
459
460 __ jmp(_continuation);
461 }
462
463 /////////////////////////////////////////////////////////////////////////////
464 #ifndef SERIALGC
465
466 void G1PreBarrierStub::emit_code(LIR_Assembler* ce) {
467
468 // At this point we know that marking is in progress
469
470 __ bind(_entry);
471 assert(pre_val()->is_register(), "Precondition.");
472
473 Register pre_val_reg = pre_val()->as_register();
474
475 ce->mem2reg(addr(), pre_val(), T_OBJECT, patch_code(), info(), false /*wide*/, false /*unaligned*/);
476
477 __ cmpptr(pre_val_reg, (int32_t) NULL_WORD);
478 __ jcc(Assembler::equal, _continuation);
479 ce->store_parameter(pre_val()->as_register(), 0);
480 __ call(RuntimeAddress(Runtime1::entry_for(Runtime1::g1_pre_barrier_slow_id)));
481 __ jmp(_continuation);
482
483 }
484
485 jbyte* G1PostBarrierStub::_byte_map_base = NULL;
486
487 jbyte* G1PostBarrierStub::byte_map_base_slow() {
488 BarrierSet* bs = Universe::heap()->barrier_set();
489 assert(bs->is_a(BarrierSet::G1SATBCTLogging),
490 "Must be if we're using this.");
491 return ((G1SATBCardTableModRefBS*)bs)->byte_map_base;
492 }
493
494 void G1PostBarrierStub::emit_code(LIR_Assembler* ce) {
495 __ bind(_entry);
|
447
448 ce->align_call(lir_static_call);
449
450 ce->emit_static_call_stub();
451 AddressLiteral resolve(SharedRuntime::get_resolve_static_call_stub(),
452 relocInfo::static_call_type);
453 __ call(resolve);
454 ce->add_call_info_here(info());
455
456 #ifndef PRODUCT
457 __ incrementl(ExternalAddress((address)&Runtime1::_arraycopy_slowcase_cnt));
458 #endif
459
460 __ jmp(_continuation);
461 }
462
463 /////////////////////////////////////////////////////////////////////////////
464 #ifndef SERIALGC
465
466 void G1PreBarrierStub::emit_code(LIR_Assembler* ce) {
467 // At this point we know that marking is in progress.
468 // If do_load() is true then we have to emit the
469 // load of the previous value; otherwise it has already
470 // been loaded into _pre_val.
471
472 __ bind(_entry);
473 assert(pre_val()->is_register(), "Precondition.");
474
475 Register pre_val_reg = pre_val()->as_register();
476
477 if (do_load()) {
478 ce->mem2reg(addr(), pre_val(), T_OBJECT, patch_code(), info(), false /*wide*/, false /*unaligned*/);
479 }
480
481 __ cmpptr(pre_val_reg, (int32_t) NULL_WORD);
482 __ jcc(Assembler::equal, _continuation);
483 ce->store_parameter(pre_val()->as_register(), 0);
484 __ call(RuntimeAddress(Runtime1::entry_for(Runtime1::g1_pre_barrier_slow_id)));
485 __ jmp(_continuation);
486
487 }
488
489 jbyte* G1PostBarrierStub::_byte_map_base = NULL;
490
491 jbyte* G1PostBarrierStub::byte_map_base_slow() {
492 BarrierSet* bs = Universe::heap()->barrier_set();
493 assert(bs->is_a(BarrierSet::G1SATBCTLogging),
494 "Must be if we're using this.");
495 return ((G1SATBCardTableModRefBS*)bs)->byte_map_base;
496 }
497
498 void G1PostBarrierStub::emit_code(LIR_Assembler* ce) {
499 __ bind(_entry);
|