--- a/hotspot/src/cpu/x86/vm/templateInterpreter_x86_64.cpp Tue Aug 06 14:28:48 2013 +0400
+++ b/hotspot/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