2273N/A * Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights reserved. 0N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 0N/A * This code is free software; you can redistribute it and/or modify it 0N/A * under the terms of the GNU General Public License version 2 only, as 0N/A * published by the Free Software Foundation. 0N/A * This code is distributed in the hope that it will be useful, but WITHOUT 0N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 0N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 0N/A * version 2 for more details (a copy is included in the LICENSE file that 0N/A * accompanied this code). 0N/A * You should have received a copy of the GNU General Public License version 0N/A * 2 along with this work; if not, write to the Free Software Foundation, 0N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 1472N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 0N/A// Assembly code for platforms that need it. 0N/A // Block copy methods have four attributes. We don't define all possibilities. 1491N/A // alignment: aligned to BytesPerLong 0N/A // arrayof: arraycopy operation with both operands aligned on the same 0N/A // boundary as the first element of an array of the copy unit. 0N/A // This is currently a HeapWord boundary on all platforms, except 0N/A // for long and double arrays, which are aligned on an 8-byte 0N/A // boundary on all platforms. 0N/A // arraycopy operations are implicitly atomic on each array element. 0N/A // overlap: disjoint or conjoint. 0N/A // copy unit: bytes or words (i.e., HeapWords) or oops (i.e., pointers). 0N/A // atomicity: atomic or non-atomic on the copy unit. 0N/A // Names are constructed thusly: 0N/A // [ 'aligned_' | 'arrayof_' ] 0N/A // ('conjoint_' | 'disjoint_') 0N/A // ('words' | 'bytes' | 'jshorts' | 'jints' | 'jlongs' | 'oops') 0N/A // Except in the arrayof case, whatever the alignment is, we assume we can copy 1491N/A // whole alignment units. E.g., if BytesPerLong is 2x word alignment, an odd 0N/A // count may copy an extra word. In the arrayof case, we are allowed to copy 0N/A // only the number of copy units specified. 1523N/A // All callees check count for 0. 0N/A // Word-aligned words, conjoint, not atomic on each word 0N/A // Word-aligned words, disjoint, not atomic on each word 0N/A // Word-aligned words, disjoint, atomic on each word 0N/A // Object-aligned words, conjoint, not atomic on each word 0N/A // Object-aligned words, disjoint, not atomic on each word 0N/A // bytes, jshorts, jints, jlongs, oops 0N/A // bytes, conjoint, not atomic on each byte (not that it matters) 0N/A // bytes, conjoint, atomic on each byte (not that it matters) 0N/A // jshorts, conjoint, atomic on each jshort 0N/A // jints, conjoint, atomic on each jint 0N/A // jlongs, conjoint, atomic on each jlong 0N/A // oops, conjoint, atomic on each oop 113N/A // overloaded for UseCompressedOops 0N/A // Copy a span of memory. If the span is an integral number of aligned 0N/A // longs, words, or ints, copy those units atomically. 0N/A // The largest atomic transfer unit is 8 bytes, or the largest power 0N/A // of two which divides all of from, to, and size, whichever is smaller. 0N/A // bytes, conjoint array, atomic on each byte (not that it matters) 0N/A // jshorts, conjoint array, atomic on each jshort 0N/A // jints, conjoint array, atomic on each jint 0N/A // jlongs, conjoint array, atomic on each jlong 0N/A // oops, conjoint array, atomic on each oop 0N/A // Known overlap methods 0N/A // Copy word-aligned words from higher to lower addresses, not atomic on each word 0N/A // byte_count is in bytes to check its alignment 0N/A // Copy word-aligned words from lower to higher addresses, not atomic on each word 0N/A // byte_count is in bytes to check its alignment 0N/A // Fill word-aligned words, not atomic on each word 0N/A // Fill a span of memory. If the span is an integral number of aligned 0N/A // longs, words, or ints, store to those units atomically. 0N/A // The largest atomic transfer unit is 8 bytes, or the largest power 0N/A // of two which divides both to and size, whichever is smaller. 0N/A // Zero-fill methods 0N/A // Zero word-aligned words, not atomic on each word 0N/A // These methods raise a fatal if they detect a problem. 0N/A // Platform dependent implementations of the above methods. 1879N/A#
endif // SHARE_VM_UTILITIES_COPY_HPP