src/share/vm/c1/c1_LIRGenerator.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File
*** old/src/share/vm/c1/c1_LIRGenerator.cpp	Fri May 29 13:57:37 2015
--- new/src/share/vm/c1/c1_LIRGenerator.cpp	Fri May 29 13:57:37 2015

*** 2885,2903 **** --- 2885,2903 ---- // e) unlock receiver // f) move receiver into receiver-register %o0 // g) lock result registers and emit call operation // // Before issuing a call, we must spill-save all values on stack ! // that are in caller-save register. "spill-save" moves those registers // either in a free callee-save register or spills them if no free // callee save register is available. // // The problem is where to invoke spill-save. // - if invoked between e) and f), we may lock callee save // register in "spill-save" that destroys the receiver register // before f) is executed ! // - if we rearange the f) to be earlier, by loading %o0, it ! // - if we rearrange f) to be earlier (by loading %o0) it // may destroy a value on the stack that is currently in %o0 // and is waiting to be spilled // - if we keep the receiver locked while doing spill-save, // we cannot spill it as it is spill-locked //
*** 2926,2944 **** --- 2926,2946 ---- // emit invoke code bool optimized = x->target_is_loaded() && x->target_is_final(); assert(receiver->is_illegal() || receiver->is_equal(LIR_Assembler::receiverOpr()), "must match"); // JSR 292 ! // Preserve the SP over MethodHandle call sites, if needed. ciMethod* target = x->target(); bool is_method_handle_invoke = (// %%% FIXME: Are both of these relevant? target->is_method_handle_intrinsic() || target->is_compiled_lambda_form()); if (is_method_handle_invoke) { info->set_is_method_handle_invoke(true); + if(FrameMap::method_handle_invoke_SP_save_opr() != LIR_OprFact::illegalOpr) { __ move(FrameMap::stack_pointer(), FrameMap::method_handle_invoke_SP_save_opr()); } + } switch (x->code()) { case Bytecodes::_invokestatic: __ call_static(target, result_register, SharedRuntime::get_resolve_static_call_stub(),
*** 2973,2984 **** --- 2975,2987 ---- fatal(err_msg("unexpected bytecode: %s", Bytecodes::name(x->code()))); break; } // JSR 292 ! // Restore the SP after MethodHandle call sites, if needed. - if (is_method_handle_invoke) { + && FrameMap::method_handle_invoke_SP_save_opr() != LIR_OprFact::illegalOpr) { __ move(FrameMap::method_handle_invoke_SP_save_opr(), FrameMap::stack_pointer()); } if (x->type()->is_float() || x->type()->is_double()) { // Force rounding of results from non-strictfp when in strictfp

src/share/vm/c1/c1_LIRGenerator.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File