< prev index next >

src/hotspot/cpu/aarch64/c1_LIRGenerator_aarch64.cpp

Print this page

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

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