src/cpu/sparc/vm/macroAssembler_sparc.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File 8151708 Sdiff src/cpu/sparc/vm

src/cpu/sparc/vm/macroAssembler_sparc.cpp

Print this page




3240 
3241     // try to allocate
3242     Label retry;
3243     bind(retry);
3244 #ifdef ASSERT
3245     // make sure eden top is properly aligned
3246     {
3247       Label L;
3248       btst(MinObjAlignmentInBytesMask, obj);
3249       br(Assembler::zero, false, Assembler::pt, L);
3250       delayed()->nop();
3251       STOP("eden top is not properly aligned");
3252       bind(L);
3253     }
3254 #endif // ASSERT
3255     const Register free = end;
3256     sub(end, obj, free);                                   // compute amount of free space
3257     if (var_size_in_bytes->is_valid()) {
3258       // size is unknown at compile time
3259       cmp(free, var_size_in_bytes);
3260       br(Assembler::lessUnsigned, false, Assembler::pn, slow_case); // if there is not enough space go the slow case
3261       delayed()->add(obj, var_size_in_bytes, end);
3262     } else {
3263       // size is known at compile time
3264       cmp(free, con_size_in_bytes);
3265       br(Assembler::lessUnsigned, false, Assembler::pn, slow_case); // if there is not enough space go the slow case
3266       delayed()->add(obj, con_size_in_bytes, end);
3267     }
3268     // Compare obj with the value at top_addr; if still equal, swap the value of
3269     // end with the value at top_addr. If not equal, read the value at top_addr
3270     // into end.
3271     cas_ptr(top_addr, obj, end);
3272     // if someone beat us on the allocation, try again, otherwise continue
3273     cmp(obj, end);
3274     brx(Assembler::notEqual, false, Assembler::pn, retry);
3275     delayed()->mov(end, obj);                              // nop if successfull since obj == end
3276 
3277 #ifdef ASSERT
3278     // make sure eden top is properly aligned
3279     {
3280       Label L;
3281       const Register top_addr = t1;
3282 
3283       set((intx)ch->top_addr(), top_addr);
3284       ld_ptr(top_addr, 0, top_addr);
3285       btst(MinObjAlignmentInBytesMask, top_addr);




3240 
3241     // try to allocate
3242     Label retry;
3243     bind(retry);
3244 #ifdef ASSERT
3245     // make sure eden top is properly aligned
3246     {
3247       Label L;
3248       btst(MinObjAlignmentInBytesMask, obj);
3249       br(Assembler::zero, false, Assembler::pt, L);
3250       delayed()->nop();
3251       STOP("eden top is not properly aligned");
3252       bind(L);
3253     }
3254 #endif // ASSERT
3255     const Register free = end;
3256     sub(end, obj, free);                                   // compute amount of free space
3257     if (var_size_in_bytes->is_valid()) {
3258       // size is unknown at compile time
3259       cmp(free, var_size_in_bytes);
3260       brx(Assembler::lessUnsigned, false, Assembler::pn, slow_case); // if there is not enough space go the slow case
3261       delayed()->add(obj, var_size_in_bytes, end);
3262     } else {
3263       // size is known at compile time
3264       cmp(free, con_size_in_bytes);
3265       brx(Assembler::lessUnsigned, false, Assembler::pn, slow_case); // if there is not enough space go the slow case
3266       delayed()->add(obj, con_size_in_bytes, end);
3267     }
3268     // Compare obj with the value at top_addr; if still equal, swap the value of
3269     // end with the value at top_addr. If not equal, read the value at top_addr
3270     // into end.
3271     cas_ptr(top_addr, obj, end);
3272     // if someone beat us on the allocation, try again, otherwise continue
3273     cmp(obj, end);
3274     brx(Assembler::notEqual, false, Assembler::pn, retry);
3275     delayed()->mov(end, obj);                              // nop if successfull since obj == end
3276 
3277 #ifdef ASSERT
3278     // make sure eden top is properly aligned
3279     {
3280       Label L;
3281       const Register top_addr = t1;
3282 
3283       set((intx)ch->top_addr(), top_addr);
3284       ld_ptr(top_addr, 0, top_addr);
3285       btst(MinObjAlignmentInBytesMask, top_addr);


src/cpu/sparc/vm/macroAssembler_sparc.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File