< prev index next >

src/hotspot/cpu/riscv/templateTable_riscv.cpp

Print this page

3887                                                    // word from old location
3888      __ sd(c_rarg2, Address(c_rarg3, 0));          // and store it at new location
3889      __ add(c_rarg3, c_rarg3, wordSize);           // advance to next word
3890      __ bind(entry);
3891      __ bne(c_rarg3, c_rarg1, loop);    // check if bottom reached.if not at bottom
3892                                         // then copy next word
3893    }
3894 
3895    // call run-time routine
3896    // c_rarg1: points to monitor entry
3897    __ bind(allocated);
3898 
3899    // Increment bcp to point to the next bytecode, so exception
3900    // handling for async. exceptions work correctly.
3901    // The object has already been popped from the stack, so the
3902    // expression stack looks correct.
3903    __ addi(xbcp, xbcp, 1);
3904 
3905    // store object
3906    __ sd(x10, Address(c_rarg1, BasicObjectLock::obj_offset()));

3907    __ lock_object(c_rarg1);
3908 
3909    // check to make sure this monitor doesn't cause stack overflow after locking
3910    __ save_bcp();  // in case of exception
3911    __ generate_stack_overflow_check(0);
3912 
3913    // The bcp has already been incremented. Just need to dispatch to
3914    // next instruction.
3915    __ dispatch_next(vtos);
3916 }
3917 
3918 void TemplateTable::monitorexit() {
3919   transition(atos, vtos);
3920 
3921   // check for null object
3922   __ null_check(x10);
3923 
3924   const Address monitor_block_top(
3925         fp, frame::interpreter_frame_monitor_block_top_offset * wordSize);
3926   const Address monitor_block_bot(

3887                                                    // word from old location
3888      __ sd(c_rarg2, Address(c_rarg3, 0));          // and store it at new location
3889      __ add(c_rarg3, c_rarg3, wordSize);           // advance to next word
3890      __ bind(entry);
3891      __ bne(c_rarg3, c_rarg1, loop);    // check if bottom reached.if not at bottom
3892                                         // then copy next word
3893    }
3894 
3895    // call run-time routine
3896    // c_rarg1: points to monitor entry
3897    __ bind(allocated);
3898 
3899    // Increment bcp to point to the next bytecode, so exception
3900    // handling for async. exceptions work correctly.
3901    // The object has already been popped from the stack, so the
3902    // expression stack looks correct.
3903    __ addi(xbcp, xbcp, 1);
3904 
3905    // store object
3906    __ sd(x10, Address(c_rarg1, BasicObjectLock::obj_offset()));
3907 
3908    __ lock_object(c_rarg1);
3909 
3910    // check to make sure this monitor doesn't cause stack overflow after locking
3911    __ save_bcp();  // in case of exception
3912    __ generate_stack_overflow_check(0);
3913 
3914    // The bcp has already been incremented. Just need to dispatch to
3915    // next instruction.
3916    __ dispatch_next(vtos);
3917 }
3918 
3919 void TemplateTable::monitorexit() {
3920   transition(atos, vtos);
3921 
3922   // check for null object
3923   __ null_check(x10);
3924 
3925   const Address monitor_block_top(
3926         fp, frame::interpreter_frame_monitor_block_top_offset * wordSize);
3927   const Address monitor_block_bot(
< prev index next >