Mercurial > hg > truffle
comparison src/cpu/sparc/vm/templateTable_sparc.cpp @ 3892:baf763f388e6
7059037: Use BIS for zeroing on T4
Summary: Use BIS for zeroing new allocated big (2Kb and more) objects and arrays.
Reviewed-by: never, twisti, ysr
author | kvn |
---|---|
date | Fri, 26 Aug 2011 08:52:22 -0700 |
parents | fdb992d83a87 |
children | 52b5d32fbfaf 069ab3f976d3 |
comparison
equal
deleted
inserted
replaced
3891:ac8738449b6f | 3892:baf763f388e6 |
---|---|
3372 const bool allow_shared_alloc = | 3372 const bool allow_shared_alloc = |
3373 Universe::heap()->supports_inline_contig_alloc() && !CMSIncrementalMode; | 3373 Universe::heap()->supports_inline_contig_alloc() && !CMSIncrementalMode; |
3374 | 3374 |
3375 if(UseTLAB) { | 3375 if(UseTLAB) { |
3376 Register RoldTopValue = RallocatedObject; | 3376 Register RoldTopValue = RallocatedObject; |
3377 Register RtopAddr = G3_scratch, RtlabWasteLimitValue = G3_scratch; | 3377 Register RtlabWasteLimitValue = G3_scratch; |
3378 Register RnewTopValue = G1_scratch; | 3378 Register RnewTopValue = G1_scratch; |
3379 Register RendValue = Rscratch; | 3379 Register RendValue = Rscratch; |
3380 Register RfreeValue = RnewTopValue; | 3380 Register RfreeValue = RnewTopValue; |
3381 | 3381 |
3382 // check if we can allocate in the TLAB | 3382 // check if we can allocate in the TLAB |
3453 __ deccc(Roffset, sizeof(oopDesc)); | 3453 __ deccc(Roffset, sizeof(oopDesc)); |
3454 __ br(Assembler::zero, false, Assembler::pt, initialize_header); | 3454 __ br(Assembler::zero, false, Assembler::pt, initialize_header); |
3455 __ delayed()->add(RallocatedObject, sizeof(oopDesc), G3_scratch); | 3455 __ delayed()->add(RallocatedObject, sizeof(oopDesc), G3_scratch); |
3456 | 3456 |
3457 // initialize remaining object fields | 3457 // initialize remaining object fields |
3458 { Label loop; | 3458 if (UseBlockZeroing) { |
3459 // Use BIS for zeroing | |
3460 __ bis_zeroing(G3_scratch, Roffset, G1_scratch, initialize_header); | |
3461 } else { | |
3462 Label loop; | |
3459 __ subcc(Roffset, wordSize, Roffset); | 3463 __ subcc(Roffset, wordSize, Roffset); |
3460 __ bind(loop); | 3464 __ bind(loop); |
3461 //__ subcc(Roffset, wordSize, Roffset); // executed above loop or in delay slot | 3465 //__ subcc(Roffset, wordSize, Roffset); // executed above loop or in delay slot |
3462 __ st_ptr(G0, G3_scratch, Roffset); | 3466 __ st_ptr(G0, G3_scratch, Roffset); |
3463 __ br(Assembler::notEqual, false, Assembler::pt, loop); | 3467 __ br(Assembler::notEqual, false, Assembler::pt, loop); |