8291633: Build failures with GCC 11, Alpine 3 due to incompatible casts from nullptr
Reviewed-by: stuefe, mbaesken, jiefu
This commit is contained in:
parent
4d6e6f6741
commit
c89556f6cd
@ -1122,7 +1122,7 @@ void InterpreterMacroAssembler::remove_activation(
|
||||
|
||||
bind(loop);
|
||||
// check if current entry is used
|
||||
cmpptr(Address(rmon, BasicObjectLock::obj_offset_in_bytes()), (int32_t) NULL);
|
||||
cmpptr(Address(rmon, BasicObjectLock::obj_offset_in_bytes()), (int32_t) NULL_WORD);
|
||||
jcc(Assembler::notEqual, exception);
|
||||
|
||||
addptr(rmon, entry_size); // otherwise advance to next entry
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2003, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2003, 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -348,10 +348,10 @@ class SlowSignatureHandler
|
||||
intptr_t *from_addr = (intptr_t*)(_from + Interpreter::local_offset_in_bytes(0));
|
||||
_from -= Interpreter::stackElementSize;
|
||||
if (_num_args < Argument::n_int_register_parameters_c-1) {
|
||||
*_reg_args++ = (*from_addr == 0) ? NULL : (intptr_t) from_addr;
|
||||
*_reg_args++ = (*from_addr == 0) ? NULL_WORD : (intptr_t) from_addr;
|
||||
_num_args++;
|
||||
} else {
|
||||
*_to++ = (*from_addr == 0) ? NULL : (intptr_t) from_addr;
|
||||
*_to++ = (*from_addr == 0) ? NULL_WORD : (intptr_t) from_addr;
|
||||
}
|
||||
}
|
||||
|
||||
@ -443,10 +443,10 @@ class SlowSignatureHandler
|
||||
_from -= Interpreter::stackElementSize;
|
||||
|
||||
if (_num_int_args < Argument::n_int_register_parameters_c-1) {
|
||||
*_int_args++ = (*from_addr == 0) ? NULL : (intptr_t)from_addr;
|
||||
*_int_args++ = (*from_addr == 0) ? NULL_WORD : (intptr_t)from_addr;
|
||||
_num_int_args++;
|
||||
} else {
|
||||
*_to++ = (*from_addr == 0) ? NULL : (intptr_t) from_addr;
|
||||
*_to++ = (*from_addr == 0) ? NULL_WORD : (intptr_t) from_addr;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -529,7 +529,7 @@ class StubGenerator: public StubCodeGenerator {
|
||||
// make sure this code is only executed if there is a pending exception
|
||||
{
|
||||
Label L;
|
||||
__ cmpptr(Address(r15_thread, Thread::pending_exception_offset()), (int32_t) NULL);
|
||||
__ cmpptr(Address(r15_thread, Thread::pending_exception_offset()), (int32_t) NULL_WORD);
|
||||
__ jcc(Assembler::notEqual, L);
|
||||
__ stop("StubRoutines::forward exception: no pending exception (1)");
|
||||
__ bind(L);
|
||||
|
@ -200,7 +200,7 @@ inline oop ShenandoahBarrierSet::oop_cmpxchg(DecoratorSet decorators, T* addr, o
|
||||
|
||||
// Note: We don't need a keep-alive-barrier here. We already enqueue any loaded reference for SATB anyway,
|
||||
// because it must be the previous value.
|
||||
res = load_reference_barrier(decorators, res, reinterpret_cast<T*>(NULL));
|
||||
res = load_reference_barrier(decorators, res, static_cast<T*>(nullptr));
|
||||
satb_enqueue(res);
|
||||
return res;
|
||||
}
|
||||
@ -211,7 +211,7 @@ inline oop ShenandoahBarrierSet::oop_xchg(DecoratorSet decorators, T* addr, oop
|
||||
oop previous = RawAccess<>::oop_atomic_xchg(addr, new_value);
|
||||
// Note: We don't need a keep-alive-barrier here. We already enqueue any loaded reference for SATB anyway,
|
||||
// because it must be the previous value.
|
||||
previous = load_reference_barrier<T>(decorators, previous, reinterpret_cast<T*>(NULL));
|
||||
previous = load_reference_barrier<T>(decorators, previous, static_cast<T*>(nullptr));
|
||||
satb_enqueue(previous);
|
||||
return previous;
|
||||
}
|
||||
|
@ -294,8 +294,8 @@ public:
|
||||
static inline void arraycopy(arrayOop src_obj, size_t src_offset_in_bytes,
|
||||
arrayOop dst_obj, size_t dst_offset_in_bytes,
|
||||
size_t length) {
|
||||
AccessT::arraycopy(src_obj, src_offset_in_bytes, reinterpret_cast<const T*>(NULL),
|
||||
dst_obj, dst_offset_in_bytes, reinterpret_cast<T*>(NULL),
|
||||
AccessT::arraycopy(src_obj, src_offset_in_bytes, static_cast<const T*>(nullptr),
|
||||
dst_obj, dst_offset_in_bytes, static_cast<T*>(nullptr),
|
||||
length);
|
||||
}
|
||||
|
||||
@ -303,7 +303,7 @@ public:
|
||||
static inline void arraycopy_to_native(arrayOop src_obj, size_t src_offset_in_bytes,
|
||||
T* dst,
|
||||
size_t length) {
|
||||
AccessT::arraycopy(src_obj, src_offset_in_bytes, reinterpret_cast<const T*>(NULL),
|
||||
AccessT::arraycopy(src_obj, src_offset_in_bytes, static_cast<const T*>(nullptr),
|
||||
NULL, 0, dst,
|
||||
length);
|
||||
}
|
||||
@ -313,15 +313,15 @@ public:
|
||||
arrayOop dst_obj, size_t dst_offset_in_bytes,
|
||||
size_t length) {
|
||||
AccessT::arraycopy(NULL, 0, src,
|
||||
dst_obj, dst_offset_in_bytes, reinterpret_cast<T*>(NULL),
|
||||
dst_obj, dst_offset_in_bytes, static_cast<T*>(nullptr),
|
||||
length);
|
||||
}
|
||||
|
||||
static inline bool oop_arraycopy(arrayOop src_obj, size_t src_offset_in_bytes,
|
||||
arrayOop dst_obj, size_t dst_offset_in_bytes,
|
||||
size_t length) {
|
||||
return AccessT::oop_arraycopy(src_obj, src_offset_in_bytes, reinterpret_cast<const HeapWord*>(NULL),
|
||||
dst_obj, dst_offset_in_bytes, reinterpret_cast<HeapWord*>(NULL),
|
||||
return AccessT::oop_arraycopy(src_obj, src_offset_in_bytes, static_cast<const HeapWord*>(nullptr),
|
||||
dst_obj, dst_offset_in_bytes, static_cast<HeapWord*>(nullptr),
|
||||
length);
|
||||
}
|
||||
|
||||
|
@ -668,7 +668,7 @@ const char* ObjectMonitor::is_busy_to_string(stringStream* ss) {
|
||||
} else {
|
||||
// We report NULL instead of DEFLATER_MARKER here because is_busy()
|
||||
// ignores DEFLATER_MARKER values.
|
||||
ss->print("owner=" INTPTR_FORMAT, NULL);
|
||||
ss->print("owner=" INTPTR_FORMAT, NULL_WORD);
|
||||
}
|
||||
ss->print(", cxq=" INTPTR_FORMAT ", EntryList=" INTPTR_FORMAT, p2i(_cxq),
|
||||
p2i(_EntryList));
|
||||
|
Loading…
Reference in New Issue
Block a user