src/cpu/sparc/vm/compiledIC_sparc.cpp

changeset 8427
c3d0bd36ab28
parent 6985
c64b6b0c40c8
equal deleted inserted replaced
8419:65a0107d52ed 8427:c3d0bd36ab28
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()));
79 80
80 __ delayed()->nop(); 81 __ delayed()->nop();
81 82
82 // Update current stubs pointer and restore code_end. 83 // Update current stubs pointer and restore code_end.
83 __ end_a_stub(); 84 __ end_a_stub();
85 return base;
84 #else 86 #else
85 ShouldNotReachHere(); 87 ShouldNotReachHere();
86 #endif 88 #endif
87 } 89 }
88 #undef __ 90 #undef __

mercurial