< prev index next >

src/hotspot/cpu/ppc/c1_CodeStubs_ppc.cpp

Print this page

439   __ add_const_optimized(R0, R29_TOC, MacroAssembler::offset_to_global_toc(stub));
440   __ mtctr(R0);
441 
442   __ load_const_optimized(R0, _trap_request); // Pass trap request in R0.
443   __ bctrl();
444   ce->add_call_info_here(_info);
445   debug_only(__ illtrap());
446 }
447 
448 
449 void ArrayCopyStub::emit_code(LIR_Assembler* ce) {
450   //---------------slow case: call to native-----------------
451   __ bind(_entry);
452   __ mr(R3_ARG1, src()->as_register());
453   __ extsw(R4_ARG2, src_pos()->as_register());
454   __ mr(R5_ARG3, dst()->as_register());
455   __ extsw(R6_ARG4, dst_pos()->as_register());
456   __ extsw(R7_ARG5, length()->as_register());
457 
458   ce->emit_static_call_stub();



459 
460   bool success = ce->emit_trampoline_stub_for_call(SharedRuntime::get_resolve_static_call_stub());
461   if (!success) { return; }
462 
463   __ relocate(relocInfo::static_call_type);
464   // Note: At this point we do not have the address of the trampoline
465   // stub, and the entry point might be too far away for bl, so __ pc()
466   // serves as dummy and the bl will be patched later.
467   __ code()->set_insts_mark();
468   __ bl(__ pc());
469   ce->add_call_info_here(info());
470   ce->verify_oop_map(info());
471 
472 #ifndef PRODUCT
473   if (PrintC1Statistics) {
474     const address counter = (address)&Runtime1::_arraycopy_slowcase_cnt;
475     const Register tmp = R3, tmp2 = R4;
476     int simm16_offs = __ load_const_optimized(tmp, counter, tmp2, true);
477     __ lwz(tmp2, simm16_offs, tmp);
478     __ addi(tmp2, tmp2, 1);

439   __ add_const_optimized(R0, R29_TOC, MacroAssembler::offset_to_global_toc(stub));
440   __ mtctr(R0);
441 
442   __ load_const_optimized(R0, _trap_request); // Pass trap request in R0.
443   __ bctrl();
444   ce->add_call_info_here(_info);
445   debug_only(__ illtrap());
446 }
447 
448 
449 void ArrayCopyStub::emit_code(LIR_Assembler* ce) {
450   //---------------slow case: call to native-----------------
451   __ bind(_entry);
452   __ mr(R3_ARG1, src()->as_register());
453   __ extsw(R4_ARG2, src_pos()->as_register());
454   __ mr(R5_ARG3, dst()->as_register());
455   __ extsw(R6_ARG4, dst_pos()->as_register());
456   __ extsw(R7_ARG5, length()->as_register());
457 
458   ce->emit_static_call_stub();
459   if (ce->compilation()->bailed_out()) {
460     return; // CodeCache is full
461   }
462 
463   bool success = ce->emit_trampoline_stub_for_call(SharedRuntime::get_resolve_static_call_stub());
464   if (!success) { return; }
465 
466   __ relocate(relocInfo::static_call_type);
467   // Note: At this point we do not have the address of the trampoline
468   // stub, and the entry point might be too far away for bl, so __ pc()
469   // serves as dummy and the bl will be patched later.
470   __ code()->set_insts_mark();
471   __ bl(__ pc());
472   ce->add_call_info_here(info());
473   ce->verify_oop_map(info());
474 
475 #ifndef PRODUCT
476   if (PrintC1Statistics) {
477     const address counter = (address)&Runtime1::_arraycopy_slowcase_cnt;
478     const Register tmp = R3, tmp2 = R4;
479     int simm16_offs = __ load_const_optimized(tmp, counter, tmp2, true);
480     __ lwz(tmp2, simm16_offs, tmp);
481     __ addi(tmp2, tmp2, 1);
< prev index next >