Mercurial > hg > graal-compiler
diff src/cpu/sparc/vm/compiledIC_sparc.cpp @ 15046:5c71dcf0915d
use hotspot static stubs for call sites
author | Tom Rodriguez <tom.rodriguez@oracle.com> |
---|---|
date | Wed, 09 Apr 2014 16:33:37 -0700 |
parents | 36bcc10e01c0 |
children | 7848fc12602b |
line wrap: on
line diff
--- a/src/cpu/sparc/vm/compiledIC_sparc.cpp Wed Apr 09 16:33:32 2014 -0700 +++ b/src/cpu/sparc/vm/compiledIC_sparc.cpp Wed Apr 09 16:33:37 2014 -0700 @@ -81,25 +81,26 @@ // ---------------------------------------------------------------------------- #define __ _masm. -void CompiledStaticCall::emit_to_interp_stub(CodeBuffer &cbuf) { -#ifdef COMPILER2 +void CompiledStaticCall::emit_to_interp_stub(CodeBuffer &cbuf, address mark) { // Stub is fixed up when the corresponding call is converted from calling // compiled code to calling interpreted code. // set (empty), G5 // jmp -1 - address mark = cbuf.insts_mark(); // Get mark within main instrs section. + if (mark == NULL) { + mark = cbuf.insts_mark(); // Get mark within main instrs section. + } MacroAssembler _masm(&cbuf); address base = - __ start_a_stub(to_interp_stub_size()*2); - if (base == NULL) return; // CodeBuffer::expand failed. + __ start_a_stub(to_interp_stub_size()); + guarantee(base != NULL, "out of space"); // Static stub relocation stores the instruction address of the call. __ relocate(static_stub_Relocation::spec(mark)); - __ set_metadata(NULL, as_Register(Matcher::inline_cache_reg_encode())); + __ set_metadata(NULL, G5); __ set_inst_mark(); AddressLiteral addrlit(-1); @@ -107,11 +108,10 @@ __ delayed()->nop(); + assert(__ pc() - base <= to_interp_stub_size(), "wrong stub size"); + // Update current stubs pointer and restore code_end. __ end_a_stub(); -#else - ShouldNotReachHere(); -#endif } #undef __