184 // j_rarg0: receiver
185
186 #ifdef ASSERT
187 if (DebugVtables) {
188 Label L2;
189 __ cbz(rmethod, L2);
190 __ ldr(rscratch1, Address(rmethod, Method::from_compiled_offset()));
191 __ cbnz(rscratch1, L2);
192 __ stop("compiler entrypoint is null");
193 __ bind(L2);
194 }
195 #endif // ASSERT
196
197 // rmethod: Method*
198 // j_rarg0: receiver
199 address ame_addr = __ pc();
200 __ ldr(rscratch1, Address(rmethod, Method::from_compiled_offset()));
201 __ br(rscratch1);
202
203 __ bind(L_no_such_interface);
204 __ far_jump(RuntimeAddress(StubRoutines::throw_IncompatibleClassChangeError_entry()));
205
206 __ flush();
207
208 if (PrintMiscellaneous && (WizardMode || Verbose)) {
209 tty->print_cr("itable #%d at " PTR_FORMAT "[%d] left over: %d",
210 itable_index, p2i(s->entry_point()),
211 (int)(s->code_end() - s->entry_point()),
212 (int)(s->code_end() - __ pc()));
213 }
214 guarantee(__ pc() <= s->code_end(), "overflowed buffer");
215
216 s->set_exception_points(npe_addr, ame_addr);
217 return s;
218 }
219
220
221 int VtableStub::pd_code_size_limit(bool is_vtable_stub) {
222 int size = DebugVtables ? 216 : 0;
223 if (CountCompiledCalls)
224 size += 6 * 4;
|
184 // j_rarg0: receiver
185
186 #ifdef ASSERT
187 if (DebugVtables) {
188 Label L2;
189 __ cbz(rmethod, L2);
190 __ ldr(rscratch1, Address(rmethod, Method::from_compiled_offset()));
191 __ cbnz(rscratch1, L2);
192 __ stop("compiler entrypoint is null");
193 __ bind(L2);
194 }
195 #endif // ASSERT
196
197 // rmethod: Method*
198 // j_rarg0: receiver
199 address ame_addr = __ pc();
200 __ ldr(rscratch1, Address(rmethod, Method::from_compiled_offset()));
201 __ br(rscratch1);
202
203 __ bind(L_no_such_interface);
204 // Handle IncompatibleClassChangeError in itable stubs.
205 // More detailed error message.
206 // We force resolving of the call site by jumping to the "handle
207 // wrong method" stub, and so let the interpreter runtime do all the
208 // dirty work.
209 __ far_jump(RuntimeAddress(SharedRuntime::get_handle_wrong_method_stub());
210
211 __ flush();
212
213 if (PrintMiscellaneous && (WizardMode || Verbose)) {
214 tty->print_cr("itable #%d at " PTR_FORMAT "[%d] left over: %d",
215 itable_index, p2i(s->entry_point()),
216 (int)(s->code_end() - s->entry_point()),
217 (int)(s->code_end() - __ pc()));
218 }
219 guarantee(__ pc() <= s->code_end(), "overflowed buffer");
220
221 s->set_exception_points(npe_addr, ame_addr);
222 return s;
223 }
224
225
226 int VtableStub::pd_code_size_limit(bool is_vtable_stub) {
227 int size = DebugVtables ? 216 : 0;
228 if (CountCompiledCalls)
229 size += 6 * 4;
|