Lines Matching defs:to

16  * 2 along with this work; if not, write to the Free Software Foundation,
34 void _Copy_conjoint_words(HeapWord* from, HeapWord* to, size_t count);
35 void _Copy_disjoint_words(HeapWord* from, HeapWord* to, size_t count);
37 void _Copy_conjoint_words_atomic(HeapWord* from, HeapWord* to, size_t count);
38 void _Copy_disjoint_words_atomic(HeapWord* from, HeapWord* to, size_t count);
40 void _Copy_aligned_conjoint_words(HeapWord* from, HeapWord* to, size_t count);
41 void _Copy_aligned_disjoint_words(HeapWord* from, HeapWord* to, size_t count);
43 void _Copy_conjoint_bytes(void* from, void* to, size_t count);
45 void _Copy_conjoint_bytes_atomic (void* from, void* to, size_t count);
46 void _Copy_conjoint_jshorts_atomic(jshort* from, jshort* to, size_t count);
47 void _Copy_conjoint_jints_atomic (jint* from, jint* to, size_t count);
48 void _Copy_conjoint_jlongs_atomic (jlong* from, jlong* to, size_t count);
49 void _Copy_conjoint_oops_atomic (oop* from, oop* to, size_t count);
51 void _Copy_arrayof_conjoint_bytes (HeapWord* from, HeapWord* to, size_t count);
52 void _Copy_arrayof_conjoint_jshorts(HeapWord* from, HeapWord* to, size_t count);
53 void _Copy_arrayof_conjoint_jints (HeapWord* from, HeapWord* to, size_t count);
54 void _Copy_arrayof_conjoint_jlongs (HeapWord* from, HeapWord* to, size_t count);
55 void _Copy_arrayof_conjoint_oops (HeapWord* from, HeapWord* to, size_t count);
61 // alignment: aligned to BytesPerLong
81 // count may copy an extra word. In the arrayof case, we are allowed to copy
90 static void conjoint_words(HeapWord* from, HeapWord* to, size_t count) {
91 assert_params_ok(from, to, LogHeapWordSize);
92 pd_conjoint_words(from, to, count);
96 static void disjoint_words(HeapWord* from, HeapWord* to, size_t count) {
97 assert_params_ok(from, to, LogHeapWordSize);
98 assert_disjoint(from, to, count);
99 pd_disjoint_words(from, to, count);
103 static void disjoint_words_atomic(HeapWord* from, HeapWord* to, size_t count) {
104 assert_params_ok(from, to, LogHeapWordSize);
105 assert_disjoint(from, to, count);
106 pd_disjoint_words_atomic(from, to, count);
110 static void aligned_conjoint_words(HeapWord* from, HeapWord* to, size_t count) {
111 assert_params_aligned(from, to);
112 pd_aligned_conjoint_words(from, to, count);
116 static void aligned_disjoint_words(HeapWord* from, HeapWord* to, size_t count) {
117 assert_params_aligned(from, to);
118 assert_disjoint(from, to, count);
119 pd_aligned_disjoint_words(from, to, count);
125 static void conjoint_jbytes(void* from, void* to, size_t count) {
126 pd_conjoint_bytes(from, to, count);
130 static void conjoint_jbytes_atomic(void* from, void* to, size_t count) {
131 pd_conjoint_bytes(from, to, count);
135 static void conjoint_jshorts_atomic(jshort* from, jshort* to, size_t count) {
136 assert_params_ok(from, to, LogBytesPerShort);
137 pd_conjoint_jshorts_atomic(from, to, count);
141 static void conjoint_jints_atomic(jint* from, jint* to, size_t count) {
142 assert_params_ok(from, to, LogBytesPerInt);
143 pd_conjoint_jints_atomic(from, to, count);
147 static void conjoint_jlongs_atomic(jlong* from, jlong* to, size_t count) {
148 assert_params_ok(from, to, LogBytesPerLong);
149 pd_conjoint_jlongs_atomic(from, to, count);
153 static void conjoint_oops_atomic(oop* from, oop* to, size_t count) {
154 assert_params_ok(from, to, LogBytesPerHeapOop);
155 pd_conjoint_oops_atomic(from, to, count);
159 static void conjoint_oops_atomic(narrowOop* from, narrowOop* to, size_t count) {
161 assert_params_ok(from, to, LogBytesPerInt);
162 pd_conjoint_jints_atomic((jint*)from, (jint*)to, count);
168 // of two which divides all of from, to, and size, whichever is smaller.
169 static void conjoint_memory_atomic(void* from, void* to, size_t size);
172 static void arrayof_conjoint_jbytes(HeapWord* from, HeapWord* to, size_t count) {
173 pd_arrayof_conjoint_bytes(from, to, count);
177 static void arrayof_conjoint_jshorts(HeapWord* from, HeapWord* to, size_t count) {
178 assert_params_ok(from, to, LogBytesPerShort);
179 pd_arrayof_conjoint_jshorts(from, to, count);
183 static void arrayof_conjoint_jints(HeapWord* from, HeapWord* to, size_t count) {
184 assert_params_ok(from, to, LogBytesPerInt);
185 pd_arrayof_conjoint_jints(from, to, count);
189 static void arrayof_conjoint_jlongs(HeapWord* from, HeapWord* to, size_t count) {
190 assert_params_ok(from, to, LogBytesPerLong);
191 pd_arrayof_conjoint_jlongs(from, to, count);
195 static void arrayof_conjoint_oops(HeapWord* from, HeapWord* to, size_t count) {
196 assert_params_ok(from, to, LogBytesPerHeapOop);
197 pd_arrayof_conjoint_oops(from, to, count);
202 // Copy word-aligned words from higher to lower addresses, not atomic on each word
203 inline static void conjoint_words_to_lower(HeapWord* from, HeapWord* to, size_t byte_count) {
204 // byte_count is in bytes to check its alignment
205 assert_params_ok(from, to, LogHeapWordSize);
209 assert(to <= from || from + count <= to, "do not overwrite source data");
212 *to++ = *from++;
216 // Copy word-aligned words from lower to higher addresses, not atomic on each word
217 inline static void conjoint_words_to_higher(HeapWord* from, HeapWord* to, size_t byte_count) {
218 // byte_count is in bytes to check its alignment
219 assert_params_ok(from, to, LogHeapWordSize);
223 assert(from <= to || to + count <= from, "do not overwrite source data");
226 to += count - 1;
228 *to-- = *from--;
237 * @param byte_count number of bytes to copy
238 * @param elem_size size of the elements to copy-swap
247 * @param byte_count number of bytes to copy
248 * @param elem_size size of the elements to copy-swap
253 * Copy and byte swap elements from the specified endian to the native (cpu) endian if needed (if they differ)
257 * @param byte_count number of bytes to copy
258 * @param elem_size size of the elements to copy-swap
273 static void fill_to_words(HeapWord* to, size_t count, juint value = 0) {
274 assert_params_ok(to, LogHeapWordSize);
275 pd_fill_to_words(to, count, value);
278 static void fill_to_aligned_words(HeapWord* to, size_t count, juint value = 0) {
279 assert_params_aligned(to);
280 pd_fill_to_aligned_words(to, count, value);
284 static void fill_to_bytes(void* to, size_t count, jubyte value = 0) {
285 pd_fill_to_bytes(to, count, value);
289 // longs, words, or ints, store to those units atomically.
291 // of two which divides both to and size, whichever is smaller.
292 static void fill_to_memory_atomic(void* to, size_t size, jubyte value = 0);
297 static void zero_to_words(HeapWord* to, size_t count) {
298 assert_params_ok(to, LogHeapWordSize);
299 pd_zero_to_words(to, count);
303 static void zero_to_bytes(void* to, size_t count) {
304 pd_zero_to_bytes(to, count);
308 static bool params_disjoint(HeapWord* from, HeapWord* to, size_t count) {
309 if (from < to) {
310 return pointer_delta(to, from) >= count;
312 return pointer_delta(from, to) >= count;
317 static void assert_disjoint(HeapWord* from, HeapWord* to, size_t count) {
319 if (!params_disjoint(from, to, count))
324 static void assert_params_ok(void* from, void* to, intptr_t log_align) {
328 if (mask_bits((uintptr_t)to, right_n_bits(log_align)) != 0)
333 static void assert_params_ok(HeapWord* to, intptr_t log_align) {
335 if (mask_bits((uintptr_t)to, right_n_bits(log_align)) != 0)
339 static void assert_params_aligned(HeapWord* from, HeapWord* to) {
343 if (mask_bits((uintptr_t)to, BytesPerLong-1) != 0)
348 static void assert_params_aligned(HeapWord* to) {
350 if (mask_bits((uintptr_t)to, BytesPerLong-1) != 0)