src/cpu/sparc/vm/templateInterpreter_sparc.cpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File 6829193 Cdiff src/cpu/sparc/vm/templateInterpreter_sparc.cpp

src/cpu/sparc/vm/templateInterpreter_sparc.cpp

Print this page

        

*** 149,160 **** return entry; } address TemplateInterpreterGenerator::generate_return_entry_for(TosState state, int step) { ! address compiled_entry = __ pc(); Label cont; address entry = __ pc(); #if !defined(_LP64) && defined(COMPILER2) // All return values are where we want them, except for Longs. C2 returns // longs in G1 in the 32-bit build whereas the interpreter wants them in O0/O1. --- 149,162 ---- return entry; } address TemplateInterpreterGenerator::generate_return_entry_for(TosState state, int step) { ! TosState incoming_state = state; ! Label cont; + address compiled_entry = __ pc(); address entry = __ pc(); #if !defined(_LP64) && defined(COMPILER2) // All return values are where we want them, except for Longs. C2 returns // longs in G1 in the 32-bit build whereas the interpreter wants them in O0/O1.
*** 163,178 **** // stupid shuffing. // Note: I tried to make c2 return longs in O0/O1 and G1 so we wouldn't have to // do this here. Unfortunately if we did a rethrow we'd see an machepilog node // first which would move g1 -> O0/O1 and destroy the exception we were throwing. ! if( state == ltos ) { ! __ srl (G1, 0,O1); ! __ srlx(G1,32,O0); } ! #endif /* !_LP64 && COMPILER2 */ ! __ bind(cont); // The callee returns with the stack possibly adjusted by adapter transition // We remove that possible adjustment here. --- 165,179 ---- // stupid shuffing. // Note: I tried to make c2 return longs in O0/O1 and G1 so we wouldn't have to // do this here. Unfortunately if we did a rethrow we'd see an machepilog node // first which would move g1 -> O0/O1 and destroy the exception we were throwing. ! if (incoming_state == ltos) { ! __ srl (G1, 0, O1); ! __ srlx(G1, 32, O0); } ! #endif // !_LP64 && COMPILER2 __ bind(cont); // The callee returns with the stack possibly adjusted by adapter transition // We remove that possible adjustment here.
*** 180,200 **** // in the O0/O1 or float registers. Before continuing, the arguments must be // popped from the java expression stack; i.e., Lesp must be adjusted. __ mov(Llast_SP, SP); // Remove any adapter added stack space. ! const Register cache = G3_scratch; const Register size = G1_scratch; __ get_cache_and_index_at_bcp(cache, G1_scratch, 1); __ ld_ptr(cache, constantPoolCacheOopDesc::base_offset() + ConstantPoolCacheEntry::flags_offset(), size); __ and3(size, 0xFF, size); // argument size in words __ sll(size, Interpreter::logStackElementSize(), size); // each argument size in bytes __ add(Lesp, size, Lesp); // pop arguments __ dispatch_next(state, step); return entry; } address TemplateInterpreterGenerator::generate_deopt_entry_for(TosState state, int step) { --- 181,216 ---- // in the O0/O1 or float registers. Before continuing, the arguments must be // popped from the java expression stack; i.e., Lesp must be adjusted. __ mov(Llast_SP, SP); // Remove any adapter added stack space. ! Label L_got_cache, L_giant_index; const Register cache = G3_scratch; const Register size = G1_scratch; + if (EnableInvokeDynamic) { + __ ldub(Address(Lbcp, 0), G1_scratch); // Load current bytecode. + __ cmp(G1_scratch, Bytecodes::_invokedynamic); + __ br(Assembler::equal, false, Assembler::pn, L_giant_index); + __ delayed()->nop(); + } __ get_cache_and_index_at_bcp(cache, G1_scratch, 1); + __ bind(L_got_cache); __ ld_ptr(cache, constantPoolCacheOopDesc::base_offset() + ConstantPoolCacheEntry::flags_offset(), size); __ and3(size, 0xFF, size); // argument size in words __ sll(size, Interpreter::logStackElementSize(), size); // each argument size in bytes __ add(Lesp, size, Lesp); // pop arguments __ dispatch_next(state, step); + // out of the main line of code... + if (EnableInvokeDynamic) { + __ bind(L_giant_index); + __ get_cache_and_index_at_bcp(cache, G1_scratch, 1, true); + __ ba(false, L_got_cache); + __ delayed()->nop(); + } + return entry; } address TemplateInterpreterGenerator::generate_deopt_entry_for(TosState state, int step) {
src/cpu/sparc/vm/templateInterpreter_sparc.cpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File