< prev index next >

src/hotspot/cpu/x86/c1_LIRGenerator_x86.cpp

Print this page
*** 308,34 ***
    obj.load_item();
  
    set_no_result(x);
  
    // "lock" stores the address of the monitor stack slot, so this is not an oop
!   LIR_Opr lock = new_register(T_INT);
  
    CodeEmitInfo* info_for_exception = NULL;
    if (x->needs_null_check()) {
      info_for_exception = state_for(x);
    }
    // this CodeEmitInfo must not have the xhandlers because here the
    // object is already locked (xhandlers expect object to be unlocked)
    CodeEmitInfo* info = state_for(x, x->state(), true);
!   monitor_enter(obj.result(), lock, syncTempOpr(), LIR_OprFact::illegalOpr,
                          x->monitor_no(), info_for_exception, info);
  }
  
  
  void LIRGenerator::do_MonitorExit(MonitorExit* x) {
    assert(x->is_pinned(),"");
  
    LIRItem obj(x->obj(), this);
    obj.dont_load_item();
  
!   LIR_Opr lock = new_register(T_INT);
!   LIR_Opr obj_temp = new_register(T_INT);
    set_no_result(x);
!   monitor_exit(obj_temp, lock, syncTempOpr(), LIR_OprFact::illegalOpr, x->monitor_no());
  }
  
  // _ineg, _lneg, _fneg, _dneg
  void LIRGenerator::do_NegateOp(NegateOp* x) {
    LIRItem value(x->x(), this);
--- 308,37 ---
    obj.load_item();
  
    set_no_result(x);
  
    // "lock" stores the address of the monitor stack slot, so this is not an oop
!   LIR_Opr lock = new_register(T_ADDRESS);
+   LIR_Opr tmp1 = new_register(T_INT);
+   LIR_Opr tmp2 = new_register(T_INT);
  
    CodeEmitInfo* info_for_exception = NULL;
    if (x->needs_null_check()) {
      info_for_exception = state_for(x);
    }
    // this CodeEmitInfo must not have the xhandlers because here the
    // object is already locked (xhandlers expect object to be unlocked)
    CodeEmitInfo* info = state_for(x, x->state(), true);
!   monitor_enter(obj.result(), lock, syncTempOpr(), tmp1, tmp2,
                          x->monitor_no(), info_for_exception, info);
  }
  
  
  void LIRGenerator::do_MonitorExit(MonitorExit* x) {
    assert(x->is_pinned(),"");
  
    LIRItem obj(x->obj(), this);
    obj.dont_load_item();
  
!   LIR_Opr lock = new_register(T_ADDRESS);
!   LIR_Opr obj_temp = new_register(T_ADDRESS);
+   LIR_Opr tmp = new_register(T_INT);
    set_no_result(x);
!   monitor_exit(obj_temp, lock, syncTempOpr(), tmp, x->monitor_no());
  }
  
  // _ineg, _lneg, _fneg, _dneg
  void LIRGenerator::do_NegateOp(NegateOp* x) {
    LIRItem value(x->x(), this);
< prev index next >