8288051: Loom: Extend the compilation warning workaround in stack chunk copy

Reviewed-by: coleenp
This commit is contained in:
Aleksey Shipilev 2022-06-09 05:48:48 +00:00
parent 3419beec7f
commit 7e1cce8cb5

View File

@ -316,6 +316,12 @@ inline void stackChunkOopDesc::copy_from_stack_to_chunk(intptr_t* from, intptr_t
assert(to >= start_address(), "Chunk underflow");
assert(to + size <= end_address(), "Chunk overflow");
#if !defined(AMD64) || !defined(AARCH64) || defined(ZERO)
// Suppress compilation warning-as-error on unimplemented architectures
// that stub out arch-specific methods. Some compilers are smart enough
// to figure out the argument is always null and then warn about it.
if (to != nullptr)
#endif
memcpy(to, from, size << LogBytesPerWord);
}
@ -330,7 +336,9 @@ inline void stackChunkOopDesc::copy_from_chunk_to_stack(intptr_t* from, intptr_t
assert(from + size <= end_address(), "");
#if !defined(AMD64) || !defined(AARCH64) || defined(ZERO)
// Suppress compilation error from dummy function (somewhere).
// Suppress compilation warning-as-error on unimplemented architectures
// that stub out arch-specific methods. Some compilers are smart enough
// to figure out the argument is always null and then warn about it.
if (to != nullptr)
#endif
memcpy(to, from, size << LogBytesPerWord);