501 }
502
503 ce->align_call(lir_static_call);
504
505 ce->emit_static_call_stub();
506 if (ce->compilation()->bailed_out()) {
507 return; // CodeCache is full
508 }
509 AddressLiteral resolve(SharedRuntime::get_resolve_static_call_stub(),
510 relocInfo::static_call_type);
511 __ call(resolve);
512 ce->add_call_info_here(info());
513
514 #ifndef PRODUCT
515 __ incrementl(ExternalAddress((address)&Runtime1::_arraycopy_slowcase_cnt));
516 #endif
517
518 __ jmp(_continuation);
519 }
520
521 /////////////////////////////////////////////////////////////////////////////
522 #if INCLUDE_ALL_GCS
523
524 void G1PreBarrierStub::emit_code(LIR_Assembler* ce) {
525 // At this point we know that marking is in progress.
526 // If do_load() is true then we have to emit the
527 // load of the previous value; otherwise it has already
528 // been loaded into _pre_val.
529
530 __ bind(_entry);
531 assert(pre_val()->is_register(), "Precondition.");
532
533 Register pre_val_reg = pre_val()->as_register();
534
535 if (do_load()) {
536 ce->mem2reg(addr(), pre_val(), T_OBJECT, patch_code(), info(), false /*wide*/, false /*unaligned*/);
537 }
538
539 __ cmpptr(pre_val_reg, (int32_t) NULL_WORD);
540 __ jcc(Assembler::equal, _continuation);
|
501 }
502
503 ce->align_call(lir_static_call);
504
505 ce->emit_static_call_stub();
506 if (ce->compilation()->bailed_out()) {
507 return; // CodeCache is full
508 }
509 AddressLiteral resolve(SharedRuntime::get_resolve_static_call_stub(),
510 relocInfo::static_call_type);
511 __ call(resolve);
512 ce->add_call_info_here(info());
513
514 #ifndef PRODUCT
515 __ incrementl(ExternalAddress((address)&Runtime1::_arraycopy_slowcase_cnt));
516 #endif
517
518 __ jmp(_continuation);
519 }
520
521 void C1ThreadLocalSafepoint::emit_code(LIR_Assembler* ce) {
522 #ifdef _LP64
523 __ bind(_entry);
524 InternalAddress pc_addr(safepoint_pc());
525 __ lea(rscratch1, pc_addr);
526 __ movptr(Address(r15_thread, JavaThread::saved_exception_pc_offset()), rscratch1);
527
528 address stub;
529
530 if (is_return()) {
531 assert(SharedRuntime::polling_page_return_handler_blob() != NULL,
532 "polling page return stub not created yet");
533 stub = SharedRuntime::polling_page_return_handler_blob()->entry_point();
534 } else {
535 assert(SharedRuntime::polling_page_safepoint_handler_blob() != NULL,
536 "polling page safepoint stub not created yet");
537 stub = SharedRuntime::polling_page_safepoint_handler_blob()->entry_point();
538 }
539
540 RuntimeAddress callback_addr(stub);
541
542 __ jump(callback_addr);
543 #else
544 ShouldNotReachHere();
545 #endif /* _LP64 */
546 }
547
548 /////////////////////////////////////////////////////////////////////////////
549 #if INCLUDE_ALL_GCS
550
551 void G1PreBarrierStub::emit_code(LIR_Assembler* ce) {
552 // At this point we know that marking is in progress.
553 // If do_load() is true then we have to emit the
554 // load of the previous value; otherwise it has already
555 // been loaded into _pre_val.
556
557 __ bind(_entry);
558 assert(pre_val()->is_register(), "Precondition.");
559
560 Register pre_val_reg = pre_val()->as_register();
561
562 if (do_load()) {
563 ce->mem2reg(addr(), pre_val(), T_OBJECT, patch_code(), info(), false /*wide*/, false /*unaligned*/);
564 }
565
566 __ cmpptr(pre_val_reg, (int32_t) NULL_WORD);
567 __ jcc(Assembler::equal, _continuation);
|