src/hotspot/cpu/aarch64/c1_Runtime1_aarch64.cpp
changeset 49032 c1353f585fc3
parent 49018 f7caa2aecc86
child 49164 7e958a8ebcd3
equal deleted inserted replaced
49031:e4a0cc16b050 49032:c1353f585fc3
   689           Register obj_size = r2;
   689           Register obj_size = r2;
   690           Register t1       = r19;
   690           Register t1       = r19;
   691           Register t2       = r4;
   691           Register t2       = r4;
   692           assert_different_registers(klass, obj, obj_size, t1, t2);
   692           assert_different_registers(klass, obj, obj_size, t1, t2);
   693 
   693 
       
   694           __ stp(r19, zr, Address(__ pre(sp, -2 * wordSize)));
       
   695 
   694           if (id == fast_new_instance_init_check_id) {
   696           if (id == fast_new_instance_init_check_id) {
   695             // make sure the klass is initialized
   697             // make sure the klass is initialized
   696             __ ldrb(rscratch1, Address(klass, InstanceKlass::init_state_offset()));
   698             __ ldrb(rscratch1, Address(klass, InstanceKlass::init_state_offset()));
   697             __ cmpw(rscratch1, InstanceKlass::fully_initialized);
   699             __ cmpw(rscratch1, InstanceKlass::fully_initialized);
   698             __ br(Assembler::NE, slow_path);
   700             __ br(Assembler::NE, slow_path);
   715 #endif // ASSERT
   717 #endif // ASSERT
   716 
   718 
   717           // get the instance size (size is postive so movl is fine for 64bit)
   719           // get the instance size (size is postive so movl is fine for 64bit)
   718           __ ldrw(obj_size, Address(klass, Klass::layout_helper_offset()));
   720           __ ldrw(obj_size, Address(klass, Klass::layout_helper_offset()));
   719 
   721 
   720           __ str(r19, Address(__ pre(sp, -wordSize)));
       
   721 
       
   722           __ eden_allocate(obj, obj_size, 0, t1, slow_path);
   722           __ eden_allocate(obj, obj_size, 0, t1, slow_path);
   723           __ incr_allocated_bytes(rthread, obj_size, 0, rscratch1);
   723           __ incr_allocated_bytes(rthread, obj_size, 0, rscratch1);
   724 
   724 
   725           __ initialize_object(obj, klass, obj_size, 0, t1, t2, /* is_tlab_allocated */ false);
   725           __ initialize_object(obj, klass, obj_size, 0, t1, t2, /* is_tlab_allocated */ false);
   726           __ verify_oop(obj);
   726           __ verify_oop(obj);
   727           __ ldr(r19, Address(__ post(sp, wordSize)));
   727           __ ldp(r19, zr, Address(__ post(sp, 2 * wordSize)));
   728           __ ret(lr);
   728           __ ret(lr);
   729 
   729 
   730           __ bind(slow_path);
   730           __ bind(slow_path);
   731           __ ldr(r19, Address(__ post(sp, wordSize)));
   731           __ ldp(r19, zr, Address(__ post(sp, 2 * wordSize)));
   732         }
   732         }
   733 
   733 
   734         __ enter();
   734         __ enter();
   735         OopMap* map = save_live_registers(sasm);
   735         OopMap* map = save_live_registers(sasm);
   736         int call_offset = __ call_RT(obj, noreg, CAST_FROM_FN_PTR(address, new_instance), klass);
   736         int call_offset = __ call_RT(obj, noreg, CAST_FROM_FN_PTR(address, new_instance), klass);