302 // visitor functions
303 //----------------------------------------------------------------------
304
305 void LIRGenerator::do_MonitorEnter(MonitorEnter* x) {
306 assert(x->is_pinned(),"");
307 LIRItem obj(x->obj(), this);
308 obj.load_item();
309
310 set_no_result(x);
311
312 // "lock" stores the address of the monitor stack slot, so this is not an oop
313 LIR_Opr lock = new_register(T_INT);
314
315 CodeEmitInfo* info_for_exception = NULL;
316 if (x->needs_null_check()) {
317 info_for_exception = state_for(x);
318 }
319 // this CodeEmitInfo must not have the xhandlers because here the
320 // object is already locked (xhandlers expect object to be unlocked)
321 CodeEmitInfo* info = state_for(x, x->state(), true);
322 monitor_enter(obj.result(), lock, syncTempOpr(), LIR_OprFact::illegalOpr,
323 x->monitor_no(), info_for_exception, info);
324 }
325
326
327 void LIRGenerator::do_MonitorExit(MonitorExit* x) {
328 assert(x->is_pinned(),"");
329
330 LIRItem obj(x->obj(), this);
331 obj.dont_load_item();
332
333 LIR_Opr lock = new_register(T_INT);
334 LIR_Opr obj_temp = new_register(T_INT);
335 set_no_result(x);
336 monitor_exit(obj_temp, lock, syncTempOpr(), LIR_OprFact::illegalOpr, x->monitor_no());
337 }
338
339 // _ineg, _lneg, _fneg, _dneg
340 void LIRGenerator::do_NegateOp(NegateOp* x) {
341 LIRItem value(x->x(), this);
342 value.set_destroys_register();
|
302 // visitor functions
303 //----------------------------------------------------------------------
304
305 void LIRGenerator::do_MonitorEnter(MonitorEnter* x) {
306 assert(x->is_pinned(),"");
307 LIRItem obj(x->obj(), this);
308 obj.load_item();
309
310 set_no_result(x);
311
312 // "lock" stores the address of the monitor stack slot, so this is not an oop
313 LIR_Opr lock = new_register(T_INT);
314
315 CodeEmitInfo* info_for_exception = NULL;
316 if (x->needs_null_check()) {
317 info_for_exception = state_for(x);
318 }
319 // this CodeEmitInfo must not have the xhandlers because here the
320 // object is already locked (xhandlers expect object to be unlocked)
321 CodeEmitInfo* info = state_for(x, x->state(), true);
322 LIR_Opr tmp = UseFastLocking ? new_register(T_INT) : LIR_OprFact::illegalOpr;
323 monitor_enter(obj.result(), lock, syncTempOpr(), tmp,
324 x->monitor_no(), info_for_exception, info);
325 }
326
327
328 void LIRGenerator::do_MonitorExit(MonitorExit* x) {
329 assert(x->is_pinned(),"");
330
331 LIRItem obj(x->obj(), this);
332 obj.dont_load_item();
333
334 LIR_Opr lock = new_register(T_INT);
335 LIR_Opr obj_temp = new_register(T_INT);
336 set_no_result(x);
337 monitor_exit(obj_temp, lock, syncTempOpr(), LIR_OprFact::illegalOpr, x->monitor_no());
338 }
339
340 // _ineg, _lneg, _fneg, _dneg
341 void LIRGenerator::do_NegateOp(NegateOp* x) {
342 LIRItem value(x->x(), this);
343 value.set_destroys_register();
|