diff 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
line wrap: on
line diff
--- a/src/cpu/sparc/vm/templateTable_sparc.cpp	Thu Aug 25 20:29:30 2011 -0700
+++ b/src/cpu/sparc/vm/templateTable_sparc.cpp	Fri Aug 26 08:52:22 2011 -0700
@@ -3374,7 +3374,7 @@
 
   if(UseTLAB) {
     Register RoldTopValue = RallocatedObject;
-    Register RtopAddr = G3_scratch, RtlabWasteLimitValue = G3_scratch;
+    Register RtlabWasteLimitValue = G3_scratch;
     Register RnewTopValue = G1_scratch;
     Register RendValue = Rscratch;
     Register RfreeValue = RnewTopValue;
@@ -3455,7 +3455,11 @@
     __ delayed()->add(RallocatedObject, sizeof(oopDesc), G3_scratch);
 
     // initialize remaining object fields
-    { Label loop;
+    if (UseBlockZeroing) {
+      // Use BIS for zeroing
+      __ bis_zeroing(G3_scratch, Roffset, G1_scratch, initialize_header);
+    } else {
+      Label loop;
       __ subcc(Roffset, wordSize, Roffset);
       __ bind(loop);
       //__ subcc(Roffset, wordSize, Roffset);      // executed above loop or in delay slot