< prev index next >

src/hotspot/cpu/aarch64/templateTable_aarch64.cpp

Print this page
*** 3964,16 ***
--- 3964,26 ---
    // expression stack looks correct.
    __ increment(rbcp);
  
    // store object
    __ str(r0, Address(c_rarg1, BasicObjectLock::obj_offset()));
+   __ set_last_Java_frame(sp, rfp, rscratch1, rscratch2);
    __ lock_object(c_rarg1);
+   __ reset_last_Java_frame(true);
  
    // check to make sure this monitor doesn't cause stack overflow after locking
    __ save_bcp();  // in case of exception
    __ generate_stack_overflow_check(0);
  
+   // Check preemption
+   Label ok;
+   __ ldrb(rscratch1, Address(rthread, in_bytes(JavaThread::preempting_offset())));
+   __ cbz(rscratch1, ok);
+   __ lea(rscratch1, RuntimeAddress(StubRoutines::cont_preempt_stub()));
+   __ br(rscratch1);
+   __ bind(ok);
+ 
    // The bcp has already been incremented. Just need to dispatch to
    // next instruction.
    __ dispatch_next(vtos);
  }
  

*** 4018,10 ***
--- 4028,12 ---
      // if not at bottom then check this entry
      __ br(Assembler::NE, loop);
    }
  
    // error handling. Unlocking was not block-structured
+   __ adr(rscratch1, __ pc());
+   __ set_last_Java_frame(sp, rfp, rscratch1, rscratch2);
    __ call_VM(noreg, CAST_FROM_FN_PTR(address,
                     InterpreterRuntime::throw_illegal_monitor_state_exception));
    __ should_not_reach_here();
  
    // call run-time routine
< prev index next >