< prev index next >

src/cpu/x86/vm/c1_CodeStubs_x86.cpp

Print this page




 485   r[0] = src()->as_register();
 486   r[1] = src_pos()->as_register();
 487   r[2] = dst()->as_register();
 488   r[3] = dst_pos()->as_register();
 489   r[4] = length()->as_register();
 490 
 491   // next registers will get stored on the stack
 492   for (int i = 0; i < 5 ; i++ ) {
 493     VMReg r_1 = args[i].first();
 494     if (r_1->is_stack()) {
 495       int st_off = r_1->reg2stack() * wordSize;
 496       __ movptr (Address(rsp, st_off), r[i]);
 497     } else {
 498       assert(r[i] == args[i].first()->as_Register(), "Wrong register for arg ");
 499     }
 500   }
 501 
 502   ce->align_call(lir_static_call);
 503 
 504   ce->emit_static_call_stub();



 505   AddressLiteral resolve(SharedRuntime::get_resolve_static_call_stub(),
 506                          relocInfo::static_call_type);
 507   __ call(resolve);
 508   ce->add_call_info_here(info());
 509 
 510 #ifndef PRODUCT
 511   __ incrementl(ExternalAddress((address)&Runtime1::_arraycopy_slowcase_cnt));
 512 #endif
 513 
 514   __ jmp(_continuation);
 515 }
 516 
 517 /////////////////////////////////////////////////////////////////////////////
 518 #if INCLUDE_ALL_GCS
 519 
 520 void G1PreBarrierStub::emit_code(LIR_Assembler* ce) {
 521   // At this point we know that marking is in progress.
 522   // If do_load() is true then we have to emit the
 523   // load of the previous value; otherwise it has already
 524   // been loaded into _pre_val.




 485   r[0] = src()->as_register();
 486   r[1] = src_pos()->as_register();
 487   r[2] = dst()->as_register();
 488   r[3] = dst_pos()->as_register();
 489   r[4] = length()->as_register();
 490 
 491   // next registers will get stored on the stack
 492   for (int i = 0; i < 5 ; i++ ) {
 493     VMReg r_1 = args[i].first();
 494     if (r_1->is_stack()) {
 495       int st_off = r_1->reg2stack() * wordSize;
 496       __ movptr (Address(rsp, st_off), r[i]);
 497     } else {
 498       assert(r[i] == args[i].first()->as_Register(), "Wrong register for arg ");
 499     }
 500   }
 501 
 502   ce->align_call(lir_static_call);
 503 
 504   ce->emit_static_call_stub();
 505   if (ce->compilation()->bailed_out()) {
 506     return; // CodeCache is full
 507   }
 508   AddressLiteral resolve(SharedRuntime::get_resolve_static_call_stub(),
 509                          relocInfo::static_call_type);
 510   __ call(resolve);
 511   ce->add_call_info_here(info());
 512 
 513 #ifndef PRODUCT
 514   __ incrementl(ExternalAddress((address)&Runtime1::_arraycopy_slowcase_cnt));
 515 #endif
 516 
 517   __ jmp(_continuation);
 518 }
 519 
 520 /////////////////////////////////////////////////////////////////////////////
 521 #if INCLUDE_ALL_GCS
 522 
 523 void G1PreBarrierStub::emit_code(LIR_Assembler* ce) {
 524   // At this point we know that marking is in progress.
 525   // If do_load() is true then we have to emit the
 526   // load of the previous value; otherwise it has already
 527   // been loaded into _pre_val.


< prev index next >