< prev index next >
src/cpu/x86/vm/compiledIC_x86.cpp
Print this page
@@ -48,11 +48,11 @@
}
// ----------------------------------------------------------------------------
#define __ _masm.
-void CompiledStaticCall::emit_to_interp_stub(CodeBuffer &cbuf) {
+address CompiledStaticCall::emit_to_interp_stub(CodeBuffer &cbuf) {
// Stub is fixed up when the corresponding call is converted from
// calling compiled code to calling interpreted code.
// movq rbx, 0
// jmp -5 # to self
@@ -60,22 +60,24 @@
// Note that the code buffer's insts_mark is always relative to insts.
// That's why we must use the macroassembler to generate a stub.
MacroAssembler _masm(&cbuf);
- address base =
- __ start_a_stub(to_interp_stub_size()*2);
- if (base == NULL) return; // CodeBuffer::expand failed.
+ address base = __ start_a_stub(to_interp_stub_size());
+ if (base == NULL) {
+ return NULL; // CodeBuffer::expand failed.
+ }
// Static stub relocation stores the instruction address of the call.
__ relocate(static_stub_Relocation::spec(mark), Assembler::imm_operand);
// Static stub relocation also tags the Method* in the code-stream.
__ mov_metadata(rbx, (Metadata*) NULL); // Method is zapped till fixup time.
// This is recognized as unresolved by relocs/nativeinst/ic code.
__ jump(RuntimeAddress(__ pc()));
// Update current stubs pointer and restore insts_end.
__ end_a_stub();
+ return base;
}
#undef __
int CompiledStaticCall::to_interp_stub_size() {
return NOT_LP64(10) // movl; jmp
< prev index next >