< prev index next >

src/hotspot/cpu/aarch64/templateTable_aarch64.cpp

Print this page

3845     __ bind(entry);
3846     __ cmp(c_rarg3, c_rarg1);        // check if bottom reached
3847     __ br(Assembler::NE, loop);      // if not at bottom then
3848                                      // copy next word
3849   }
3850 
3851   // call run-time routine
3852   // c_rarg1: points to monitor entry
3853   __ bind(allocated);
3854 
3855   // Increment bcp to point to the next bytecode, so exception
3856   // handling for async. exceptions work correctly.
3857   // The object has already been poped from the stack, so the
3858   // expression stack looks correct.
3859   __ increment(rbcp);
3860 
3861   // store object
3862   __ str(r0, Address(c_rarg1, BasicObjectLock::obj_offset_in_bytes()));
3863   __ lock_object(c_rarg1);
3864 



3865   // check to make sure this monitor doesn't cause stack overflow after locking
3866   __ save_bcp();  // in case of exception
3867   __ generate_stack_overflow_check(0);
3868 
3869   // The bcp has already been incremented. Just need to dispatch to
3870   // next instruction.
3871   __ dispatch_next(vtos);
3872 }
3873 
3874 
3875 void TemplateTable::monitorexit()
3876 {
3877   transition(atos, vtos);
3878 
3879   // check for NULL object
3880   __ null_check(r0);
3881 
3882   const Address monitor_block_top(
3883         rfp, frame::interpreter_frame_monitor_block_top_offset * wordSize);
3884   const Address monitor_block_bot(

3903     // if same object then stop searching
3904     __ br(Assembler::EQ, found);
3905     // otherwise advance to next entry
3906     __ add(c_rarg1, c_rarg1, entry_size);
3907     __ bind(entry);
3908     // check if bottom reached
3909     __ cmp(c_rarg1, c_rarg2);
3910     // if not at bottom then check this entry
3911     __ br(Assembler::NE, loop);
3912   }
3913 
3914   // error handling. Unlocking was not block-structured
3915   __ call_VM(noreg, CAST_FROM_FN_PTR(address,
3916                    InterpreterRuntime::throw_illegal_monitor_state_exception));
3917   __ should_not_reach_here();
3918 
3919   // call run-time routine
3920   __ bind(found);
3921   __ push_ptr(r0); // make sure object is on stack (contract with oopMaps)
3922   __ unlock_object(c_rarg1);

3923   __ pop_ptr(r0); // discard object
3924 }
3925 
3926 
3927 // Wide instructions
3928 void TemplateTable::wide()
3929 {
3930   __ load_unsigned_byte(r19, at_bcp(1));
3931   __ mov(rscratch1, (address)Interpreter::_wentry_point);
3932   __ ldr(rscratch1, Address(rscratch1, r19, Address::uxtw(3)));
3933   __ br(rscratch1);
3934 }
3935 
3936 
3937 // Multi arrays
3938 void TemplateTable::multianewarray() {
3939   transition(vtos, atos);
3940   __ load_unsigned_byte(r0, at_bcp(3)); // get number of dimensions
3941   // last dim is on top of stack; we want address of first one:
3942   // first_addr = last_addr + (ndims - 1) * wordSize

3845     __ bind(entry);
3846     __ cmp(c_rarg3, c_rarg1);        // check if bottom reached
3847     __ br(Assembler::NE, loop);      // if not at bottom then
3848                                      // copy next word
3849   }
3850 
3851   // call run-time routine
3852   // c_rarg1: points to monitor entry
3853   __ bind(allocated);
3854 
3855   // Increment bcp to point to the next bytecode, so exception
3856   // handling for async. exceptions work correctly.
3857   // The object has already been poped from the stack, so the
3858   // expression stack looks correct.
3859   __ increment(rbcp);
3860 
3861   // store object
3862   __ str(r0, Address(c_rarg1, BasicObjectLock::obj_offset_in_bytes()));
3863   __ lock_object(c_rarg1);
3864 
3865   // The object is stored so counter should be increased even if stackoverflow is generated
3866   __ inc_held_monitor_count(rthread);
3867 
3868   // check to make sure this monitor doesn't cause stack overflow after locking
3869   __ save_bcp();  // in case of exception
3870   __ generate_stack_overflow_check(0);
3871 
3872   // The bcp has already been incremented. Just need to dispatch to
3873   // next instruction.
3874   __ dispatch_next(vtos);
3875 }
3876 
3877 
3878 void TemplateTable::monitorexit()
3879 {
3880   transition(atos, vtos);
3881 
3882   // check for NULL object
3883   __ null_check(r0);
3884 
3885   const Address monitor_block_top(
3886         rfp, frame::interpreter_frame_monitor_block_top_offset * wordSize);
3887   const Address monitor_block_bot(

3906     // if same object then stop searching
3907     __ br(Assembler::EQ, found);
3908     // otherwise advance to next entry
3909     __ add(c_rarg1, c_rarg1, entry_size);
3910     __ bind(entry);
3911     // check if bottom reached
3912     __ cmp(c_rarg1, c_rarg2);
3913     // if not at bottom then check this entry
3914     __ br(Assembler::NE, loop);
3915   }
3916 
3917   // error handling. Unlocking was not block-structured
3918   __ call_VM(noreg, CAST_FROM_FN_PTR(address,
3919                    InterpreterRuntime::throw_illegal_monitor_state_exception));
3920   __ should_not_reach_here();
3921 
3922   // call run-time routine
3923   __ bind(found);
3924   __ push_ptr(r0); // make sure object is on stack (contract with oopMaps)
3925   __ unlock_object(c_rarg1);
3926   __ dec_held_monitor_count(rthread);
3927   __ pop_ptr(r0); // discard object
3928 }
3929 
3930 
3931 // Wide instructions
3932 void TemplateTable::wide()
3933 {
3934   __ load_unsigned_byte(r19, at_bcp(1));
3935   __ mov(rscratch1, (address)Interpreter::_wentry_point);
3936   __ ldr(rscratch1, Address(rscratch1, r19, Address::uxtw(3)));
3937   __ br(rscratch1);
3938 }
3939 
3940 
3941 // Multi arrays
3942 void TemplateTable::multianewarray() {
3943   transition(vtos, atos);
3944   __ load_unsigned_byte(r0, at_bcp(3)); // get number of dimensions
3945   // last dim is on top of stack; we want address of first one:
3946   // first_addr = last_addr + (ndims - 1) * wordSize
< prev index next >