< prev index next >

src/hotspot/cpu/riscv/c1_LIRGenerator_riscv.cpp

Print this page

 259 void LIRGenerator::array_store_check(LIR_Opr value, LIR_Opr array, CodeEmitInfo* store_check_info,
 260                                      ciMethod* profiled_method, int profiled_bci) {
 261     LIR_Opr tmp1 = new_register(objectType);
 262     LIR_Opr tmp2 = new_register(objectType);
 263     LIR_Opr tmp3 = new_register(objectType);
 264     __ store_check(value, array, tmp1, tmp2, tmp3, store_check_info, profiled_method, profiled_bci);
 265 }
 266 
 267 //----------------------------------------------------------------------
 268 //             visitor functions
 269 //----------------------------------------------------------------------
 270 
 271 void LIRGenerator::do_MonitorEnter(MonitorEnter* x) {
 272   assert(x->is_pinned(), "");
 273   LIRItem obj(x->obj(), this);
 274   obj.load_item();
 275 
 276   set_no_result(x);
 277 
 278   // "lock" stores the address of the monitor stack slot, so this is not an oop
 279   LIR_Opr lock = new_register(T_INT);
 280 
 281   CodeEmitInfo* info_for_exception = NULL;
 282   if (x->needs_null_check()) {
 283     info_for_exception = state_for(x);
 284   }
 285   // this CodeEmitInfo must not have the xhandlers because here the
 286   // object is already locked (xhandlers expect object to be unlocked)
 287   CodeEmitInfo* info = state_for(x, x->state(), true);
 288   monitor_enter(obj.result(), lock, syncTempOpr(), LIR_OprFact::illegalOpr,
 289                 x->monitor_no(), info_for_exception, info);
 290 }
 291 
 292 void LIRGenerator::do_MonitorExit(MonitorExit* x) {
 293   assert(x->is_pinned(), "");
 294 
 295   LIRItem obj(x->obj(), this);
 296   obj.dont_load_item();
 297 
 298   LIR_Opr lock = new_register(T_INT);
 299   LIR_Opr obj_temp = new_register(T_INT);
 300   set_no_result(x);
 301   monitor_exit(obj_temp, lock, syncTempOpr(), LIR_OprFact::illegalOpr, x->monitor_no());
 302 }
 303 
 304 // neg
 305 void LIRGenerator::do_NegateOp(NegateOp* x) {
 306   LIRItem from(x->x(), this);
 307   from.load_item();
 308   LIR_Opr result = rlock_result(x);
 309   __ negate(from.result(), result);
 310 }
 311 
 312 // for  _fadd, _fmul, _fsub, _fdiv, _frem
 313 //      _dadd, _dmul, _dsub, _ddiv, _drem
 314 void LIRGenerator::do_ArithmeticOp_FPU(ArithmeticOp* x) {
 315   LIRItem left(x->x(), this);
 316   LIRItem right(x->y(), this);
 317 
 318   if (x->op() == Bytecodes::_frem || x->op() == Bytecodes::_drem) {
 319 
 320     // float remainder is implemented as a direct call into the runtime
 321     BasicTypeList signature(2);

 259 void LIRGenerator::array_store_check(LIR_Opr value, LIR_Opr array, CodeEmitInfo* store_check_info,
 260                                      ciMethod* profiled_method, int profiled_bci) {
 261     LIR_Opr tmp1 = new_register(objectType);
 262     LIR_Opr tmp2 = new_register(objectType);
 263     LIR_Opr tmp3 = new_register(objectType);
 264     __ store_check(value, array, tmp1, tmp2, tmp3, store_check_info, profiled_method, profiled_bci);
 265 }
 266 
 267 //----------------------------------------------------------------------
 268 //             visitor functions
 269 //----------------------------------------------------------------------
 270 
 271 void LIRGenerator::do_MonitorEnter(MonitorEnter* x) {
 272   assert(x->is_pinned(), "");
 273   LIRItem obj(x->obj(), this);
 274   obj.load_item();
 275 
 276   set_no_result(x);
 277 
 278   // "lock" stores the address of the monitor stack slot, so this is not an oop
 279   LIR_Opr lock = new_register(T_ADDRESS);
 280 
 281   CodeEmitInfo* info_for_exception = NULL;
 282   if (x->needs_null_check()) {
 283     info_for_exception = state_for(x);
 284   }
 285   // this CodeEmitInfo must not have the xhandlers because here the
 286   // object is already locked (xhandlers expect object to be unlocked)
 287   CodeEmitInfo* info = state_for(x, x->state(), true);
 288   monitor_enter(obj.result(), lock, syncTempOpr(), new_register(T_INT), new_register(T_INT),
 289                 x->monitor_no(), info_for_exception, info);
 290 }
 291 
 292 void LIRGenerator::do_MonitorExit(MonitorExit* x) {
 293   assert(x->is_pinned(), "");
 294 
 295   LIRItem obj(x->obj(), this);
 296   obj.dont_load_item();
 297 
 298   LIR_Opr lock = new_register(T_ADDRESS);
 299   LIR_Opr obj_temp = new_register(T_INT);
 300   set_no_result(x);
 301   monitor_exit(obj_temp, lock, syncTempOpr(), new_register(T_INT), x->monitor_no());
 302 }
 303 
 304 // neg
 305 void LIRGenerator::do_NegateOp(NegateOp* x) {
 306   LIRItem from(x->x(), this);
 307   from.load_item();
 308   LIR_Opr result = rlock_result(x);
 309   __ negate(from.result(), result);
 310 }
 311 
 312 // for  _fadd, _fmul, _fsub, _fdiv, _frem
 313 //      _dadd, _dmul, _dsub, _ddiv, _drem
 314 void LIRGenerator::do_ArithmeticOp_FPU(ArithmeticOp* x) {
 315   LIRItem left(x->x(), this);
 316   LIRItem right(x->y(), this);
 317 
 318   if (x->op() == Bytecodes::_frem || x->op() == Bytecodes::_drem) {
 319 
 320     // float remainder is implemented as a direct call into the runtime
 321     BasicTypeList signature(2);
< prev index next >