1 /* |
1 /* |
2 * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
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 |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. |
7 * published by the Free Software Foundation. |
162 // arraycopy operands aligned on element type boundary |
162 // arraycopy operands aligned on element type boundary |
163 static address _jbyte_arraycopy; |
163 static address _jbyte_arraycopy; |
164 static address _jshort_arraycopy; |
164 static address _jshort_arraycopy; |
165 static address _jint_arraycopy; |
165 static address _jint_arraycopy; |
166 static address _jlong_arraycopy; |
166 static address _jlong_arraycopy; |
167 static address _oop_arraycopy; |
167 static address _oop_arraycopy, _oop_arraycopy_uninit; |
168 static address _jbyte_disjoint_arraycopy; |
168 static address _jbyte_disjoint_arraycopy; |
169 static address _jshort_disjoint_arraycopy; |
169 static address _jshort_disjoint_arraycopy; |
170 static address _jint_disjoint_arraycopy; |
170 static address _jint_disjoint_arraycopy; |
171 static address _jlong_disjoint_arraycopy; |
171 static address _jlong_disjoint_arraycopy; |
172 static address _oop_disjoint_arraycopy; |
172 static address _oop_disjoint_arraycopy, _oop_disjoint_arraycopy_uninit; |
173 |
173 |
174 // arraycopy operands aligned on zero'th element boundary |
174 // arraycopy operands aligned on zero'th element boundary |
175 // These are identical to the ones aligned aligned on an |
175 // These are identical to the ones aligned aligned on an |
176 // element type boundary, except that they assume that both |
176 // element type boundary, except that they assume that both |
177 // source and destination are HeapWord aligned. |
177 // source and destination are HeapWord aligned. |
178 static address _arrayof_jbyte_arraycopy; |
178 static address _arrayof_jbyte_arraycopy; |
179 static address _arrayof_jshort_arraycopy; |
179 static address _arrayof_jshort_arraycopy; |
180 static address _arrayof_jint_arraycopy; |
180 static address _arrayof_jint_arraycopy; |
181 static address _arrayof_jlong_arraycopy; |
181 static address _arrayof_jlong_arraycopy; |
182 static address _arrayof_oop_arraycopy; |
182 static address _arrayof_oop_arraycopy, _arrayof_oop_arraycopy_uninit; |
183 static address _arrayof_jbyte_disjoint_arraycopy; |
183 static address _arrayof_jbyte_disjoint_arraycopy; |
184 static address _arrayof_jshort_disjoint_arraycopy; |
184 static address _arrayof_jshort_disjoint_arraycopy; |
185 static address _arrayof_jint_disjoint_arraycopy; |
185 static address _arrayof_jint_disjoint_arraycopy; |
186 static address _arrayof_jlong_disjoint_arraycopy; |
186 static address _arrayof_jlong_disjoint_arraycopy; |
187 static address _arrayof_oop_disjoint_arraycopy; |
187 static address _arrayof_oop_disjoint_arraycopy, _arrayof_oop_disjoint_arraycopy_uninit; |
188 |
188 |
189 // these are recommended but optional: |
189 // these are recommended but optional: |
190 static address _checkcast_arraycopy; |
190 static address _checkcast_arraycopy, _checkcast_arraycopy_uninit; |
191 static address _unsafe_arraycopy; |
191 static address _unsafe_arraycopy; |
192 static address _generic_arraycopy; |
192 static address _generic_arraycopy; |
193 |
193 |
194 static address _jbyte_fill; |
194 static address _jbyte_fill; |
195 static address _jshort_fill; |
195 static address _jshort_fill; |
284 |
284 |
285 static address jbyte_arraycopy() { return _jbyte_arraycopy; } |
285 static address jbyte_arraycopy() { return _jbyte_arraycopy; } |
286 static address jshort_arraycopy() { return _jshort_arraycopy; } |
286 static address jshort_arraycopy() { return _jshort_arraycopy; } |
287 static address jint_arraycopy() { return _jint_arraycopy; } |
287 static address jint_arraycopy() { return _jint_arraycopy; } |
288 static address jlong_arraycopy() { return _jlong_arraycopy; } |
288 static address jlong_arraycopy() { return _jlong_arraycopy; } |
289 static address oop_arraycopy() { return _oop_arraycopy; } |
289 static address oop_arraycopy(bool dest_uninitialized = false) { |
|
290 return dest_uninitialized ? _oop_arraycopy_uninit : _oop_arraycopy; |
|
291 } |
290 static address jbyte_disjoint_arraycopy() { return _jbyte_disjoint_arraycopy; } |
292 static address jbyte_disjoint_arraycopy() { return _jbyte_disjoint_arraycopy; } |
291 static address jshort_disjoint_arraycopy() { return _jshort_disjoint_arraycopy; } |
293 static address jshort_disjoint_arraycopy() { return _jshort_disjoint_arraycopy; } |
292 static address jint_disjoint_arraycopy() { return _jint_disjoint_arraycopy; } |
294 static address jint_disjoint_arraycopy() { return _jint_disjoint_arraycopy; } |
293 static address jlong_disjoint_arraycopy() { return _jlong_disjoint_arraycopy; } |
295 static address jlong_disjoint_arraycopy() { return _jlong_disjoint_arraycopy; } |
294 static address oop_disjoint_arraycopy() { return _oop_disjoint_arraycopy; } |
296 static address oop_disjoint_arraycopy(bool dest_uninitialized = false) { |
|
297 return dest_uninitialized ? _oop_disjoint_arraycopy_uninit : _oop_disjoint_arraycopy; |
|
298 } |
295 |
299 |
296 static address arrayof_jbyte_arraycopy() { return _arrayof_jbyte_arraycopy; } |
300 static address arrayof_jbyte_arraycopy() { return _arrayof_jbyte_arraycopy; } |
297 static address arrayof_jshort_arraycopy() { return _arrayof_jshort_arraycopy; } |
301 static address arrayof_jshort_arraycopy() { return _arrayof_jshort_arraycopy; } |
298 static address arrayof_jint_arraycopy() { return _arrayof_jint_arraycopy; } |
302 static address arrayof_jint_arraycopy() { return _arrayof_jint_arraycopy; } |
299 static address arrayof_jlong_arraycopy() { return _arrayof_jlong_arraycopy; } |
303 static address arrayof_jlong_arraycopy() { return _arrayof_jlong_arraycopy; } |
300 static address arrayof_oop_arraycopy() { return _arrayof_oop_arraycopy; } |
304 static address arrayof_oop_arraycopy(bool dest_uninitialized = false) { |
|
305 return dest_uninitialized ? _arrayof_oop_arraycopy_uninit : _arrayof_oop_arraycopy; |
|
306 } |
301 |
307 |
302 static address arrayof_jbyte_disjoint_arraycopy() { return _arrayof_jbyte_disjoint_arraycopy; } |
308 static address arrayof_jbyte_disjoint_arraycopy() { return _arrayof_jbyte_disjoint_arraycopy; } |
303 static address arrayof_jshort_disjoint_arraycopy() { return _arrayof_jshort_disjoint_arraycopy; } |
309 static address arrayof_jshort_disjoint_arraycopy() { return _arrayof_jshort_disjoint_arraycopy; } |
304 static address arrayof_jint_disjoint_arraycopy() { return _arrayof_jint_disjoint_arraycopy; } |
310 static address arrayof_jint_disjoint_arraycopy() { return _arrayof_jint_disjoint_arraycopy; } |
305 static address arrayof_jlong_disjoint_arraycopy() { return _arrayof_jlong_disjoint_arraycopy; } |
311 static address arrayof_jlong_disjoint_arraycopy() { return _arrayof_jlong_disjoint_arraycopy; } |
306 static address arrayof_oop_disjoint_arraycopy() { return _arrayof_oop_disjoint_arraycopy; } |
312 static address arrayof_oop_disjoint_arraycopy(bool dest_uninitialized = false) { |
307 |
313 return dest_uninitialized ? _arrayof_oop_disjoint_arraycopy_uninit : _arrayof_oop_disjoint_arraycopy; |
308 static address checkcast_arraycopy() { return _checkcast_arraycopy; } |
314 } |
|
315 |
|
316 static address checkcast_arraycopy(bool dest_uninitialized = false) { |
|
317 return dest_uninitialized ? _checkcast_arraycopy_uninit : _checkcast_arraycopy; |
|
318 } |
309 static address unsafe_arraycopy() { return _unsafe_arraycopy; } |
319 static address unsafe_arraycopy() { return _unsafe_arraycopy; } |
310 static address generic_arraycopy() { return _generic_arraycopy; } |
320 static address generic_arraycopy() { return _generic_arraycopy; } |
311 |
321 |
312 static address jbyte_fill() { return _jbyte_fill; } |
322 static address jbyte_fill() { return _jbyte_fill; } |
313 static address jshort_fill() { return _jshort_fill; } |
323 static address jshort_fill() { return _jshort_fill; } |
350 |
360 |
351 // |
361 // |
352 // Default versions of the above arraycopy functions for platforms which do |
362 // Default versions of the above arraycopy functions for platforms which do |
353 // not have specialized versions |
363 // not have specialized versions |
354 // |
364 // |
355 static void jbyte_copy (jbyte* src, jbyte* dest, size_t count); |
365 static void jbyte_copy (jbyte* src, jbyte* dest, size_t count); |
356 static void jshort_copy(jshort* src, jshort* dest, size_t count); |
366 static void jshort_copy (jshort* src, jshort* dest, size_t count); |
357 static void jint_copy (jint* src, jint* dest, size_t count); |
367 static void jint_copy (jint* src, jint* dest, size_t count); |
358 static void jlong_copy (jlong* src, jlong* dest, size_t count); |
368 static void jlong_copy (jlong* src, jlong* dest, size_t count); |
359 static void oop_copy (oop* src, oop* dest, size_t count); |
369 static void oop_copy (oop* src, oop* dest, size_t count); |
360 |
370 static void oop_copy_uninit(oop* src, oop* dest, size_t count); |
361 static void arrayof_jbyte_copy (HeapWord* src, HeapWord* dest, size_t count); |
371 |
362 static void arrayof_jshort_copy(HeapWord* src, HeapWord* dest, size_t count); |
372 static void arrayof_jbyte_copy (HeapWord* src, HeapWord* dest, size_t count); |
363 static void arrayof_jint_copy (HeapWord* src, HeapWord* dest, size_t count); |
373 static void arrayof_jshort_copy (HeapWord* src, HeapWord* dest, size_t count); |
364 static void arrayof_jlong_copy (HeapWord* src, HeapWord* dest, size_t count); |
374 static void arrayof_jint_copy (HeapWord* src, HeapWord* dest, size_t count); |
365 static void arrayof_oop_copy (HeapWord* src, HeapWord* dest, size_t count); |
375 static void arrayof_jlong_copy (HeapWord* src, HeapWord* dest, size_t count); |
|
376 static void arrayof_oop_copy (HeapWord* src, HeapWord* dest, size_t count); |
|
377 static void arrayof_oop_copy_uninit(HeapWord* src, HeapWord* dest, size_t count); |
366 }; |
378 }; |
367 |
379 |
368 #endif // SHARE_VM_RUNTIME_STUBROUTINES_HPP |
380 #endif // SHARE_VM_RUNTIME_STUBROUTINES_HPP |