< prev index next >

src/hotspot/cpu/x86/templateTable_x86.cpp

Print this page




4091     // rdx must be > 0, no extra check needed here
4092 #endif
4093 
4094     // initialize remaining object fields: rdx was a multiple of 8
4095     { Label loop;
4096     __ bind(loop);
4097     __ movptr(Address(rax, rdx, Address::times_8, sizeof(oopDesc) - 1*oopSize), rcx);
4098     NOT_LP64(__ movptr(Address(rax, rdx, Address::times_8, sizeof(oopDesc) - 2*oopSize), rcx));
4099     __ decrement(rdx);
4100     __ jcc(Assembler::notZero, loop);
4101     }
4102 
4103     // initialize object header only.
4104     __ bind(initialize_header);
4105     if (UseBiasedLocking) {
4106       __ pop(rcx);   // get saved klass back in the register.
4107       __ movptr(rbx, Address(rcx, Klass::prototype_header_offset()));
4108       __ movptr(Address(rax, oopDesc::mark_offset_in_bytes ()), rbx);
4109     } else {
4110       __ movptr(Address(rax, oopDesc::mark_offset_in_bytes ()),
4111                 (intptr_t)markWord::prototype().value()); // header
4112       __ pop(rcx);   // get saved klass back in the register.
4113     }
4114 #ifdef _LP64
4115     __ xorl(rsi, rsi); // use zero reg to clear memory (shorter code)
4116     __ store_klass_gap(rax, rsi);  // zero klass gap for compressed oops
4117 #endif
4118     __ store_klass(rax, rcx);  // klass
4119 
4120     {
4121       SkipIfEqual skip_if(_masm, &DTraceAllocProbes, 0);
4122       // Trigger dtrace event for fastpath
4123       __ push(atos);
4124       __ call_VM_leaf(
4125            CAST_FROM_FN_PTR(address, SharedRuntime::dtrace_object_alloc), rax);
4126       __ pop(atos);
4127     }
4128 
4129     __ jmp(done);
4130   }
4131 




4091     // rdx must be > 0, no extra check needed here
4092 #endif
4093 
4094     // initialize remaining object fields: rdx was a multiple of 8
4095     { Label loop;
4096     __ bind(loop);
4097     __ movptr(Address(rax, rdx, Address::times_8, sizeof(oopDesc) - 1*oopSize), rcx);
4098     NOT_LP64(__ movptr(Address(rax, rdx, Address::times_8, sizeof(oopDesc) - 2*oopSize), rcx));
4099     __ decrement(rdx);
4100     __ jcc(Assembler::notZero, loop);
4101     }
4102 
4103     // initialize object header only.
4104     __ bind(initialize_header);
4105     if (UseBiasedLocking) {
4106       __ pop(rcx);   // get saved klass back in the register.
4107       __ movptr(rbx, Address(rcx, Klass::prototype_header_offset()));
4108       __ movptr(Address(rax, oopDesc::mark_offset_in_bytes ()), rbx);
4109     } else {
4110       __ movptr(Address(rax, oopDesc::mark_offset_in_bytes ()),
4111                 (intptr_t)markOopDesc::prototype()); // header
4112       __ pop(rcx);   // get saved klass back in the register.
4113     }
4114 #ifdef _LP64
4115     __ xorl(rsi, rsi); // use zero reg to clear memory (shorter code)
4116     __ store_klass_gap(rax, rsi);  // zero klass gap for compressed oops
4117 #endif
4118     __ store_klass(rax, rcx);  // klass
4119 
4120     {
4121       SkipIfEqual skip_if(_masm, &DTraceAllocProbes, 0);
4122       // Trigger dtrace event for fastpath
4123       __ push(atos);
4124       __ call_VM_leaf(
4125            CAST_FROM_FN_PTR(address, SharedRuntime::dtrace_object_alloc), rax);
4126       __ pop(atos);
4127     }
4128 
4129     __ jmp(done);
4130   }
4131 


< prev index next >