< prev index next >

src/hotspot/cpu/x86/templateInterpreterGenerator_x86.cpp

Print this page
*** 385,10 ***
--- 385,34 ---
  
    __ dispatch_via(vtos, Interpreter::_normal_table.table_for(vtos));
    return entry;
  }
  
+ address TemplateInterpreterGenerator::generate_cont_preempt_rerun_interpreter_adapter() {
+   if (!Continuations::enabled()) return nullptr;
+   address start = __ pc();
+ 
+   __ pop(rbp);
+ 
+   // We will return to the intermediate call made in call_VM skipping the restoration
+   // of bcp and locals done in InterpreterMacroAssembler::call_VM_base, so fix them here.
+   __ restore_bcp();
+   __ restore_locals();
+ 
+   // Get return address before adjusting rsp
+   __ movptr(rax, Address(rsp, 0));
+ 
+   // Restore stack bottom
+   __ movptr(rcx, Address(rbp, frame::interpreter_frame_last_sp_offset * wordSize));
+   __ lea(rsp, Address(rbp, rcx, Address::times_ptr));
+   // and NULL it as marker that esp is now tos until next java call
+   __ movptr(Address(rbp, frame::interpreter_frame_last_sp_offset * wordSize), NULL_WORD);
+ 
+   __ jmp(rax);
+ 
+   return start;
+ }
  
  
  // Helpers for commoning out cases in the various type of method entries.
  //
  
< prev index next >