< prev index next >

src/cpu/sparc/vm/memset_with_concurrent_readers_sparc.cpp

Print this page

        

*** 84,105 **** void memset_with_concurrent_readers(void* to, int value, size_t size) { Prefetch::write(to, 0); void* end = static_cast<char*>(to) + size; if (size >= (size_t)BytesPerWord) { // Fill any partial word prefix. ! uintx* aligned_to = static_cast<uintx*>(align_ptr_up(to, BytesPerWord)); fill_subword(to, aligned_to, value); // Compute fill word. STATIC_ASSERT(BitsPerByte == 8); STATIC_ASSERT(BitsPerWord == 64); uintx xvalue = value & 0xff; xvalue |= (xvalue << 8); xvalue |= (xvalue << 16); xvalue |= (xvalue << 32); ! uintx* aligned_end = static_cast<uintx*>(align_ptr_down(end, BytesPerWord)); assert(aligned_to <= aligned_end, "invariant"); // for ( ; aligned_to < aligned_end; ++aligned_to) { // *aligned_to = xvalue; // } --- 84,105 ---- void memset_with_concurrent_readers(void* to, int value, size_t size) { Prefetch::write(to, 0); void* end = static_cast<char*>(to) + size; if (size >= (size_t)BytesPerWord) { // Fill any partial word prefix. ! uintx* aligned_to = static_cast<uintx*>(align_up(to, BytesPerWord)); fill_subword(to, aligned_to, value); // Compute fill word. STATIC_ASSERT(BitsPerByte == 8); STATIC_ASSERT(BitsPerWord == 64); uintx xvalue = value & 0xff; xvalue |= (xvalue << 8); xvalue |= (xvalue << 16); xvalue |= (xvalue << 32); ! uintx* aligned_end = static_cast<uintx*>(align_down(end, BytesPerWord)); assert(aligned_to <= aligned_end, "invariant"); // for ( ; aligned_to < aligned_end; ++aligned_to) { // *aligned_to = xvalue; // }
< prev index next >