< prev index next >

src/hotspot/cpu/aarch64/sharedRuntime_aarch64.cpp

Print this page
*** 555,44 ***
    // both caller and callee would be compiled methods, and neither would
    // clean up the stack pointer changes performed by the two adapters.
    // If this happens, control eventually transfers back to the compiled
    // caller, but with an uncorrected stack, causing delayed havoc.
  
-   if (VerifyAdapterCalls &&
-       (Interpreter::code() != nullptr || StubRoutines::final_stubs_code() != nullptr)) {
- #if 0
-     // So, let's test for cascading c2i/i2c adapters right now.
-     //  assert(Interpreter::contains($return_addr) ||
-     //         StubRoutines::contains($return_addr),
-     //         "i2c adapter must return to an interpreter frame");
-     __ block_comment("verify_i2c { ");
-     Label L_ok;
-     if (Interpreter::code() != nullptr) {
-       range_check(masm, rax, r11,
-                   Interpreter::code()->code_start(), Interpreter::code()->code_end(),
-                   L_ok);
-     }
-     if (StubRoutines::initial_stubs_code() != nullptr) {
-       range_check(masm, rax, r11,
-                   StubRoutines::initial_stubs_code()->code_begin(),
-                   StubRoutines::initial_stubs_code()->code_end(),
-                   L_ok);
-     }
-     if (StubRoutines::final_stubs_code() != nullptr) {
-       range_check(masm, rax, r11,
-                   StubRoutines::final_stubs_code()->code_begin(),
-                   StubRoutines::final_stubs_code()->code_end(),
-                   L_ok);
-     }
-     const char* msg = "i2c adapter must return to an interpreter frame";
-     __ block_comment(msg);
-     __ stop(msg);
-     __ bind(L_ok);
-     __ block_comment("} verify_i2ce ");
- #endif
-   }
- 
    // Cut-out for having no stack args.
    int comp_words_on_stack = align_up(comp_args_on_stack*VMRegImpl::stack_slot_size, wordSize)>>LogBytesPerWord;
    if (comp_args_on_stack) {
      __ sub(rscratch1, sp, comp_words_on_stack * wordSize);
      __ andr(sp, rscratch1, -16);
--- 555,10 ---

*** 709,16 ***
  
    __ br(rscratch1);
  }
  
  // ---------------------------------------------------------------
! AdapterHandlerEntry* SharedRuntime::generate_i2c2i_adapters(MacroAssembler *masm,
!                                                             int total_args_passed,
!                                                             int comp_args_on_stack,
!                                                             const BasicType *sig_bt,
!                                                             const VMRegPair *regs,
!                                                             AdapterFingerPrint* fingerprint) {
    address i2c_entry = __ pc();
  
    gen_i2c_adapter(masm, total_args_passed, comp_args_on_stack, sig_bt, regs);
  
    address c2i_unverified_entry = __ pc();
--- 675,16 ---
  
    __ br(rscratch1);
  }
  
  // ---------------------------------------------------------------
! void SharedRuntime::generate_i2c2i_adapters(MacroAssembler *masm,
!                                             int total_args_passed,
!                                             int comp_args_on_stack,
!                                             const BasicType *sig_bt,
!                                             const VMRegPair *regs,
!                                             AdapterHandlerEntry* handler) {
    address i2c_entry = __ pc();
  
    gen_i2c_adapter(masm, total_args_passed, comp_args_on_stack, sig_bt, regs);
  
    address c2i_unverified_entry = __ pc();

*** 775,11 ***
    BarrierSetAssembler* bs = BarrierSet::barrier_set()->barrier_set_assembler();
    bs->c2i_entry_barrier(masm);
  
    gen_c2i_adapter(masm, total_args_passed, comp_args_on_stack, sig_bt, regs, skip_fixup);
  
!   return AdapterHandlerLibrary::new_entry(fingerprint, i2c_entry, c2i_entry, c2i_unverified_entry, c2i_no_clinit_check_entry);
  }
  
  static int c_calling_convention_priv(const BasicType *sig_bt,
                                           VMRegPair *regs,
                                           int total_args_passed) {
--- 741,12 ---
    BarrierSetAssembler* bs = BarrierSet::barrier_set()->barrier_set_assembler();
    bs->c2i_entry_barrier(masm);
  
    gen_c2i_adapter(masm, total_args_passed, comp_args_on_stack, sig_bt, regs, skip_fixup);
  
!   handler->set_entry_points(i2c_entry, c2i_entry, c2i_unverified_entry, c2i_no_clinit_check_entry);
+   return;
  }
  
  static int c_calling_convention_priv(const BasicType *sig_bt,
                                           VMRegPair *regs,
                                           int total_args_passed) {
< prev index next >