Mercurial > hg > truffle
diff src/cpu/x86/vm/templateInterpreter_x86_64.cpp @ 12010:ca0165daa6ec
7187554: JSR 292: JVMTI PopFrame needs to handle appendix arguments
Summary: Restore the appendix argument after PopFrame() call
Reviewed-by: twisti, coleenp
Contributed-by: serguei.spitsyn@oracle.com
author | sspitsyn |
---|---|
date | Tue, 06 Aug 2013 16:33:59 -0700 |
parents | b800986664f4 |
children | 3cce976666d9 6725044c5725 |
line wrap: on
line diff
--- a/src/cpu/x86/vm/templateInterpreter_x86_64.cpp Tue Aug 06 14:28:48 2013 +0400 +++ b/src/cpu/x86/vm/templateInterpreter_x86_64.cpp Tue Aug 06 16:33:59 2013 -0700 @@ -1929,6 +1929,29 @@ __ movl(Address(r15_thread, JavaThread::popframe_condition_offset()), JavaThread::popframe_inactive); +#if INCLUDE_JVMTI + if (EnableInvokeDynamic) { + Label L_done; + const Register local0 = r14; + + __ cmpb(Address(r13, 0), Bytecodes::_invokestatic); + __ jcc(Assembler::notEqual, L_done); + + // The member name argument must be restored if _invokestatic is re-executed after a PopFrame call. + // Detect such a case in the InterpreterRuntime function and return the member name argument, or NULL. + + __ get_method(rdx); + __ movptr(rax, Address(local0, 0)); + __ call_VM(rax, CAST_FROM_FN_PTR(address, InterpreterRuntime::member_name_arg_or_null), rax, rdx, r13); + + __ testptr(rax, rax); + __ jcc(Assembler::zero, L_done); + + __ movptr(Address(rbx, 0), rax); + __ bind(L_done); + } +#endif // INCLUDE_JVMTI + __ dispatch_next(vtos); // end of PopFrame support