hotspot/src/cpu/x86/vm/vtableStubs_x86_32.cpp
changeset 13391 30245956af37
parent 7397 5b173b4ca846
child 13728 882756847a04
equal deleted inserted replaced
13309:50c604cb0d5f 13391:30245956af37
    74   assert(VtableStub::receiver_location() == rcx->as_VMReg(), "receiver expected in rcx");
    74   assert(VtableStub::receiver_location() == rcx->as_VMReg(), "receiver expected in rcx");
    75 
    75 
    76   // get receiver klass
    76   // get receiver klass
    77   address npe_addr = __ pc();
    77   address npe_addr = __ pc();
    78   __ movptr(rax, Address(rcx, oopDesc::klass_offset_in_bytes()));
    78   __ movptr(rax, Address(rcx, oopDesc::klass_offset_in_bytes()));
    79   // compute entry offset (in words)
    79 
    80   int entry_offset = instanceKlass::vtable_start_offset() + vtable_index*vtableEntry::size();
       
    81 #ifndef PRODUCT
    80 #ifndef PRODUCT
    82   if (DebugVtables) {
    81   if (DebugVtables) {
    83     Label L;
    82     Label L;
    84     // check offset vs vtable length
    83     // check offset vs vtable length
    85     __ cmpl(Address(rax, instanceKlass::vtable_length_offset()*wordSize), vtable_index*vtableEntry::size());
    84     __ cmpl(Address(rax, instanceKlass::vtable_length_offset()*wordSize), vtable_index*vtableEntry::size());
    91 #endif // PRODUCT
    90 #endif // PRODUCT
    92 
    91 
    93   const Register method = rbx;
    92   const Register method = rbx;
    94 
    93 
    95   // load methodOop and target address
    94   // load methodOop and target address
    96   __ movptr(method, Address(rax, entry_offset*wordSize + vtableEntry::method_offset_in_bytes()));
    95   __ lookup_virtual_method(rax, vtable_index, method);
       
    96 
    97   if (DebugVtables) {
    97   if (DebugVtables) {
    98     Label L;
    98     Label L;
    99     __ cmpptr(method, (int32_t)NULL_WORD);
    99     __ cmpptr(method, (int32_t)NULL_WORD);
   100     __ jcc(Assembler::equal, L);
   100     __ jcc(Assembler::equal, L);
   101     __ cmpptr(Address(method, methodOopDesc::from_compiled_offset()), (int32_t)NULL_WORD);
   101     __ cmpptr(Address(method, methodOopDesc::from_compiled_offset()), (int32_t)NULL_WORD);