< prev index next >

src/hotspot/cpu/x86/c1_LIRGenerator_x86.cpp

Print this page

 293 
 294 void LIRGenerator::array_store_check(LIR_Opr value, LIR_Opr array, CodeEmitInfo* store_check_info, ciMethod* profiled_method, int profiled_bci) {
 295   LIR_Opr tmp1 = new_register(objectType);
 296   LIR_Opr tmp2 = new_register(objectType);
 297   LIR_Opr tmp3 = new_register(objectType);
 298   __ store_check(value, array, tmp1, tmp2, tmp3, store_check_info, profiled_method, profiled_bci);
 299 }
 300 
 301 //----------------------------------------------------------------------
 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();
 343   value.load_item();
 344   LIR_Opr reg = rlock(x);
 345 
 346   LIR_Opr tmp = LIR_OprFact::illegalOpr;
 347 #ifdef _LP64
 348   if (UseAVX > 2 && !VM_Version::supports_avx512vl()) {
 349     if (x->type()->tag() == doubleTag) {
 350       tmp = new_register(T_DOUBLE);
 351       __ move(LIR_OprFact::doubleConst(-0.0), tmp);
 352     }
 353     else if (x->type()->tag() == floatTag) {
 354       tmp = new_register(T_FLOAT);
 355       __ move(LIR_OprFact::floatConst(-0.0), tmp);
 356     }

 293 
 294 void LIRGenerator::array_store_check(LIR_Opr value, LIR_Opr array, CodeEmitInfo* store_check_info, ciMethod* profiled_method, int profiled_bci) {
 295   LIR_Opr tmp1 = new_register(objectType);
 296   LIR_Opr tmp2 = new_register(objectType);
 297   LIR_Opr tmp3 = new_register(objectType);
 298   __ store_check(value, array, tmp1, tmp2, tmp3, store_check_info, profiled_method, profiled_bci);
 299 }
 300 
 301 //----------------------------------------------------------------------
 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_ADDRESS);
 314   LIR_Opr tmp1 = new_register(T_INT);
 315   LIR_Opr tmp2 = new_register(T_INT);
 316 
 317   CodeEmitInfo* info_for_exception = NULL;
 318   if (x->needs_null_check()) {
 319     info_for_exception = state_for(x);
 320   }
 321   // this CodeEmitInfo must not have the xhandlers because here the
 322   // object is already locked (xhandlers expect object to be unlocked)
 323   CodeEmitInfo* info = state_for(x, x->state(), true);
 324   monitor_enter(obj.result(), lock, syncTempOpr(), tmp1, tmp2,
 325                         x->monitor_no(), info_for_exception, info);
 326 }
 327 
 328 
 329 void LIRGenerator::do_MonitorExit(MonitorExit* x) {
 330   assert(x->is_pinned(),"");
 331 
 332   LIRItem obj(x->obj(), this);
 333   obj.dont_load_item();
 334 
 335   LIR_Opr lock = new_register(T_ADDRESS);
 336   LIR_Opr obj_temp = new_register(T_ADDRESS);
 337   LIR_Opr tmp = new_register(T_INT);
 338   set_no_result(x);
 339   monitor_exit(obj_temp, lock, syncTempOpr(), tmp, x->monitor_no());
 340 }
 341 
 342 // _ineg, _lneg, _fneg, _dneg
 343 void LIRGenerator::do_NegateOp(NegateOp* x) {
 344   LIRItem value(x->x(), this);
 345   value.set_destroys_register();
 346   value.load_item();
 347   LIR_Opr reg = rlock(x);
 348 
 349   LIR_Opr tmp = LIR_OprFact::illegalOpr;
 350 #ifdef _LP64
 351   if (UseAVX > 2 && !VM_Version::supports_avx512vl()) {
 352     if (x->type()->tag() == doubleTag) {
 353       tmp = new_register(T_DOUBLE);
 354       __ move(LIR_OprFact::doubleConst(-0.0), tmp);
 355     }
 356     else if (x->type()->tag() == floatTag) {
 357       tmp = new_register(T_FLOAT);
 358       __ move(LIR_OprFact::floatConst(-0.0), tmp);
 359     }
< prev index next >