comparison src/cpu/sparc/vm/copy_sparc.hpp @ 1571:2d127394260e

6916623: Align object to 16 bytes to use Compressed Oops with java heap up to 64Gb Summary: Added new product ObjectAlignmentInBytes flag to control object alignment. Reviewed-by: twisti, ysr, iveresov
author kvn
date Thu, 27 May 2010 18:01:56 -0700
parents d1605aabd0a1
children e9ff18c4ace7
comparison
equal deleted inserted replaced
1570:de91a2f25c7e 1571:2d127394260e
152 } 152 }
153 #endif // _LP64 153 #endif // _LP64
154 } 154 }
155 155
156 static void pd_fill_to_aligned_words(HeapWord* tohw, size_t count, juint value) { 156 static void pd_fill_to_aligned_words(HeapWord* tohw, size_t count, juint value) {
157 assert(MinObjAlignmentInBytes == BytesPerLong, "need alternate implementation"); 157 assert(MinObjAlignmentInBytes >= BytesPerLong, "need alternate implementation");
158 158
159 julong* to = (julong*)tohw; 159 julong* to = (julong*)tohw;
160 julong v = ((julong)value << 32) | value; 160 julong v = ((julong)value << 32) | value;
161 // If count is odd, odd will be equal to 1 on 32-bit platform 161 // If count is odd, odd will be equal to 1 on 32-bit platform
162 // and be equal to 0 on 64-bit platform. 162 // and be equal to 0 on 64-bit platform.
163 size_t odd = count % (BytesPerLong / HeapWordSize) ; 163 size_t odd = count % (BytesPerLong / HeapWordSize) ;
164 164
165 size_t aligned_count = align_object_size(count - odd) / HeapWordsPerLong; 165 size_t aligned_count = align_object_offset(count - odd) / HeapWordsPerLong;
166 julong* end = ((julong*)tohw) + aligned_count - 1; 166 julong* end = ((julong*)tohw) + aligned_count - 1;
167 while (to <= end) { 167 while (to <= end) {
168 DEBUG_ONLY(count -= BytesPerLong / HeapWordSize ;) 168 DEBUG_ONLY(count -= BytesPerLong / HeapWordSize ;)
169 *to++ = v; 169 *to++ = v;
170 } 170 }