< prev index next >

src/hotspot/cpu/aarch64/c1_MacroAssembler_aarch64.cpp

Print this page
rev 50637 : [mq]: JDK-8205336.patch
rev 50638 : [mq]: JDK-8205336-01.patch


 149   // the displaced header, get the object header instead
 150   // if the object header was not pointing to the displaced header,
 151   // we do unlocking via runtime call
 152   if (hdr_offset) {
 153     lea(rscratch1, Address(obj, hdr_offset));
 154     cmpxchgptr(disp_hdr, hdr, rscratch1, rscratch2, done, &slow_case);
 155   } else {
 156     cmpxchgptr(disp_hdr, hdr, obj, rscratch2, done, &slow_case);
 157   }
 158   // done
 159   bind(done);
 160 }
 161 
 162 
 163 // Defines obj, preserves var_size_in_bytes
 164 void C1_MacroAssembler::try_allocate(Register obj, Register var_size_in_bytes, int con_size_in_bytes, Register t1, Register t2, Label& slow_case) {
 165   if (UseTLAB) {
 166     tlab_allocate(obj, var_size_in_bytes, con_size_in_bytes, t1, t2, slow_case);
 167   } else {
 168     eden_allocate(obj, var_size_in_bytes, con_size_in_bytes, t1, slow_case);
 169     incr_allocated_bytes(noreg, var_size_in_bytes, con_size_in_bytes, t1);
 170   }
 171 }
 172 
 173 void C1_MacroAssembler::initialize_header(Register obj, Register klass, Register len, Register t1, Register t2) {
 174   assert_different_registers(obj, klass, len);
 175   if (UseBiasedLocking && !len->is_valid()) {
 176     assert_different_registers(obj, klass, len, t1, t2);
 177     ldr(t1, Address(klass, Klass::prototype_header_offset()));
 178   } else {
 179     // This assumes that all prototype bits fit in an int32_t
 180     mov(t1, (int32_t)(intptr_t)markOopDesc::prototype());
 181   }
 182   str(t1, Address(obj, oopDesc::mark_offset_in_bytes()));
 183 
 184   if (UseCompressedClassPointers) { // Take care not to kill klass
 185     encode_klass_not_null(t1, klass);
 186     strw(t1, Address(obj, oopDesc::klass_offset_in_bytes()));
 187   } else {
 188     str(klass, Address(obj, oopDesc::klass_offset_in_bytes()));
 189   }




 149   // the displaced header, get the object header instead
 150   // if the object header was not pointing to the displaced header,
 151   // we do unlocking via runtime call
 152   if (hdr_offset) {
 153     lea(rscratch1, Address(obj, hdr_offset));
 154     cmpxchgptr(disp_hdr, hdr, rscratch1, rscratch2, done, &slow_case);
 155   } else {
 156     cmpxchgptr(disp_hdr, hdr, obj, rscratch2, done, &slow_case);
 157   }
 158   // done
 159   bind(done);
 160 }
 161 
 162 
 163 // Defines obj, preserves var_size_in_bytes
 164 void C1_MacroAssembler::try_allocate(Register obj, Register var_size_in_bytes, int con_size_in_bytes, Register t1, Register t2, Label& slow_case) {
 165   if (UseTLAB) {
 166     tlab_allocate(obj, var_size_in_bytes, con_size_in_bytes, t1, t2, slow_case);
 167   } else {
 168     eden_allocate(obj, var_size_in_bytes, con_size_in_bytes, t1, slow_case);

 169   }
 170 }
 171 
 172 void C1_MacroAssembler::initialize_header(Register obj, Register klass, Register len, Register t1, Register t2) {
 173   assert_different_registers(obj, klass, len);
 174   if (UseBiasedLocking && !len->is_valid()) {
 175     assert_different_registers(obj, klass, len, t1, t2);
 176     ldr(t1, Address(klass, Klass::prototype_header_offset()));
 177   } else {
 178     // This assumes that all prototype bits fit in an int32_t
 179     mov(t1, (int32_t)(intptr_t)markOopDesc::prototype());
 180   }
 181   str(t1, Address(obj, oopDesc::mark_offset_in_bytes()));
 182 
 183   if (UseCompressedClassPointers) { // Take care not to kill klass
 184     encode_klass_not_null(t1, klass);
 185     strw(t1, Address(obj, oopDesc::klass_offset_in_bytes()));
 186   } else {
 187     str(klass, Address(obj, oopDesc::klass_offset_in_bytes()));
 188   }


< prev index next >