Path: blob/master/src/hotspot/os_cpu/linux_arm/copy_linux_arm.hpp
40931 views
/*1* Copyright (c) 2008, 2019, Oracle and/or its affiliates. All rights reserved.2* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.3*4* This code is free software; you can redistribute it and/or modify it5* under the terms of the GNU General Public License version 2 only, as6* published by the Free Software Foundation.7*8* This code is distributed in the hope that it will be useful, but WITHOUT9* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or10* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License11* version 2 for more details (a copy is included in the LICENSE file that12* accompanied this code).13*14* You should have received a copy of the GNU General Public License version15* 2 along with this work; if not, write to the Free Software Foundation,16* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.17*18* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA19* or visit www.oracle.com if you need additional information or have any20* questions.21*22*/2324#ifndef OS_CPU_LINUX_ARM_COPY_LINUX_ARM_HPP25#define OS_CPU_LINUX_ARM_COPY_LINUX_ARM_HPP2627static void pd_conjoint_words(const HeapWord* from, HeapWord* to, size_t count) {28_Copy_conjoint_words(from, to, count * HeapWordSize);29}3031static void pd_disjoint_words(const HeapWord* from, HeapWord* to, size_t count) {32_Copy_disjoint_words(from, to, count * HeapWordSize);33}3435static void pd_disjoint_words_atomic(const HeapWord* from, HeapWord* to, size_t count) {36pd_disjoint_words(from, to, count);37}3839static void pd_aligned_conjoint_words(const HeapWord* from, HeapWord* to, size_t count) {40pd_conjoint_words(from, to, count);41}4243static void pd_aligned_disjoint_words(const HeapWord* from, HeapWord* to, size_t count) {44pd_disjoint_words(from, to, count);45}4647static void pd_conjoint_bytes(const void* from, void* to, size_t count) {48memmove(to, from, count);49}5051static void pd_conjoint_bytes_atomic(const void* from, void* to, size_t count) {52pd_conjoint_bytes(from, to, count);53}5455static void pd_conjoint_jshorts_atomic(const jshort* from, jshort* to, size_t count) {56_Copy_conjoint_jshorts_atomic(from, to, count * BytesPerShort);57}5859static void pd_conjoint_jints_atomic(const jint* from, jint* to, size_t count) {60assert(HeapWordSize == BytesPerInt, "heapwords and jints must be the same size");61// pd_conjoint_words is word-atomic in this implementation.62pd_conjoint_words((const HeapWord*)from, (HeapWord*)to, count);63}6465static void pd_conjoint_jlongs_atomic(const jlong* from, jlong* to, size_t count) {66_Copy_conjoint_jlongs_atomic(from, to, count * BytesPerLong);67}6869static void pd_conjoint_oops_atomic(const oop* from, oop* to, size_t count) {70assert(BytesPerHeapOop == BytesPerInt, "32-bit architecture");71pd_conjoint_jints_atomic((const jint*)from, (jint*)to, count);72}7374static void pd_arrayof_conjoint_bytes(const HeapWord* from, HeapWord* to, size_t count) {75pd_conjoint_bytes_atomic((const void*)from, (void*)to, count);76}7778static void pd_arrayof_conjoint_jshorts(const HeapWord* from, HeapWord* to, size_t count) {79pd_conjoint_jshorts_atomic((const jshort*)from, (jshort*)to, count);80}8182static void pd_arrayof_conjoint_jints(const HeapWord* from, HeapWord* to, size_t count) {83pd_conjoint_jints_atomic((const jint*)from, (jint*)to, count);84}8586static void pd_arrayof_conjoint_jlongs(const HeapWord* from, HeapWord* to, size_t count) {87pd_conjoint_jlongs_atomic((const jlong*)from, (jlong*)to, count);88}8990static void pd_arrayof_conjoint_oops(const HeapWord* from, HeapWord* to, size_t count) {91pd_conjoint_oops_atomic((const oop*)from, (oop*)to, count);92}9394#endif // OS_CPU_LINUX_ARM_COPY_LINUX_ARM_HPP959697