214 _result = result;
215 _info = new CodeEmitInfo(info);
216 }
217
218 void NewTypeArrayStub::emit_code(LIR_Assembler* ce) {
219 __ bind(_entry);
220
221 address entry = Runtime1::entry_for(StubId::c1_new_type_array_id);
222 //__ load_const_optimized(R0, entry);
223 __ add_const_optimized(R0, R29_TOC, MacroAssembler::offset_to_global_toc(entry));
224 __ mr_if_needed(/*op->tmp1()->as_register()*/ R5_ARG3, _length->as_register()); // already sign-extended
225 __ mtctr(R0);
226 __ bctrl();
227 ce->add_call_info_here(_info);
228 ce->verify_oop_map(_info);
229 __ b(_continuation);
230 }
231
232
233 // Implementation of NewObjectArrayStub
234 NewObjectArrayStub::NewObjectArrayStub(LIR_Opr klass_reg, LIR_Opr length, LIR_Opr result, CodeEmitInfo* info) {
235 _klass_reg = klass_reg;
236 _length = length;
237 _result = result;
238 _info = new CodeEmitInfo(info);
239 }
240
241 void NewObjectArrayStub::emit_code(LIR_Assembler* ce) {
242 __ bind(_entry);
243
244 address entry = Runtime1::entry_for(StubId::c1_new_object_array_id);
245 //__ load_const_optimized(R0, entry);
246 __ add_const_optimized(R0, R29_TOC, MacroAssembler::offset_to_global_toc(entry));
247 __ mr_if_needed(/*op->tmp1()->as_register()*/ R5_ARG3, _length->as_register()); // already sign-extended
248 __ mtctr(R0);
249 __ bctrl();
250 ce->add_call_info_here(_info);
251 ce->verify_oop_map(_info);
252 __ b(_continuation);
253 }
254
255 void MonitorEnterStub::emit_code(LIR_Assembler* ce) {
256 __ bind(_entry);
257 address stub = Runtime1::entry_for(ce->compilation()->has_fpu_code() ? StubId::c1_monitorenter_id : StubId::c1_monitorenter_nofpu_id);
258 //__ load_const_optimized(R0, stub);
450 ce->bailout("const/stub overflow in call with trampoline");
451 return;
452 }
453 ce->add_call_info_here(info());
454 ce->verify_oop_map(info());
455
456 #ifndef PRODUCT
457 if (PrintC1Statistics) {
458 const address counter = (address)&Runtime1::_arraycopy_slowcase_cnt;
459 const Register tmp = R3, tmp2 = R4;
460 int simm16_offs = __ load_const_optimized(tmp, counter, tmp2, true);
461 __ lwz(tmp2, simm16_offs, tmp);
462 __ addi(tmp2, tmp2, 1);
463 __ stw(tmp2, simm16_offs, tmp);
464 }
465 #endif
466
467 __ b(_continuation);
468 }
469
470 #undef __
|
214 _result = result;
215 _info = new CodeEmitInfo(info);
216 }
217
218 void NewTypeArrayStub::emit_code(LIR_Assembler* ce) {
219 __ bind(_entry);
220
221 address entry = Runtime1::entry_for(StubId::c1_new_type_array_id);
222 //__ load_const_optimized(R0, entry);
223 __ add_const_optimized(R0, R29_TOC, MacroAssembler::offset_to_global_toc(entry));
224 __ mr_if_needed(/*op->tmp1()->as_register()*/ R5_ARG3, _length->as_register()); // already sign-extended
225 __ mtctr(R0);
226 __ bctrl();
227 ce->add_call_info_here(_info);
228 ce->verify_oop_map(_info);
229 __ b(_continuation);
230 }
231
232
233 // Implementation of NewObjectArrayStub
234 NewObjectArrayStub::NewObjectArrayStub(LIR_Opr klass_reg, LIR_Opr length, LIR_Opr result,
235 CodeEmitInfo* info, bool is_null_free) {
236 _klass_reg = klass_reg;
237 _length = length;
238 _result = result;
239 _info = new CodeEmitInfo(info);
240 _is_null_free = is_null_free; // unimplemented
241 }
242
243 void NewObjectArrayStub::emit_code(LIR_Assembler* ce) {
244 __ bind(_entry);
245
246 address entry = Runtime1::entry_for(StubId::c1_new_object_array_id);
247 //__ load_const_optimized(R0, entry);
248 __ add_const_optimized(R0, R29_TOC, MacroAssembler::offset_to_global_toc(entry));
249 __ mr_if_needed(/*op->tmp1()->as_register()*/ R5_ARG3, _length->as_register()); // already sign-extended
250 __ mtctr(R0);
251 __ bctrl();
252 ce->add_call_info_here(_info);
253 ce->verify_oop_map(_info);
254 __ b(_continuation);
255 }
256
257 void MonitorEnterStub::emit_code(LIR_Assembler* ce) {
258 __ bind(_entry);
259 address stub = Runtime1::entry_for(ce->compilation()->has_fpu_code() ? StubId::c1_monitorenter_id : StubId::c1_monitorenter_nofpu_id);
260 //__ load_const_optimized(R0, stub);
452 ce->bailout("const/stub overflow in call with trampoline");
453 return;
454 }
455 ce->add_call_info_here(info());
456 ce->verify_oop_map(info());
457
458 #ifndef PRODUCT
459 if (PrintC1Statistics) {
460 const address counter = (address)&Runtime1::_arraycopy_slowcase_cnt;
461 const Register tmp = R3, tmp2 = R4;
462 int simm16_offs = __ load_const_optimized(tmp, counter, tmp2, true);
463 __ lwz(tmp2, simm16_offs, tmp);
464 __ addi(tmp2, tmp2, 1);
465 __ stw(tmp2, simm16_offs, tmp);
466 }
467 #endif
468
469 __ b(_continuation);
470 }
471
472 // Implementation of SubstitutabilityCheckStub
473 SubstitutabilityCheckStub::SubstitutabilityCheckStub(LIR_Opr left, LIR_Opr right, CodeEmitInfo* info) {
474 Unimplemented();
475 }
476
477 void SubstitutabilityCheckStub::emit_code(LIR_Assembler* ce) {
478 Unimplemented();
479 }
480
481 LoadFlattenedArrayStub::LoadFlattenedArrayStub(LIR_Opr array, LIR_Opr index, LIR_Opr result, CodeEmitInfo* info) {
482 Unimplemented();
483 }
484
485 void LoadFlattenedArrayStub::emit_code(LIR_Assembler* ce) {
486 Unimplemented();
487 }
488
489 // Implementation of StoreFlattenedArrayStub
490
491 StoreFlattenedArrayStub::StoreFlattenedArrayStub(LIR_Opr array, LIR_Opr index, LIR_Opr value, CodeEmitInfo* info) {
492 Unimplemented();
493 }
494
495 void StoreFlattenedArrayStub::emit_code(LIR_Assembler* ce) {
496 Unimplemented();
497 }
498 #undef __
|