297 LIR_Opr tmp2 = new_register(objectType);
298 LIR_Opr tmp3 = new_register(objectType);
299 __ store_check(value, array, tmp1, tmp2, tmp3, store_check_info, profiled_method, profiled_bci);
300 }
301
302 //----------------------------------------------------------------------
303 // visitor functions
304 //----------------------------------------------------------------------
305
306 void LIRGenerator::do_MonitorEnter(MonitorEnter* x) {
307 assert(x->is_pinned(),"");
308 LIRItem obj(x->obj(), this);
309 obj.load_item();
310
311 set_no_result(x);
312
313 // "lock" stores the address of the monitor stack slot, so this is not an oop
314 LIR_Opr lock = new_register(T_INT);
315 // Need a scratch register for biased locking on x86
316 LIR_Opr scratch = LIR_OprFact::illegalOpr;
317 if (UseBiasedLocking) {
318 scratch = new_register(T_INT);
319 }
320
321 CodeEmitInfo* info_for_exception = NULL;
322 if (x->needs_null_check()) {
323 info_for_exception = state_for(x);
324 }
325 // this CodeEmitInfo must not have the xhandlers because here the
326 // object is already locked (xhandlers expect object to be unlocked)
327 CodeEmitInfo* info = state_for(x, x->state(), true);
328 monitor_enter(obj.result(), lock, syncTempOpr(), scratch,
329 x->monitor_no(), info_for_exception, info);
330 }
331
332
333 void LIRGenerator::do_MonitorExit(MonitorExit* x) {
334 assert(x->is_pinned(),"");
335
336 LIRItem obj(x->obj(), this);
337 obj.dont_load_item();
|
297 LIR_Opr tmp2 = new_register(objectType);
298 LIR_Opr tmp3 = new_register(objectType);
299 __ store_check(value, array, tmp1, tmp2, tmp3, store_check_info, profiled_method, profiled_bci);
300 }
301
302 //----------------------------------------------------------------------
303 // visitor functions
304 //----------------------------------------------------------------------
305
306 void LIRGenerator::do_MonitorEnter(MonitorEnter* x) {
307 assert(x->is_pinned(),"");
308 LIRItem obj(x->obj(), this);
309 obj.load_item();
310
311 set_no_result(x);
312
313 // "lock" stores the address of the monitor stack slot, so this is not an oop
314 LIR_Opr lock = new_register(T_INT);
315 // Need a scratch register for biased locking on x86
316 LIR_Opr scratch = LIR_OprFact::illegalOpr;
317 if (UseBiasedLocking || LockingMode == LM_LIGHTWEIGHT) {
318 scratch = new_register(T_INT);
319 }
320
321 CodeEmitInfo* info_for_exception = NULL;
322 if (x->needs_null_check()) {
323 info_for_exception = state_for(x);
324 }
325 // this CodeEmitInfo must not have the xhandlers because here the
326 // object is already locked (xhandlers expect object to be unlocked)
327 CodeEmitInfo* info = state_for(x, x->state(), true);
328 monitor_enter(obj.result(), lock, syncTempOpr(), scratch,
329 x->monitor_no(), info_for_exception, info);
330 }
331
332
333 void LIRGenerator::do_MonitorExit(MonitorExit* x) {
334 assert(x->is_pinned(),"");
335
336 LIRItem obj(x->obj(), this);
337 obj.dont_load_item();
|