195 __ bind(L01);
196 }
197 #endif
198
199 // If the following load is through a NULL pointer, we'll take an OS
200 // exception that should translate into an AbstractMethodError. We need the
201 // window count to be correct at that time.
202 __ restore(L5_method, 0, G5_method);
203 // Restore registers *before* the AME point.
204
205 address ame_addr = __ pc(); // if the vtable entry is null, the method is abstract
206 __ ld_ptr(G5_method, in_bytes(Method::from_compiled_offset()), G3_scratch);
207
208 // G5_method: Method*
209 // O0: Receiver
210 // G3_scratch: entry point
211 __ JMP(G3_scratch, 0);
212 __ delayed()->nop();
213
214 __ bind(L_no_such_interface);
215 AddressLiteral icce(StubRoutines::throw_IncompatibleClassChangeError_entry());
216 __ jump_to(icce, G3_scratch);
217 __ delayed()->restore();
218
219 masm->flush();
220
221 if (PrintMiscellaneous && (WizardMode || Verbose)) {
222 tty->print_cr("itable #%d at " PTR_FORMAT "[%d] left over: %d",
223 itable_index, p2i(s->entry_point()),
224 (int)(s->code_end() - s->entry_point()),
225 (int)(s->code_end() - __ pc()));
226 }
227 guarantee(__ pc() <= s->code_end(), "overflowed buffer");
228 // shut the door on sizing bugs
229 int slop = 2*BytesPerInstWord; // 32-bit offset is this much larger than a 13-bit one
230 assert(itable_index > 10 || __ pc() + slop <= s->code_end(), "room for sethi;add");
231
232 s->set_exception_points(npe_addr, ame_addr);
233 return s;
234 }
235
|
195 __ bind(L01);
196 }
197 #endif
198
199 // If the following load is through a NULL pointer, we'll take an OS
200 // exception that should translate into an AbstractMethodError. We need the
201 // window count to be correct at that time.
202 __ restore(L5_method, 0, G5_method);
203 // Restore registers *before* the AME point.
204
205 address ame_addr = __ pc(); // if the vtable entry is null, the method is abstract
206 __ ld_ptr(G5_method, in_bytes(Method::from_compiled_offset()), G3_scratch);
207
208 // G5_method: Method*
209 // O0: Receiver
210 // G3_scratch: entry point
211 __ JMP(G3_scratch, 0);
212 __ delayed()->nop();
213
214 __ bind(L_no_such_interface);
215 // Handle IncompatibleClassChangeError in itable stubs.
216 // More detailed error message.
217 // We force resolving of the call site by jumping to the "handle
218 // wrong method" stub, and so let the interpreter runtime do all the
219 // dirty work.
220 AddressLiteral icce(SharedRuntime::get_handle_wrong_method_stub());
221 __ jump_to(icce, G3_scratch);
222 __ delayed()->restore();
223
224 masm->flush();
225
226 if (PrintMiscellaneous && (WizardMode || Verbose)) {
227 tty->print_cr("itable #%d at " PTR_FORMAT "[%d] left over: %d",
228 itable_index, p2i(s->entry_point()),
229 (int)(s->code_end() - s->entry_point()),
230 (int)(s->code_end() - __ pc()));
231 }
232 guarantee(__ pc() <= s->code_end(), "overflowed buffer");
233 // shut the door on sizing bugs
234 int slop = 2*BytesPerInstWord; // 32-bit offset is this much larger than a 13-bit one
235 assert(itable_index > 10 || __ pc() + slop <= s->code_end(), "room for sethi;add");
236
237 s->set_exception_points(npe_addr, ame_addr);
238 return s;
239 }
240
|