< prev index next >

src/hotspot/cpu/ppc/macroAssembler_ppc.cpp

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


2297 ) {
2298   b(slow_case);
2299 }
2300 
2301 void MacroAssembler::tlab_allocate(
2302   Register obj,                      // result: pointer to object after successful allocation
2303   Register var_size_in_bytes,        // object size in bytes if unknown at compile time; invalid otherwise
2304   int      con_size_in_bytes,        // object size in bytes if   known at compile time
2305   Register t1,                       // temp register
2306   Label&   slow_case                 // continuation point if fast allocation fails
2307 ) {
2308   // make sure arguments make sense
2309   assert_different_registers(obj, var_size_in_bytes, t1);
2310   assert(0 <= con_size_in_bytes && is_simm13(con_size_in_bytes), "illegal object size");
2311   assert((con_size_in_bytes & MinObjAlignmentInBytesMask) == 0, "object size is not multiple of alignment");
2312 
2313   const Register new_top = t1;
2314   //verify_tlab(); not implemented
2315 
2316   ld(obj, in_bytes(JavaThread::tlab_top_offset()), R16_thread);
2317   ld(R0, in_bytes(JavaThread::tlab_current_end_offset()), R16_thread);
2318   if (var_size_in_bytes == noreg) {
2319     addi(new_top, obj, con_size_in_bytes);
2320   } else {
2321     add(new_top, obj, var_size_in_bytes);
2322   }
2323   cmpld(CCR0, new_top, R0);
2324   bc_far_optimized(Assembler::bcondCRbiIs1, bi0(CCR0, Assembler::greater), slow_case);
2325 
2326 #ifdef ASSERT
2327   // make sure new free pointer is properly aligned
2328   {
2329     Label L;
2330     andi_(R0, new_top, MinObjAlignmentInBytesMask);
2331     beq(CCR0, L);
2332     stop("updated TLAB free is not properly aligned", 0x934);
2333     bind(L);
2334   }
2335 #endif // ASSERT
2336 
2337   // update the tlab top pointer




2297 ) {
2298   b(slow_case);
2299 }
2300 
2301 void MacroAssembler::tlab_allocate(
2302   Register obj,                      // result: pointer to object after successful allocation
2303   Register var_size_in_bytes,        // object size in bytes if unknown at compile time; invalid otherwise
2304   int      con_size_in_bytes,        // object size in bytes if   known at compile time
2305   Register t1,                       // temp register
2306   Label&   slow_case                 // continuation point if fast allocation fails
2307 ) {
2308   // make sure arguments make sense
2309   assert_different_registers(obj, var_size_in_bytes, t1);
2310   assert(0 <= con_size_in_bytes && is_simm13(con_size_in_bytes), "illegal object size");
2311   assert((con_size_in_bytes & MinObjAlignmentInBytesMask) == 0, "object size is not multiple of alignment");
2312 
2313   const Register new_top = t1;
2314   //verify_tlab(); not implemented
2315 
2316   ld(obj, in_bytes(JavaThread::tlab_top_offset()), R16_thread);
2317   ld(R0, in_bytes(JavaThread::tlab_fast_path_end_offset()), R16_thread);
2318   if (var_size_in_bytes == noreg) {
2319     addi(new_top, obj, con_size_in_bytes);
2320   } else {
2321     add(new_top, obj, var_size_in_bytes);
2322   }
2323   cmpld(CCR0, new_top, R0);
2324   bc_far_optimized(Assembler::bcondCRbiIs1, bi0(CCR0, Assembler::greater), slow_case);
2325 
2326 #ifdef ASSERT
2327   // make sure new free pointer is properly aligned
2328   {
2329     Label L;
2330     andi_(R0, new_top, MinObjAlignmentInBytesMask);
2331     beq(CCR0, L);
2332     stop("updated TLAB free is not properly aligned", 0x934);
2333     bind(L);
2334   }
2335 #endif // ASSERT
2336 
2337   // update the tlab top pointer


< prev index next >