< prev index next >

src/cpu/aarch64/vm/templateTable_aarch64.cpp

Print this page




3429 
3430     // Initialize object fields
3431     {
3432       __ add(r2, r0, sizeof(oopDesc));
3433       Label loop;
3434       __ bind(loop);
3435       __ str(zr, Address(__ post(r2, BytesPerLong)));
3436       __ sub(r3, r3, BytesPerLong);
3437       __ cbnz(r3, loop);
3438     }
3439 
3440     // initialize object header only.
3441     __ bind(initialize_header);
3442     if (UseBiasedLocking) {
3443       __ ldr(rscratch1, Address(r4, Klass::prototype_header_offset()));
3444     } else {
3445       __ mov(rscratch1, (intptr_t)markOopDesc::prototype());
3446     }
3447     __ str(rscratch1, Address(r0, oopDesc::mark_offset_in_bytes()));
3448     __ store_klass_gap(r0, zr);  // zero klass gap for compressed oops
3449     __ store_klass(r0, r4);      // store klass last
3450 
3451     {
3452       SkipIfEqual skip(_masm, &DTraceAllocProbes, false);
3453       // Trigger dtrace event for fastpath
3454       __ push(atos); // save the return value
3455       __ call_VM_leaf(
3456            CAST_FROM_FN_PTR(address, SharedRuntime::dtrace_object_alloc), r0);
3457       __ pop(atos); // restore the return value
3458 
3459     }
3460     __ b(done);
3461   }
3462 
3463   // slow case
3464   __ bind(slow_case);
3465   __ get_constant_pool(c_rarg1);
3466   __ get_unsigned_2_byte_index_at_bcp(c_rarg2, 1);
3467   call_VM(r0, CAST_FROM_FN_PTR(address, InterpreterRuntime::_new), c_rarg1, c_rarg2);
3468   __ verify_oop(r0);
3469 




3429 
3430     // Initialize object fields
3431     {
3432       __ add(r2, r0, sizeof(oopDesc));
3433       Label loop;
3434       __ bind(loop);
3435       __ str(zr, Address(__ post(r2, BytesPerLong)));
3436       __ sub(r3, r3, BytesPerLong);
3437       __ cbnz(r3, loop);
3438     }
3439 
3440     // initialize object header only.
3441     __ bind(initialize_header);
3442     if (UseBiasedLocking) {
3443       __ ldr(rscratch1, Address(r4, Klass::prototype_header_offset()));
3444     } else {
3445       __ mov(rscratch1, (intptr_t)markOopDesc::prototype());
3446     }
3447     __ str(rscratch1, Address(r0, oopDesc::mark_offset_in_bytes()));
3448     __ store_klass_gap(r0, zr);  // zero klass gap for compressed oops
3449     __ store_klass(r0, r4, rscratch1);      // store klass last
3450 
3451     {
3452       SkipIfEqual skip(_masm, &DTraceAllocProbes, false);
3453       // Trigger dtrace event for fastpath
3454       __ push(atos); // save the return value
3455       __ call_VM_leaf(
3456            CAST_FROM_FN_PTR(address, SharedRuntime::dtrace_object_alloc), r0);
3457       __ pop(atos); // restore the return value
3458 
3459     }
3460     __ b(done);
3461   }
3462 
3463   // slow case
3464   __ bind(slow_case);
3465   __ get_constant_pool(c_rarg1);
3466   __ get_unsigned_2_byte_index_at_bcp(c_rarg2, 1);
3467   call_VM(r0, CAST_FROM_FN_PTR(address, InterpreterRuntime::_new), c_rarg1, c_rarg2);
3468   __ verify_oop(r0);
3469 


< prev index next >