< prev index next >

src/hotspot/cpu/ppc/macroAssembler_ppc.cpp

Print this page
rev 48562 : [mq]: heap23


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




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


< prev index next >