< prev index next >

src/hotspot/cpu/arm/templateTable_arm.cpp

Print this page
rev 49264 : [mq]: event-only


4380 
4381   // Allocate the instance:
4382   //  If TLAB is enabled:
4383   //    Try to allocate in the TLAB.
4384   //    If fails, go to the slow path.
4385   //  Else If inline contiguous allocations are enabled:
4386   //    Try to allocate in eden.
4387   //    If fails due to heap end, go to slow path.
4388   //
4389   //  If TLAB is enabled OR inline contiguous is enabled:
4390   //    Initialize the allocation.
4391   //    Exit.
4392   //
4393   //  Go to slow path.
4394   if (UseTLAB) {
4395     const Register Rtlab_top = R1_tmp;
4396     const Register Rtlab_end = R2_tmp;
4397     assert_different_registers(Robj, Rsize, Rklass, Rtlab_top, Rtlab_end);
4398 
4399     __ ldr(Robj, Address(Rthread, JavaThread::tlab_top_offset()));
4400     __ ldr(Rtlab_end, Address(Rthread, in_bytes(JavaThread::tlab_end_offset())));
4401     __ add(Rtlab_top, Robj, Rsize);
4402     __ cmp(Rtlab_top, Rtlab_end);
4403     __ b(slow_case, hi);
4404     __ str(Rtlab_top, Address(Rthread, JavaThread::tlab_top_offset()));
4405     if (ZeroTLAB) {
4406       // the fields have been already cleared
4407       __ b(initialize_header);
4408     } else {
4409       // initialize both the header and fields
4410       __ b(initialize_object);
4411     }
4412   } else {
4413     // Allocation in the shared Eden, if allowed.
4414     if (allow_shared_alloc) {
4415       const Register Rheap_top_addr = R2_tmp;
4416       const Register Rheap_top = R5_tmp;
4417       const Register Rheap_end = Rtemp;
4418       assert_different_registers(Robj, Rklass, Rsize, Rheap_top_addr, Rheap_top, Rheap_end, LR);
4419 
4420       // heap_end now (re)loaded in the loop since also used as a scratch register in the CAS




4380 
4381   // Allocate the instance:
4382   //  If TLAB is enabled:
4383   //    Try to allocate in the TLAB.
4384   //    If fails, go to the slow path.
4385   //  Else If inline contiguous allocations are enabled:
4386   //    Try to allocate in eden.
4387   //    If fails due to heap end, go to slow path.
4388   //
4389   //  If TLAB is enabled OR inline contiguous is enabled:
4390   //    Initialize the allocation.
4391   //    Exit.
4392   //
4393   //  Go to slow path.
4394   if (UseTLAB) {
4395     const Register Rtlab_top = R1_tmp;
4396     const Register Rtlab_end = R2_tmp;
4397     assert_different_registers(Robj, Rsize, Rklass, Rtlab_top, Rtlab_end);
4398 
4399     __ ldr(Robj, Address(Rthread, JavaThread::tlab_top_offset()));
4400     __ ldr(Rtlab_end, Address(Rthread, in_bytes(JavaThread::tlab_current_end_offset())));
4401     __ add(Rtlab_top, Robj, Rsize);
4402     __ cmp(Rtlab_top, Rtlab_end);
4403     __ b(slow_case, hi);
4404     __ str(Rtlab_top, Address(Rthread, JavaThread::tlab_top_offset()));
4405     if (ZeroTLAB) {
4406       // the fields have been already cleared
4407       __ b(initialize_header);
4408     } else {
4409       // initialize both the header and fields
4410       __ b(initialize_object);
4411     }
4412   } else {
4413     // Allocation in the shared Eden, if allowed.
4414     if (allow_shared_alloc) {
4415       const Register Rheap_top_addr = R2_tmp;
4416       const Register Rheap_top = R5_tmp;
4417       const Register Rheap_end = Rtemp;
4418       assert_different_registers(Robj, Rklass, Rsize, Rheap_top_addr, Rheap_top, Rheap_end, LR);
4419 
4420       // heap_end now (re)loaded in the loop since also used as a scratch register in the CAS


< prev index next >