< prev index next >

src/cpu/ppc/vm/ppc.ad

Print this page




3545       AddressLiteral empty_ic((address) Universe::non_oop_word());
3546       bool success = __ load_const_from_method_toc(ic_reg, empty_ic, Rtoc, /*fixed_size*/ true);
3547       if (!success) {
3548         ciEnv::current()->record_out_of_memory_failure();
3549         return;
3550       }
3551       // CALL to fixup routine.  Fixup routine uses ScopeDesc info
3552       // to determine who we intended to call.
3553       __ relocate(virtual_call_Relocation::spec(virtual_call_meta_addr));
3554       emit_call_with_trampoline_stub(_masm, (address)$meth$$method, relocInfo::none);
3555       assert(((MachCallDynamicJavaNode*)this)->ret_addr_offset() == __ offset() - start_offset,
3556              "Fix constant in ret_addr_offset()");
3557     } else {
3558       assert(!UseInlineCaches, "expect vtable calls only if not using ICs");
3559       // Go thru the vtable. Get receiver klass. Receiver already
3560       // checked for non-null. If we'll go thru a C2I adapter, the
3561       // interpreter expects method in R19_method.
3562 
3563       __ load_klass(R11_scratch1, R3);
3564 
3565       int entry_offset = in_bytes(InstanceKlass::vtable_start_offset()) + _vtable_index * vtableEntry::size_in_bytes();
3566       int v_off = entry_offset + vtableEntry::method_offset_in_bytes();
3567       __ li(R19_method, v_off);
3568       __ ldx(R19_method/*method oop*/, R19_method/*method offset*/, R11_scratch1/*class*/);
3569       // NOTE: for vtable dispatches, the vtable entry will never be
3570       // null. However it may very well end up in handle_wrong_method
3571       // if the method is abstract for the particular class.
3572       __ ld(R11_scratch1, in_bytes(Method::from_compiled_offset()), R19_method);
3573       // Call target. Either compiled code or C2I adapter.
3574       __ mtctr(R11_scratch1);
3575       __ bctrl();
3576       if (((MachCallDynamicJavaNode*)this)->ret_addr_offset() != __ offset() - start_offset) {
3577         tty->print(" %d, %d\n", ((MachCallDynamicJavaNode*)this)->ret_addr_offset(),__ offset() - start_offset);
3578       }
3579       assert(((MachCallDynamicJavaNode*)this)->ret_addr_offset() == __ offset() - start_offset,
3580              "Fix constant in ret_addr_offset()");
3581     }
3582 #endif
3583     Unimplemented();  // ret_addr_offset not yet fixed. Depends on compressed oops (load klass!).
3584   %}
3585 




3545       AddressLiteral empty_ic((address) Universe::non_oop_word());
3546       bool success = __ load_const_from_method_toc(ic_reg, empty_ic, Rtoc, /*fixed_size*/ true);
3547       if (!success) {
3548         ciEnv::current()->record_out_of_memory_failure();
3549         return;
3550       }
3551       // CALL to fixup routine.  Fixup routine uses ScopeDesc info
3552       // to determine who we intended to call.
3553       __ relocate(virtual_call_Relocation::spec(virtual_call_meta_addr));
3554       emit_call_with_trampoline_stub(_masm, (address)$meth$$method, relocInfo::none);
3555       assert(((MachCallDynamicJavaNode*)this)->ret_addr_offset() == __ offset() - start_offset,
3556              "Fix constant in ret_addr_offset()");
3557     } else {
3558       assert(!UseInlineCaches, "expect vtable calls only if not using ICs");
3559       // Go thru the vtable. Get receiver klass. Receiver already
3560       // checked for non-null. If we'll go thru a C2I adapter, the
3561       // interpreter expects method in R19_method.
3562 
3563       __ load_klass(R11_scratch1, R3);
3564 
3565       int entry_offset = in_bytes(Klass::vtable_start_offset()) + _vtable_index * vtableEntry::size_in_bytes();
3566       int v_off = entry_offset + vtableEntry::method_offset_in_bytes();
3567       __ li(R19_method, v_off);
3568       __ ldx(R19_method/*method oop*/, R19_method/*method offset*/, R11_scratch1/*class*/);
3569       // NOTE: for vtable dispatches, the vtable entry will never be
3570       // null. However it may very well end up in handle_wrong_method
3571       // if the method is abstract for the particular class.
3572       __ ld(R11_scratch1, in_bytes(Method::from_compiled_offset()), R19_method);
3573       // Call target. Either compiled code or C2I adapter.
3574       __ mtctr(R11_scratch1);
3575       __ bctrl();
3576       if (((MachCallDynamicJavaNode*)this)->ret_addr_offset() != __ offset() - start_offset) {
3577         tty->print(" %d, %d\n", ((MachCallDynamicJavaNode*)this)->ret_addr_offset(),__ offset() - start_offset);
3578       }
3579       assert(((MachCallDynamicJavaNode*)this)->ret_addr_offset() == __ offset() - start_offset,
3580              "Fix constant in ret_addr_offset()");
3581     }
3582 #endif
3583     Unimplemented();  // ret_addr_offset not yet fixed. Depends on compressed oops (load klass!).
3584   %}
3585 


< prev index next >