|
@@ -366,65 +366,65 @@ extern "C" { |
|
|
return 1; |
|
|
} |
|
|
|
|
|
void _Copy_conjoint_jshorts_atomic(jshort* from, jshort* to, size_t count) { |
|
|
void _Copy_conjoint_jshorts_atomic(const jshort* from, jshort* to, size_t count) { |
|
|
if (from > to) { |
|
|
jshort *end = from + count; |
|
|
const jshort *end = from + count; |
|
|
while (from < end) |
|
|
*(to++) = *(from++); |
|
|
} |
|
|
else if (from < to) { |
|
|
jshort *end = from; |
|
|
const jshort *end = from; |
|
|
from += count - 1; |
|
|
to += count - 1; |
|
|
while (from >= end) |
|
|
*(to--) = *(from--); |
|
|
} |
|
|
} |
|
|
void _Copy_conjoint_jints_atomic(jint* from, jint* to, size_t count) { |
|
|
void _Copy_conjoint_jints_atomic(const jint* from, jint* to, size_t count) { |
|
|
if (from > to) { |
|
|
jint *end = from + count; |
|
|
const jint *end = from + count; |
|
|
while (from < end) |
|
|
*(to++) = *(from++); |
|
|
} |
|
|
else if (from < to) { |
|
|
jint *end = from; |
|
|
const jint *end = from; |
|
|
from += count - 1; |
|
|
to += count - 1; |
|
|
while (from >= end) |
|
|
*(to--) = *(from--); |
|
|
} |
|
|
} |
|
|
void _Copy_conjoint_jlongs_atomic(jlong* from, jlong* to, size_t count) { |
|
|
void _Copy_conjoint_jlongs_atomic(const jlong* from, jlong* to, size_t count) { |
|
|
if (from > to) { |
|
|
jlong *end = from + count; |
|
|
const jlong *end = from + count; |
|
|
while (from < end) |
|
|
os::atomic_copy64(from++, to++); |
|
|
} |
|
|
else if (from < to) { |
|
|
jlong *end = from; |
|
|
const jlong *end = from; |
|
|
from += count - 1; |
|
|
to += count - 1; |
|
|
while (from >= end) |
|
|
os::atomic_copy64(from--, to--); |
|
|
} |
|
|
} |
|
|
|
|
|
void _Copy_arrayof_conjoint_bytes(HeapWord* from, |
|
|
void _Copy_arrayof_conjoint_bytes(const HeapWord* from, |
|
|
HeapWord* to, |
|
|
size_t count) { |
|
|
memmove(to, from, count); |
|
|
} |
|
|
void _Copy_arrayof_conjoint_jshorts(HeapWord* from, |
|
|
void _Copy_arrayof_conjoint_jshorts(const HeapWord* from, |
|
|
HeapWord* to, |
|
|
size_t count) { |
|
|
memmove(to, from, count * 2); |
|
|
} |
|
|
void _Copy_arrayof_conjoint_jints(HeapWord* from, |
|
|
void _Copy_arrayof_conjoint_jints(const HeapWord* from, |
|
|
HeapWord* to, |
|
|
size_t count) { |
|
|
memmove(to, from, count * 4); |
|
|
} |
|
|
void _Copy_arrayof_conjoint_jlongs(HeapWord* from, |
|
|
void _Copy_arrayof_conjoint_jlongs(const HeapWord* from, |
|
|
HeapWord* to, |
|
|
size_t count) { |
|
|
memmove(to, from, count * 8); |
|
|