< prev index next >

src/hotspot/cpu/arm/macroAssembler_arm.cpp

Print this page
rev 49643 : [mq]: heap8
rev 49649 : [mq]: heap14


1294   // Update heap_top if allocation succeeded
1295   cmp(obj_end, heap_end);
1296   b(slow_case, hi);
1297 
1298 #ifdef AARCH64
1299   stxr(heap_end/*scratched*/, obj_end, top_addr);
1300   cbnz_w(heap_end, retry);
1301 #else
1302   atomic_cas_bool(obj, obj_end, top_addr, 0, heap_end/*scratched*/);
1303   b(retry, ne);
1304 #endif // AARCH64
1305 }
1306 
1307 // Puts address of allocated object into register `obj` and end of allocated object into register `obj_end`.
1308 void MacroAssembler::tlab_allocate(Register obj, Register obj_end, Register tmp1,
1309                                  RegisterOrConstant size_expression, Label& slow_case) {
1310   const Register tlab_end = tmp1;
1311   assert_different_registers(obj, obj_end, tlab_end);
1312 
1313   ldr(obj, Address(Rthread, JavaThread::tlab_top_offset()));
1314   ldr(tlab_end, Address(Rthread, JavaThread::tlab_current_end_offset()));
1315   add_rc(obj_end, obj, size_expression);
1316   cmp(obj_end, tlab_end);
1317   b(slow_case, hi);
1318   str(obj_end, Address(Rthread, JavaThread::tlab_top_offset()));
1319 }
1320 
1321 // Fills memory regions [start..end] with zeroes. Clobbers `start` and `tmp` registers.
1322 void MacroAssembler::zero_memory(Register start, Register end, Register tmp) {
1323   Label loop;
1324   const Register ptr = start;
1325 
1326 #ifdef AARCH64
1327   // TODO-AARCH64 - compare performance of 2x word zeroing with simple 1x
1328   const Register size = tmp;
1329   Label remaining, done;
1330 
1331   sub(size, end, start);
1332 
1333 #ifdef ASSERT
1334   { Label L;




1294   // Update heap_top if allocation succeeded
1295   cmp(obj_end, heap_end);
1296   b(slow_case, hi);
1297 
1298 #ifdef AARCH64
1299   stxr(heap_end/*scratched*/, obj_end, top_addr);
1300   cbnz_w(heap_end, retry);
1301 #else
1302   atomic_cas_bool(obj, obj_end, top_addr, 0, heap_end/*scratched*/);
1303   b(retry, ne);
1304 #endif // AARCH64
1305 }
1306 
1307 // Puts address of allocated object into register `obj` and end of allocated object into register `obj_end`.
1308 void MacroAssembler::tlab_allocate(Register obj, Register obj_end, Register tmp1,
1309                                  RegisterOrConstant size_expression, Label& slow_case) {
1310   const Register tlab_end = tmp1;
1311   assert_different_registers(obj, obj_end, tlab_end);
1312 
1313   ldr(obj, Address(Rthread, JavaThread::tlab_top_offset()));
1314   ldr(tlab_end, Address(Rthread, JavaThread::tlab_fast_path_end_offset()));
1315   add_rc(obj_end, obj, size_expression);
1316   cmp(obj_end, tlab_end);
1317   b(slow_case, hi);
1318   str(obj_end, Address(Rthread, JavaThread::tlab_top_offset()));
1319 }
1320 
1321 // Fills memory regions [start..end] with zeroes. Clobbers `start` and `tmp` registers.
1322 void MacroAssembler::zero_memory(Register start, Register end, Register tmp) {
1323   Label loop;
1324   const Register ptr = start;
1325 
1326 #ifdef AARCH64
1327   // TODO-AARCH64 - compare performance of 2x word zeroing with simple 1x
1328   const Register size = tmp;
1329   Label remaining, done;
1330 
1331   sub(size, end, start);
1332 
1333 #ifdef ASSERT
1334   { Label L;


< prev index next >