mirror of
https://github.com/openjdk/jdk.git
synced 2026-05-11 22:19:43 +00:00
8337786: Fix simple -Wzero-as-null-pointer-constant warnings in aarch64 code
Reviewed-by: shade, tschatzl
This commit is contained in:
parent
ff634a9670
commit
22a3421379
@ -647,7 +647,7 @@ void LIR_Assembler::const2mem(LIR_Opr src, LIR_Opr dest, BasicType type, CodeEmi
|
||||
break;
|
||||
case T_OBJECT:
|
||||
case T_ARRAY:
|
||||
assert(c->as_jobject() == 0, "should be");
|
||||
assert(c->as_jobject() == nullptr, "should be");
|
||||
if (UseCompressedOops && !wide) {
|
||||
insn = &Assembler::strw;
|
||||
} else {
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1999, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1999, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2014, 2021, Red Hat Inc. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
@ -1029,4 +1029,4 @@ OopMapSet* Runtime1::generate_code_for(StubID id, StubAssembler* sasm) {
|
||||
|
||||
#undef __
|
||||
|
||||
const char *Runtime1::pd_name_for_address(address entry) { Unimplemented(); return 0; }
|
||||
const char *Runtime1::pd_name_for_address(address entry) { Unimplemented(); }
|
||||
|
||||
@ -293,7 +293,7 @@ void frame::patch_pc(Thread* thread, address pc) {
|
||||
|
||||
// Either the return address is the original one or we are going to
|
||||
// patch in the same address that's already there.
|
||||
assert(_pc == pc_old || pc == pc_old || pc_old == 0, "");
|
||||
assert(_pc == pc_old || pc == pc_old || pc_old == nullptr, "");
|
||||
DEBUG_ONLY(address old_pc = _pc;)
|
||||
*pc_addr = signed_pc;
|
||||
_pc = pc; // must be set before call to get_deopt_original_pc
|
||||
@ -497,10 +497,10 @@ frame frame::sender_for_interpreter_frame(RegisterMap* map) const {
|
||||
bool frame::is_interpreted_frame_valid(JavaThread* thread) const {
|
||||
assert(is_interpreted_frame(), "Not an interpreted frame");
|
||||
// These are reasonable sanity checks
|
||||
if (fp() == 0 || (intptr_t(fp()) & (wordSize-1)) != 0) {
|
||||
if (fp() == nullptr || (intptr_t(fp()) & (wordSize-1)) != 0) {
|
||||
return false;
|
||||
}
|
||||
if (sp() == 0 || (intptr_t(sp()) & (wordSize-1)) != 0) {
|
||||
if (sp() == nullptr || (intptr_t(sp()) & (wordSize-1)) != 0) {
|
||||
return false;
|
||||
}
|
||||
if (fp() + interpreter_frame_initial_sp_offset < sp()) {
|
||||
|
||||
@ -215,7 +215,7 @@ public:
|
||||
break;
|
||||
} else {
|
||||
// nothing to do
|
||||
assert(target == 0, "did not expect to relocate target for polling page load");
|
||||
assert(target == nullptr, "did not expect to relocate target for polling page load");
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
@ -228,7 +228,7 @@ address NativeJump::jump_destination() const {
|
||||
// load
|
||||
|
||||
// return -1 if jump to self or to 0
|
||||
if ((dest == (address)this) || dest == 0) {
|
||||
if ((dest == (address)this) || dest == nullptr) {
|
||||
dest = (address) -1;
|
||||
}
|
||||
return dest;
|
||||
@ -256,7 +256,7 @@ address NativeGeneralJump::jump_destination() const {
|
||||
// a general jump
|
||||
|
||||
// return -1 if jump to self or to 0
|
||||
if ((dest == (address)this) || dest == 0) {
|
||||
if ((dest == (address)this) || dest == nullptr) {
|
||||
dest = (address) -1;
|
||||
}
|
||||
return dest;
|
||||
|
||||
@ -606,12 +606,12 @@ static bool check_info_file(const char* fpath,
|
||||
return false;
|
||||
}
|
||||
while (fgets(line, sizeof(line), fp) != nullptr) {
|
||||
if (strcasestr(line, virt1) != 0) {
|
||||
if (strcasestr(line, virt1) != nullptr) {
|
||||
Abstract_VM_Version::_detected_virtualization = vt1;
|
||||
fclose(fp);
|
||||
return true;
|
||||
}
|
||||
if (virt2 != nullptr && strcasestr(line, virt2) != 0) {
|
||||
if (virt2 != nullptr && strcasestr(line, virt2) != nullptr) {
|
||||
Abstract_VM_Version::_detected_virtualization = vt2;
|
||||
fclose(fp);
|
||||
return true;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user