src/hotspot/cpu/x86/c1_Runtime1_x86.cpp
changeset 50693 db0a17475826
parent 50094 2f79462aab9b
child 51224 dd1aa4229fd4
equal deleted inserted replaced
50692:5b75d7485f2a 50693:db0a17475826
  1054 
  1054 
  1055           __ bind(try_eden);
  1055           __ bind(try_eden);
  1056           // get the instance size (size is postive so movl is fine for 64bit)
  1056           // get the instance size (size is postive so movl is fine for 64bit)
  1057           __ movl(obj_size, Address(klass, Klass::layout_helper_offset()));
  1057           __ movl(obj_size, Address(klass, Klass::layout_helper_offset()));
  1058 
  1058 
  1059           __ eden_allocate(obj, obj_size, 0, t1, slow_path);
  1059           __ eden_allocate(thread, obj, obj_size, 0, t1, slow_path);
  1060           __ incr_allocated_bytes(thread, obj_size, 0);
       
  1061 
  1060 
  1062           __ initialize_object(obj, klass, obj_size, 0, t1, t2, /* is_tlab_allocated */ false);
  1061           __ initialize_object(obj, klass, obj_size, 0, t1, t2, /* is_tlab_allocated */ false);
  1063           __ verify_oop(obj);
  1062           __ verify_oop(obj);
  1064           __ pop(rbx);
  1063           __ pop(rbx);
  1065           __ pop(rdi);
  1064           __ pop(rdi);
  1153           __ andptr(t1, Klass::_lh_header_size_mask);
  1152           __ andptr(t1, Klass::_lh_header_size_mask);
  1154           __ addptr(arr_size, t1);
  1153           __ addptr(arr_size, t1);
  1155           __ addptr(arr_size, MinObjAlignmentInBytesMask); // align up
  1154           __ addptr(arr_size, MinObjAlignmentInBytesMask); // align up
  1156           __ andptr(arr_size, ~MinObjAlignmentInBytesMask);
  1155           __ andptr(arr_size, ~MinObjAlignmentInBytesMask);
  1157 
  1156 
  1158           __ eden_allocate(obj, arr_size, 0, t1, slow_path);  // preserves arr_size
       
  1159 
       
  1160           // Using t2 for non 64-bit.
  1157           // Using t2 for non 64-bit.
  1161           const Register thread = NOT_LP64(t2) LP64_ONLY(r15_thread);
  1158           const Register thread = NOT_LP64(t2) LP64_ONLY(r15_thread);
  1162           NOT_LP64(__ get_thread(thread));
  1159           NOT_LP64(__ get_thread(thread));
  1163           __ incr_allocated_bytes(thread, arr_size, 0);
  1160           __ eden_allocate(thread, obj, arr_size, 0, t1, slow_path);  // preserves arr_size
  1164 
  1161 
  1165           __ initialize_header(obj, klass, length, t1, t2);
  1162           __ initialize_header(obj, klass, length, t1, t2);
  1166           __ movb(t1, Address(klass, in_bytes(Klass::layout_helper_offset()) + (Klass::_lh_header_size_shift / BitsPerByte)));
  1163           __ movb(t1, Address(klass, in_bytes(Klass::layout_helper_offset()) + (Klass::_lh_header_size_shift / BitsPerByte)));
  1167           assert(Klass::_lh_header_size_shift % BitsPerByte == 0, "bytewise");
  1164           assert(Klass::_lh_header_size_shift % BitsPerByte == 0, "bytewise");
  1168           assert(Klass::_lh_header_size_mask <= 0xFF, "bytewise");
  1165           assert(Klass::_lh_header_size_mask <= 0xFF, "bytewise");