copy_sparc.hpp (0:a61af66fc99e) copy_sparc.hpp (113:ba764ed4b6f2)
1/*
2 * Copyright 2003-2006 Sun Microsystems, Inc. All Rights Reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation.
8 *

--- 123 unchanged lines hidden (view full) ---

132 pd_conjoint_jlongs_atomic((jlong*)from, (jlong*)to, count);
133}
134
135static void pd_arrayof_conjoint_oops(HeapWord* from, HeapWord* to, size_t count) {
136 pd_conjoint_oops_atomic((oop*)from, (oop*)to, count);
137}
138
139static void pd_fill_to_words(HeapWord* tohw, size_t count, juint value) {
1/*
2 * Copyright 2003-2006 Sun Microsystems, Inc. All Rights Reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation.
8 *

--- 123 unchanged lines hidden (view full) ---

132 pd_conjoint_jlongs_atomic((jlong*)from, (jlong*)to, count);
133}
134
135static void pd_arrayof_conjoint_oops(HeapWord* from, HeapWord* to, size_t count) {
136 pd_conjoint_oops_atomic((oop*)from, (oop*)to, count);
137}
138
139static void pd_fill_to_words(HeapWord* tohw, size_t count, juint value) {
140#if 0
141 if (HeapWordsPerLong == 1 ||
142 (HeapWordsPerLong == 2 &&
143 mask_bits((uintptr_t)tohw, right_n_bits(LogBytesPerLong)) == 0 &&
144 ((count & 1) ? false : count >>= 1))) {
145 julong* to = (julong*)tohw;
146 julong v = ((julong)value << 32) | value;
147 while (count-- > 0) {
148 *to++ = v;
149 }
150 } else {
151#endif
152 juint* to = (juint*)tohw;
153 count *= HeapWordSize / BytesPerInt;
154 while (count-- > 0) {
155 *to++ = value;
156 }
157 // }
140#ifdef _LP64
141 guarantee(mask_bits((uintptr_t)tohw, right_n_bits(LogBytesPerLong)) == 0,
142 "unaligned fill words");
143 julong* to = (julong*)tohw;
144 julong v = ((julong)value << 32) | value;
145 while (count-- > 0) {
146 *to++ = v;
147 }
148#else // _LP64
149 juint* to = (juint*)tohw;
150 while (count-- > 0) {
151 *to++ = value;
152 }
153#endif // _LP64
158}
159
160static void pd_fill_to_aligned_words(HeapWord* tohw, size_t count, juint value) {
161 assert(MinObjAlignmentInBytes == BytesPerLong, "need alternate implementation");
162
163 julong* to = (julong*)tohw;
164 julong v = ((julong)value << 32) | value;
165 // If count is odd, odd will be equal to 1 on 32-bit platform

--- 27 unchanged lines hidden ---
154}
155
156static void pd_fill_to_aligned_words(HeapWord* tohw, size_t count, juint value) {
157 assert(MinObjAlignmentInBytes == BytesPerLong, "need alternate implementation");
158
159 julong* to = (julong*)tohw;
160 julong v = ((julong)value << 32) | value;
161 // If count is odd, odd will be equal to 1 on 32-bit platform

--- 27 unchanged lines hidden ---