equal
deleted
inserted
replaced
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 } |