< prev index next >

src/hotspot/cpu/riscv/c1_CodeStubs_riscv.cpp

Print this page
@@ -198,20 +198,19 @@
    assert(_result->as_register() == x10, "result must in x10");
    __ j(_continuation);
  }
  
  // Implementation of MonitorAccessStubs
- MonitorEnterStub::MonitorEnterStub(LIR_Opr obj_reg, LIR_Opr lock_reg, CodeEmitInfo* info)
- : MonitorAccessStub(obj_reg, lock_reg) {
+ MonitorEnterStub::MonitorEnterStub(LIR_Opr obj_reg, CodeEmitInfo* info)
+ : MonitorAccessStub(obj_reg) {
    _info = new CodeEmitInfo(info);
  }
  
  void MonitorEnterStub::emit_code(LIR_Assembler* ce) {
    assert(__ rsp_offset() == 0, "frame size should be fixed");
    __ bind(_entry);
-   ce->store_parameter(_obj_reg->as_register(),  1);
-   ce->store_parameter(_lock_reg->as_register(), 0);
+   ce->store_parameter(_obj_reg->as_register(),  0);
    Runtime1::StubID enter_id;
    if (ce->compilation()->has_fpu_code()) {
      enter_id = Runtime1::monitorenter_id;
    } else {
      enter_id = Runtime1::monitorenter_nofpu_id;

@@ -222,15 +221,11 @@
    __ j(_continuation);
  }
  
  void MonitorExitStub::emit_code(LIR_Assembler* ce) {
    __ bind(_entry);
-   if (_compute_lock) {
-     // lock_reg was destroyed by fast unlocking attempt => recompute it
-     ce->monitor_address(_monitor_ix, _lock_reg);
-   }
-   ce->store_parameter(_lock_reg->as_register(), 0);
+   ce->store_parameter(_obj_reg->as_register(), 0);
    // note: non-blocking leaf routine => no call info needed
    Runtime1::StubID exit_id;
    if (ce->compilation()->has_fpu_code()) {
      exit_id = Runtime1::monitorexit_id;
    } else {
< prev index next >