< prev index next >

src/hotspot/cpu/arm/vtableStubs_arm.cpp

Print this page
rev 49011 : 8197405: Improve messages of AbstractMethodErrors and IncompatibleClassChangeErrors.
Reviewed-by: coleenp, dholmes


 141 
 142   // Get Method* and entry point for compiler
 143   __ ldr(Rintf, Address(Ricklass, CompiledICHolder::holder_metadata_offset()));
 144   __ lookup_interface_method(// inputs: rec. class, interface, itable index
 145                              Rclass, Rintf, itable_index,
 146                              // outputs: temp reg1, temp reg2, temp reg3
 147                              Rmethod, Rscan, Rtemp,
 148                              L_no_such_interface);
 149 
 150   address ame_addr = __ pc();
 151 
 152 #ifdef AARCH64
 153   __ ldr(Rtemp, Address(Rmethod, Method::from_compiled_offset()));
 154   __ br(Rtemp);
 155 #else
 156   __ ldr(PC, Address(Rmethod, Method::from_compiled_offset()));
 157 #endif // AARCH64
 158 
 159   __ bind(L_no_such_interface);
 160 
 161   assert(StubRoutines::throw_IncompatibleClassChangeError_entry() != NULL, "check initialization order");
 162   __ jump(StubRoutines::throw_IncompatibleClassChangeError_entry(), relocInfo::runtime_call_type, Rtemp);





 163 
 164   masm->flush();
 165 
 166   if (PrintMiscellaneous && (WizardMode || Verbose)) {
 167     tty->print_cr("itable #%d at " PTR_FORMAT "[%d] left over: %d",
 168                   itable_index, p2i(s->entry_point()),
 169                   (int)(s->code_end() - s->entry_point()),
 170                   (int)(s->code_end() - __ pc()));
 171   }
 172   guarantee(__ pc() <= s->code_end(), "overflowed buffer");
 173   // FIXME ARM: need correct 'slop' - below is x86 code
 174   // shut the door on sizing bugs
 175   //int slop = 8;  // 32-bit offset is this much larger than a 13-bit one
 176   //assert(itable_index > 10 || __ pc() + slop <= s->code_end(), "room for 32-bit offset");
 177 
 178   s->set_exception_points(npe_addr, ame_addr);
 179   return s;
 180 }
 181 
 182 int VtableStub::pd_code_size_limit(bool is_vtable_stub) {




 141 
 142   // Get Method* and entry point for compiler
 143   __ ldr(Rintf, Address(Ricklass, CompiledICHolder::holder_metadata_offset()));
 144   __ lookup_interface_method(// inputs: rec. class, interface, itable index
 145                              Rclass, Rintf, itable_index,
 146                              // outputs: temp reg1, temp reg2, temp reg3
 147                              Rmethod, Rscan, Rtemp,
 148                              L_no_such_interface);
 149 
 150   address ame_addr = __ pc();
 151 
 152 #ifdef AARCH64
 153   __ ldr(Rtemp, Address(Rmethod, Method::from_compiled_offset()));
 154   __ br(Rtemp);
 155 #else
 156   __ ldr(PC, Address(Rmethod, Method::from_compiled_offset()));
 157 #endif // AARCH64
 158 
 159   __ bind(L_no_such_interface);
 160 
 161   // Handle IncompatibleClassChangeError in itable stubs.
 162   // More detailed error message.
 163   // We force resolving of the call site by jumping to the "handle
 164   // wrong method" stub, and so let the interpreter runtime do all the
 165   // dirty work.
 166   assert(SharedRuntime::get_handle_wrong_method_stub() != NULL, "check initialization order");
 167   __ jump(SharedRuntime::get_handle_wrong_method_stub(), relocInfo::runtime_call_type, Rtemp);
 168 
 169   masm->flush();
 170 
 171   if (PrintMiscellaneous && (WizardMode || Verbose)) {
 172     tty->print_cr("itable #%d at " PTR_FORMAT "[%d] left over: %d",
 173                   itable_index, p2i(s->entry_point()),
 174                   (int)(s->code_end() - s->entry_point()),
 175                   (int)(s->code_end() - __ pc()));
 176   }
 177   guarantee(__ pc() <= s->code_end(), "overflowed buffer");
 178   // FIXME ARM: need correct 'slop' - below is x86 code
 179   // shut the door on sizing bugs
 180   //int slop = 8;  // 32-bit offset is this much larger than a 13-bit one
 181   //assert(itable_index > 10 || __ pc() + slop <= s->code_end(), "room for 32-bit offset");
 182 
 183   s->set_exception_points(npe_addr, ame_addr);
 184   return s;
 185 }
 186 
 187 int VtableStub::pd_code_size_limit(bool is_vtable_stub) {


< prev index next >