Skip to content

Commit

Permalink
8238284: [macos] Zero VM build fails due to an obvious typo
Browse files Browse the repository at this point in the history
Reviewed-by: dholmes
  • Loading branch information
DamonFool committed Jan 31, 2020
1 parent 1cd5eac commit 0330504
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 27 deletions.
2 changes: 1 addition & 1 deletion src/hotspot/os_cpu/bsd_zero/atomic_bsd_zero.hpp
Expand Up @@ -189,7 +189,7 @@ inline D Atomic::PlatformAdd<4>::add_and_fetch(D volatile* dest, I add_value,
}

template<>
template<typename D, typename !>
template<typename D, typename I>
inline D Atomic::PlatformAdd<8>::add_and_fetch(D volatile* dest, I add_value,
atomic_memory_order order) const {
STATIC_ASSERT(8 == sizeof(I));
Expand Down
26 changes: 13 additions & 13 deletions src/hotspot/os_cpu/bsd_zero/os_bsd_zero.cpp
Expand Up @@ -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);
Expand Down
26 changes: 13 additions & 13 deletions src/hotspot/os_cpu/linux_zero/os_linux_zero.cpp
Expand Up @@ -410,65 +410,65 @@ extern "C" {
}


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);
Expand Down

0 comments on commit 0330504

Please sign in to comment.