Lines Matching defs:to

16  * 2 along with this work; if not, write to the Free Software Foundation,
32 void _Copy_conjoint_words(HeapWord* from, HeapWord* to, size_t count);
33 void _Copy_disjoint_words(HeapWord* from, HeapWord* to, size_t count);
35 void _Copy_conjoint_words_atomic(HeapWord* from, HeapWord* to, size_t count);
36 void _Copy_disjoint_words_atomic(HeapWord* from, HeapWord* to, size_t count);
38 void _Copy_aligned_conjoint_words(HeapWord* from, HeapWord* to, size_t count);
39 void _Copy_aligned_disjoint_words(HeapWord* from, HeapWord* to, size_t count);
41 void _Copy_conjoint_bytes(void* from, void* to, size_t count);
43 void _Copy_conjoint_bytes_atomic (void* from, void* to, size_t count);
44 void _Copy_conjoint_jshorts_atomic(jshort* from, jshort* to, size_t count);
45 void _Copy_conjoint_jints_atomic (jint* from, jint* to, size_t count);
46 void _Copy_conjoint_jlongs_atomic (jlong* from, jlong* to, size_t count);
47 void _Copy_conjoint_oops_atomic (oop* from, oop* to, size_t count);
49 void _Copy_arrayof_conjoint_bytes (HeapWord* from, HeapWord* to, size_t count);
50 void _Copy_arrayof_conjoint_jshorts(HeapWord* from, HeapWord* to, size_t count);
51 void _Copy_arrayof_conjoint_jints (HeapWord* from, HeapWord* to, size_t count);
52 void _Copy_arrayof_conjoint_jlongs (HeapWord* from, HeapWord* to, size_t count);
53 void _Copy_arrayof_conjoint_oops (HeapWord* from, HeapWord* to, size_t count);
59 // alignment: aligned to BytesPerLong
79 // count may copy an extra word. In the arrayof case, we are allowed to copy
88 static void conjoint_words(HeapWord* from, HeapWord* to, size_t count) {
89 assert_params_ok(from, to, LogHeapWordSize);
90 pd_conjoint_words(from, to, count);
94 static void disjoint_words(HeapWord* from, HeapWord* to, size_t count) {
95 assert_params_ok(from, to, LogHeapWordSize);
96 assert_disjoint(from, to, count);
97 pd_disjoint_words(from, to, count);
101 static void disjoint_words_atomic(HeapWord* from, HeapWord* to, size_t count) {
102 assert_params_ok(from, to, LogHeapWordSize);
103 assert_disjoint(from, to, count);
104 pd_disjoint_words_atomic(from, to, count);
108 static void aligned_conjoint_words(HeapWord* from, HeapWord* to, size_t count) {
109 assert_params_aligned(from, to);
110 pd_aligned_conjoint_words(from, to, count);
114 static void aligned_disjoint_words(HeapWord* from, HeapWord* to, size_t count) {
115 assert_params_aligned(from, to);
116 assert_disjoint(from, to, count);
117 pd_aligned_disjoint_words(from, to, count);
123 static void conjoint_jbytes(void* from, void* to, size_t count) {
124 pd_conjoint_bytes(from, to, count);
128 static void conjoint_jbytes_atomic(void* from, void* to, size_t count) {
129 pd_conjoint_bytes(from, to, count);
133 static void conjoint_jshorts_atomic(jshort* from, jshort* to, size_t count) {
134 assert_params_ok(from, to, LogBytesPerShort);
135 pd_conjoint_jshorts_atomic(from, to, count);
139 static void conjoint_jints_atomic(jint* from, jint* to, size_t count) {
140 assert_params_ok(from, to, LogBytesPerInt);
141 pd_conjoint_jints_atomic(from, to, count);
145 static void conjoint_jlongs_atomic(jlong* from, jlong* to, size_t count) {
146 assert_params_ok(from, to, LogBytesPerLong);
147 pd_conjoint_jlongs_atomic(from, to, count);
151 static void conjoint_oops_atomic(oop* from, oop* to, size_t count) {
152 assert_params_ok(from, to, LogBytesPerHeapOop);
153 pd_conjoint_oops_atomic(from, to, count);
157 static void conjoint_oops_atomic(narrowOop* from, narrowOop* to, size_t count) {
159 assert_params_ok(from, to, LogBytesPerInt);
160 pd_conjoint_jints_atomic((jint*)from, (jint*)to, count);
166 // of two which divides all of from, to, and size, whichever is smaller.
167 static void conjoint_memory_atomic(void* from, void* to, size_t size);
170 static void arrayof_conjoint_jbytes(HeapWord* from, HeapWord* to, size_t count) {
171 pd_arrayof_conjoint_bytes(from, to, count);
175 static void arrayof_conjoint_jshorts(HeapWord* from, HeapWord* to, size_t count) {
176 assert_params_ok(from, to, LogBytesPerShort);
177 pd_arrayof_conjoint_jshorts(from, to, count);
181 static void arrayof_conjoint_jints(HeapWord* from, HeapWord* to, size_t count) {
182 assert_params_ok(from, to, LogBytesPerInt);
183 pd_arrayof_conjoint_jints(from, to, count);
187 static void arrayof_conjoint_jlongs(HeapWord* from, HeapWord* to, size_t count) {
188 assert_params_ok(from, to, LogBytesPerLong);
189 pd_arrayof_conjoint_jlongs(from, to, count);
193 static void arrayof_conjoint_oops(HeapWord* from, HeapWord* to, size_t count) {
194 assert_params_ok(from, to, LogBytesPerHeapOop);
195 pd_arrayof_conjoint_oops(from, to, count);
200 // Copy word-aligned words from higher to lower addresses, not atomic on each word
201 inline static void conjoint_words_to_lower(HeapWord* from, HeapWord* to, size_t byte_count) {
202 // byte_count is in bytes to check its alignment
203 assert_params_ok(from, to, LogHeapWordSize);
207 assert(to <= from || from + count <= to, "do not overwrite source data");
210 *to++ = *from++;
214 // Copy word-aligned words from lower to higher addresses, not atomic on each word
215 inline static void conjoint_words_to_higher(HeapWord* from, HeapWord* to, size_t byte_count) {
216 // byte_count is in bytes to check its alignment
217 assert_params_ok(from, to, LogHeapWordSize);
221 assert(from <= to || to + count <= from, "do not overwrite source data");
224 to += count - 1;
226 *to-- = *from--;
234 static void fill_to_words(HeapWord* to, size_t count, juint value = 0) {
235 assert_params_ok(to, LogHeapWordSize);
236 pd_fill_to_words(to, count, value);
239 static void fill_to_aligned_words(HeapWord* to, size_t count, juint value = 0) {
240 assert_params_aligned(to);
241 pd_fill_to_aligned_words(to, count, value);
245 static void fill_to_bytes(void* to, size_t count, jubyte value = 0) {
246 pd_fill_to_bytes(to, count, value);
250 // longs, words, or ints, store to those units atomically.
252 // of two which divides both to and size, whichever is smaller.
253 static void fill_to_memory_atomic(void* to, size_t size, jubyte value = 0);
258 static void zero_to_words(HeapWord* to, size_t count) {
259 assert_params_ok(to, LogHeapWordSize);
260 pd_zero_to_words(to, count);
264 static void zero_to_bytes(void* to, size_t count) {
265 pd_zero_to_bytes(to, count);
269 static bool params_disjoint(HeapWord* from, HeapWord* to, size_t count) {
270 if (from < to) {
271 return pointer_delta(to, from) >= count;
273 return pointer_delta(from, to) >= count;
278 static void assert_disjoint(HeapWord* from, HeapWord* to, size_t count) {
280 if (!params_disjoint(from, to, count))
285 static void assert_params_ok(void* from, void* to, intptr_t log_align) {
289 if (mask_bits((uintptr_t)to, right_n_bits(log_align)) != 0)
294 static void assert_params_ok(HeapWord* to, intptr_t log_align) {
296 if (mask_bits((uintptr_t)to, right_n_bits(log_align)) != 0)
300 static void assert_params_aligned(HeapWord* from, HeapWord* to) {
304 if (mask_bits((uintptr_t)to, BytesPerLong-1) != 0)
309 static void assert_params_aligned(HeapWord* to) {
311 if (mask_bits((uintptr_t)to, BytesPerLong-1) != 0)