< prev index next >

src/hotspot/cpu/aarch64/c1_LIRGenerator_aarch64.cpp

Print this page

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

 343   set_no_result(x);
 344   monitor_exit(obj_temp, lock, syncTempOpr(), LIR_OprFact::illegalOpr, x->monitor_no());
 345 }
 346 
 347 
 348 void LIRGenerator::do_NegateOp(NegateOp* x) {
 349 
 350   LIRItem from(x->x(), this);
 351   from.load_item();
 352   LIR_Opr result = rlock_result(x);
 353   __ negate (from.result(), result);
 354 
 355 }
 356 
 357 // for  _fadd, _fmul, _fsub, _fdiv, _frem
 358 //      _dadd, _dmul, _dsub, _ddiv, _drem
 359 void LIRGenerator::do_ArithmeticOp_FPU(ArithmeticOp* x) {
 360 
 361   if (x->op() == Bytecodes::_frem || x->op() == Bytecodes::_drem) {
 362     // float remainder is implemented as a direct call into the runtime
 363     LIRItem right(x->x(), this);
 364     LIRItem left(x->y(), this);

 297 void LIRGenerator::array_store_check(LIR_Opr value, LIR_Opr array, CodeEmitInfo* store_check_info, ciMethod* profiled_method, int profiled_bci) {
 298     LIR_Opr tmp1 = new_register(objectType);
 299     LIR_Opr tmp2 = new_register(objectType);
 300     LIR_Opr tmp3 = new_register(objectType);
 301     __ store_check(value, array, tmp1, tmp2, tmp3, store_check_info, profiled_method, profiled_bci);
 302 }
 303 
 304 //----------------------------------------------------------------------
 305 //             visitor functions
 306 //----------------------------------------------------------------------
 307 
 308 void LIRGenerator::do_MonitorEnter(MonitorEnter* x) {
 309   assert(x->is_pinned(),"");
 310   LIRItem obj(x->obj(), this);
 311   obj.load_item();
 312 
 313   set_no_result(x);
 314 
 315   // "lock" stores the address of the monitor stack slot, so this is not an oop
 316   LIR_Opr lock = new_register(T_INT);
 317   LIR_Opr scratch = new_register(T_INT);




 318 
 319   CodeEmitInfo* info_for_exception = NULL;
 320   if (x->needs_null_check()) {
 321     info_for_exception = state_for(x);
 322   }
 323   // this CodeEmitInfo must not have the xhandlers because here the
 324   // object is already locked (xhandlers expect object to be unlocked)
 325   CodeEmitInfo* info = state_for(x, x->state(), true);
 326   monitor_enter(obj.result(), lock, syncTempOpr(), scratch,
 327                         x->monitor_no(), info_for_exception, info);
 328 }
 329 
 330 
 331 void LIRGenerator::do_MonitorExit(MonitorExit* x) {
 332   assert(x->is_pinned(),"");
 333 
 334   LIRItem obj(x->obj(), this);
 335   obj.dont_load_item();
 336 
 337   LIR_Opr lock = new_register(T_INT);
 338   LIR_Opr obj_temp = new_register(T_INT);
 339   LIR_Opr scratch = new_register(T_INT);
 340   set_no_result(x);
 341   monitor_exit(obj_temp, lock, syncTempOpr(), scratch, x->monitor_no());
 342 }
 343 
 344 
 345 void LIRGenerator::do_NegateOp(NegateOp* x) {
 346 
 347   LIRItem from(x->x(), this);
 348   from.load_item();
 349   LIR_Opr result = rlock_result(x);
 350   __ negate (from.result(), result);
 351 
 352 }
 353 
 354 // for  _fadd, _fmul, _fsub, _fdiv, _frem
 355 //      _dadd, _dmul, _dsub, _ddiv, _drem
 356 void LIRGenerator::do_ArithmeticOp_FPU(ArithmeticOp* x) {
 357 
 358   if (x->op() == Bytecodes::_frem || x->op() == Bytecodes::_drem) {
 359     // float remainder is implemented as a direct call into the runtime
 360     LIRItem right(x->x(), this);
 361     LIRItem left(x->y(), this);
< prev index next >