< prev index next >

src/hotspot/cpu/arm/sharedRuntime_arm.cpp

Print this page

 595         __ str(r_2->as_Register(), Address(SP, stack_offset));
 596       }
 597     } else if (r_1->is_FloatRegister()) {
 598 #ifdef __SOFTFP__
 599       ShouldNotReachHere();
 600 #endif // __SOFTFP__
 601       if (!r_2->is_valid()) {
 602         __ fsts(r_1->as_FloatRegister(), Address(SP, stack_offset));
 603       } else {
 604         __ fstd(r_1->as_FloatRegister(), Address(SP, stack_offset - Interpreter::stackElementSize));
 605       }
 606     } else {
 607       assert(!r_1->is_valid() && !r_2->is_valid(), "must be");
 608     }
 609   }
 610 
 611   __ ldr(PC, Address(Rmethod, Method::interpreter_entry_offset()));
 612 
 613 }
 614 
 615 AdapterHandlerEntry* SharedRuntime::generate_i2c2i_adapters(MacroAssembler *masm,
 616                                                             int total_args_passed,
 617                                                             int comp_args_on_stack,
 618                                                             const BasicType *sig_bt,
 619                                                             const VMRegPair *regs,
 620                                                             AdapterFingerPrint* fingerprint) {
 621   address i2c_entry = __ pc();
 622   gen_i2c_adapter(masm, total_args_passed, comp_args_on_stack, sig_bt, regs);
 623 
 624   address c2i_unverified_entry = __ pc();
 625   Label skip_fixup;
 626   const Register receiver       = R0;
 627   const Register holder_klass   = Rtemp; // XXX should be OK for C2 but not 100% sure
 628 
 629   __ ic_check(1 /* end_alignment */);
 630   __ ldr(Rmethod, Address(Ricklass, CompiledICData::speculated_method_offset()));
 631 
 632   __ ldr(Rtemp, Address(Rmethod, Method::code_offset()), eq);
 633   __ cmp(Rtemp, 0, eq);
 634   __ b(skip_fixup, eq);
 635   __ jump(SharedRuntime::get_ic_miss_stub(), relocInfo::runtime_call_type, noreg, ne);
 636 
 637   address c2i_entry = __ pc();
 638   gen_c2i_adapter(masm, total_args_passed, comp_args_on_stack, sig_bt, regs, skip_fixup);
 639 
 640   return AdapterHandlerLibrary::new_entry(fingerprint, i2c_entry, c2i_entry, c2i_unverified_entry);

 641 }
 642 
 643 
 644 static int reg2offset_in(VMReg r) {
 645   // Account for saved FP and LR
 646   return r->reg2stack() * VMRegImpl::stack_slot_size + 2*wordSize;
 647 }
 648 
 649 static int reg2offset_out(VMReg r) {
 650   return (r->reg2stack() + SharedRuntime::out_preserve_stack_slots()) * VMRegImpl::stack_slot_size;
 651 }
 652 
 653 
 654 static void verify_oop_args(MacroAssembler* masm,
 655                             const methodHandle& method,
 656                             const BasicType* sig_bt,
 657                             const VMRegPair* regs) {
 658   Register temp_reg = Rmethod;  // not part of any compiled calling seq
 659   if (VerifyOops) {
 660     for (int i = 0; i < method->size_of_parameters(); i++) {

 595         __ str(r_2->as_Register(), Address(SP, stack_offset));
 596       }
 597     } else if (r_1->is_FloatRegister()) {
 598 #ifdef __SOFTFP__
 599       ShouldNotReachHere();
 600 #endif // __SOFTFP__
 601       if (!r_2->is_valid()) {
 602         __ fsts(r_1->as_FloatRegister(), Address(SP, stack_offset));
 603       } else {
 604         __ fstd(r_1->as_FloatRegister(), Address(SP, stack_offset - Interpreter::stackElementSize));
 605       }
 606     } else {
 607       assert(!r_1->is_valid() && !r_2->is_valid(), "must be");
 608     }
 609   }
 610 
 611   __ ldr(PC, Address(Rmethod, Method::interpreter_entry_offset()));
 612 
 613 }
 614 
 615 void SharedRuntime::generate_i2c2i_adapters(MacroAssembler *masm,
 616                                             int total_args_passed,
 617                                             int comp_args_on_stack,
 618                                             const BasicType *sig_bt,
 619                                             const VMRegPair *regs,
 620                                             AdapterHandlerEntry* handler) {
 621   address i2c_entry = __ pc();
 622   gen_i2c_adapter(masm, total_args_passed, comp_args_on_stack, sig_bt, regs);
 623 
 624   address c2i_unverified_entry = __ pc();
 625   Label skip_fixup;
 626   const Register receiver       = R0;
 627   const Register holder_klass   = Rtemp; // XXX should be OK for C2 but not 100% sure
 628 
 629   __ ic_check(1 /* end_alignment */);
 630   __ ldr(Rmethod, Address(Ricklass, CompiledICData::speculated_method_offset()));
 631 
 632   __ ldr(Rtemp, Address(Rmethod, Method::code_offset()), eq);
 633   __ cmp(Rtemp, 0, eq);
 634   __ b(skip_fixup, eq);
 635   __ jump(SharedRuntime::get_ic_miss_stub(), relocInfo::runtime_call_type, noreg, ne);
 636 
 637   address c2i_entry = __ pc();
 638   gen_c2i_adapter(masm, total_args_passed, comp_args_on_stack, sig_bt, regs, skip_fixup);
 639 
 640   handler->set_entry_points(i2c_entry, c2i_entry, c2i_unverified_entry, nullptr);
 641   return;
 642 }
 643 
 644 
 645 static int reg2offset_in(VMReg r) {
 646   // Account for saved FP and LR
 647   return r->reg2stack() * VMRegImpl::stack_slot_size + 2*wordSize;
 648 }
 649 
 650 static int reg2offset_out(VMReg r) {
 651   return (r->reg2stack() + SharedRuntime::out_preserve_stack_slots()) * VMRegImpl::stack_slot_size;
 652 }
 653 
 654 
 655 static void verify_oop_args(MacroAssembler* masm,
 656                             const methodHandle& method,
 657                             const BasicType* sig_bt,
 658                             const VMRegPair* regs) {
 659   Register temp_reg = Rmethod;  // not part of any compiled calling seq
 660   if (VerifyOops) {
 661     for (int i = 0; i < method->size_of_parameters(); i++) {
< prev index next >