diff src/cpu/x86/vm/interpreter_x86_64.cpp @ 1108:85f13cdfbc1d

6829192: JSR 292 needs to support 64-bit x86 Summary: changes for method handles and invokedynamic Reviewed-by: kvn
author twisti
date Wed, 16 Dec 2009 12:48:04 +0100
parents e5b0439ef4ae
children c18cbe5936b8
line wrap: on
line diff
--- a/src/cpu/x86/vm/interpreter_x86_64.cpp	Tue Dec 15 17:19:40 2009 -0800
+++ b/src/cpu/x86/vm/interpreter_x86_64.cpp	Wed Dec 16 12:48:04 2009 +0100
@@ -277,12 +277,11 @@
   address entry_point = __ pc();
 
   // abstract method entry
-  // remove return address. Not really needed, since exception
-  // handling throws away expression stack
-  __ pop(rbx);
 
-  // adjust stack to what a normal return would do
-  __ mov(rsp, r13);
+  //  pop return address, reset last_sp to NULL
+  __ empty_expression_stack();
+  __ restore_bcp();      // rsi must be correct for exception handler   (was destroyed)
+  __ restore_locals();   // make sure locals pointer is correct as well (was destroyed)
 
   // throw exception
   __ call_VM(noreg, CAST_FROM_FN_PTR(address,
@@ -300,7 +299,10 @@
   if (!EnableMethodHandles) {
     return generate_abstract_entry();
   }
-  return generate_abstract_entry(); //6815692//
+
+  address entry_point = MethodHandles::generate_method_handle_interpreter_entry(_masm);
+
+  return entry_point;
 }