51 } |
51 } |
52 |
52 |
53 // ---------------------------------------------------------------------------- |
53 // ---------------------------------------------------------------------------- |
54 |
54 |
55 #define __ _masm. |
55 #define __ _masm. |
56 void CompiledStaticCall::emit_to_interp_stub(CodeBuffer &cbuf) { |
56 address CompiledStaticCall::emit_to_interp_stub(CodeBuffer &cbuf) { |
57 #ifdef COMPILER2 |
57 #ifdef COMPILER2 |
58 // Stub is fixed up when the corresponding call is converted from calling |
58 // Stub is fixed up when the corresponding call is converted from calling |
59 // compiled code to calling interpreted code. |
59 // compiled code to calling interpreted code. |
60 // set (empty), G5 |
60 // set (empty), G5 |
61 // jmp -1 |
61 // jmp -1 |
62 |
62 |
63 address mark = cbuf.insts_mark(); // Get mark within main instrs section. |
63 address mark = cbuf.insts_mark(); // Get mark within main instrs section. |
64 |
64 |
65 MacroAssembler _masm(&cbuf); |
65 MacroAssembler _masm(&cbuf); |
66 |
66 |
67 address base = |
67 address base = __ start_a_stub(to_interp_stub_size()); |
68 __ start_a_stub(to_interp_stub_size()*2); |
68 if (base == NULL) { |
69 if (base == NULL) return; // CodeBuffer::expand failed. |
69 return NULL; // CodeBuffer::expand failed. |
|
70 } |
70 |
71 |
71 // Static stub relocation stores the instruction address of the call. |
72 // Static stub relocation stores the instruction address of the call. |
72 __ relocate(static_stub_Relocation::spec(mark)); |
73 __ relocate(static_stub_Relocation::spec(mark)); |
73 |
74 |
74 __ set_metadata(NULL, as_Register(Matcher::inline_cache_reg_encode())); |
75 __ set_metadata(NULL, as_Register(Matcher::inline_cache_reg_encode())); |