Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
PojavLauncherTeam
GitHub Repository: PojavLauncherTeam/mobile
Path: blob/master/src/hotspot/os_cpu/linux_arm/copy_linux_arm.hpp
40931 views
1
/*
2
* Copyright (c) 2008, 2019, Oracle and/or its affiliates. All rights reserved.
3
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4
*
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
7
* published by the Free Software Foundation.
8
*
9
* This code is distributed in the hope that it will be useful, but WITHOUT
10
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12
* version 2 for more details (a copy is included in the LICENSE file that
13
* accompanied this code).
14
*
15
* You should have received a copy of the GNU General Public License version
16
* 2 along with this work; if not, write to the Free Software Foundation,
17
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18
*
19
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20
* or visit www.oracle.com if you need additional information or have any
21
* questions.
22
*
23
*/
24
25
#ifndef OS_CPU_LINUX_ARM_COPY_LINUX_ARM_HPP
26
#define OS_CPU_LINUX_ARM_COPY_LINUX_ARM_HPP
27
28
static void pd_conjoint_words(const HeapWord* from, HeapWord* to, size_t count) {
29
_Copy_conjoint_words(from, to, count * HeapWordSize);
30
}
31
32
static void pd_disjoint_words(const HeapWord* from, HeapWord* to, size_t count) {
33
_Copy_disjoint_words(from, to, count * HeapWordSize);
34
}
35
36
static void pd_disjoint_words_atomic(const HeapWord* from, HeapWord* to, size_t count) {
37
pd_disjoint_words(from, to, count);
38
}
39
40
static void pd_aligned_conjoint_words(const HeapWord* from, HeapWord* to, size_t count) {
41
pd_conjoint_words(from, to, count);
42
}
43
44
static void pd_aligned_disjoint_words(const HeapWord* from, HeapWord* to, size_t count) {
45
pd_disjoint_words(from, to, count);
46
}
47
48
static void pd_conjoint_bytes(const void* from, void* to, size_t count) {
49
memmove(to, from, count);
50
}
51
52
static void pd_conjoint_bytes_atomic(const void* from, void* to, size_t count) {
53
pd_conjoint_bytes(from, to, count);
54
}
55
56
static void pd_conjoint_jshorts_atomic(const jshort* from, jshort* to, size_t count) {
57
_Copy_conjoint_jshorts_atomic(from, to, count * BytesPerShort);
58
}
59
60
static void pd_conjoint_jints_atomic(const jint* from, jint* to, size_t count) {
61
assert(HeapWordSize == BytesPerInt, "heapwords and jints must be the same size");
62
// pd_conjoint_words is word-atomic in this implementation.
63
pd_conjoint_words((const HeapWord*)from, (HeapWord*)to, count);
64
}
65
66
static void pd_conjoint_jlongs_atomic(const jlong* from, jlong* to, size_t count) {
67
_Copy_conjoint_jlongs_atomic(from, to, count * BytesPerLong);
68
}
69
70
static void pd_conjoint_oops_atomic(const oop* from, oop* to, size_t count) {
71
assert(BytesPerHeapOop == BytesPerInt, "32-bit architecture");
72
pd_conjoint_jints_atomic((const jint*)from, (jint*)to, count);
73
}
74
75
static void pd_arrayof_conjoint_bytes(const HeapWord* from, HeapWord* to, size_t count) {
76
pd_conjoint_bytes_atomic((const void*)from, (void*)to, count);
77
}
78
79
static void pd_arrayof_conjoint_jshorts(const HeapWord* from, HeapWord* to, size_t count) {
80
pd_conjoint_jshorts_atomic((const jshort*)from, (jshort*)to, count);
81
}
82
83
static void pd_arrayof_conjoint_jints(const HeapWord* from, HeapWord* to, size_t count) {
84
pd_conjoint_jints_atomic((const jint*)from, (jint*)to, count);
85
}
86
87
static void pd_arrayof_conjoint_jlongs(const HeapWord* from, HeapWord* to, size_t count) {
88
pd_conjoint_jlongs_atomic((const jlong*)from, (jlong*)to, count);
89
}
90
91
static void pd_arrayof_conjoint_oops(const HeapWord* from, HeapWord* to, size_t count) {
92
pd_conjoint_oops_atomic((const oop*)from, (oop*)to, count);
93
}
94
95
#endif // OS_CPU_LINUX_ARM_COPY_LINUX_ARM_HPP
96
97