Mercurial > hg > truffle
comparison src/cpu/sparc/vm/copy_sparc.hpp @ 1579:e9ff18c4ace7
Merge
author | jrose |
---|---|
date | Wed, 02 Jun 2010 22:45:42 -0700 |
parents | c18cbe5936b8 2d127394260e |
children | f95d63e2154a |
comparison
equal
deleted
inserted
replaced
1562:dfe27f03244a | 1579:e9ff18c4ace7 |
---|---|
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 } |