src/cpu/aarch64/vm/vtableStubs_aarch64.cpp

Print this page




 163   // j_rarg0: receiver
 164 
 165 #ifdef ASSERT
 166   if (DebugVtables) {
 167     Label L2;
 168     __ cbz(rmethod, L2);
 169     __ ldr(rscratch1, Address(rmethod, Method::from_compiled_offset()));
 170     __ cbnz(rscratch1, L2);
 171     __ stop("compiler entrypoint is null");
 172     __ bind(L2);
 173   }
 174 #endif // ASSERT
 175 
 176   // rmethod: Method*
 177   // j_rarg0: receiver
 178   address ame_addr = __ pc();
 179   __ ldr(rscratch1, Address(rmethod, Method::from_compiled_offset()));
 180   __ br(rscratch1);
 181 
 182   __ bind(throw_icce);
 183   __ b(RuntimeAddress(StubRoutines::throw_IncompatibleClassChangeError_entry()));
 184 
 185   __ flush();
 186 
 187   if (PrintMiscellaneous && (WizardMode || Verbose)) {
 188     tty->print_cr("itable #%d at "PTR_FORMAT"[%d] left over: %d",
 189                   itable_index, p2i(s->entry_point()),
 190                   (int)(s->code_end() - s->entry_point()),
 191                   (int)(s->code_end() - __ pc()));
 192   }
 193   guarantee(__ pc() <= s->code_end(), "overflowed buffer");
 194 
 195   s->set_exception_points(npe_addr, ame_addr);
 196   return s;
 197 }
 198 
 199 
 200 int VtableStub::pd_code_size_limit(bool is_vtable_stub) {
 201   int size = DebugVtables ? 216 : 0;
 202   if (CountCompiledCalls)
 203     size += 6 * 4;




 163   // j_rarg0: receiver
 164 
 165 #ifdef ASSERT
 166   if (DebugVtables) {
 167     Label L2;
 168     __ cbz(rmethod, L2);
 169     __ ldr(rscratch1, Address(rmethod, Method::from_compiled_offset()));
 170     __ cbnz(rscratch1, L2);
 171     __ stop("compiler entrypoint is null");
 172     __ bind(L2);
 173   }
 174 #endif // ASSERT
 175 
 176   // rmethod: Method*
 177   // j_rarg0: receiver
 178   address ame_addr = __ pc();
 179   __ ldr(rscratch1, Address(rmethod, Method::from_compiled_offset()));
 180   __ br(rscratch1);
 181 
 182   __ bind(throw_icce);
 183   __ far_jump(RuntimeAddress(StubRoutines::throw_IncompatibleClassChangeError_entry()));
 184 
 185   __ flush();
 186 
 187   if (PrintMiscellaneous && (WizardMode || Verbose)) {
 188     tty->print_cr("itable #%d at "PTR_FORMAT"[%d] left over: %d",
 189                   itable_index, p2i(s->entry_point()),
 190                   (int)(s->code_end() - s->entry_point()),
 191                   (int)(s->code_end() - __ pc()));
 192   }
 193   guarantee(__ pc() <= s->code_end(), "overflowed buffer");
 194 
 195   s->set_exception_points(npe_addr, ame_addr);
 196   return s;
 197 }
 198 
 199 
 200 int VtableStub::pd_code_size_limit(bool is_vtable_stub) {
 201   int size = DebugVtables ? 216 : 0;
 202   if (CountCompiledCalls)
 203     size += 6 * 4;