Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/hotspot/cpu/s390/assembler_s390.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -122,14 +122,14 @@ class RelAddr {
return is_in_range_of_RelAddr(target, pc, true);
}
static bool is_in_range_of_RelAddr16(ptrdiff_t distance) {
return is_in_range_of_RelAddr((address)distance, 0, true);
return is_in_range_of_RelAddr((address)distance, nullptr, true);
}

static bool is_in_range_of_RelAddr32(address target, address pc) {
return is_in_range_of_RelAddr(target, pc, false);
}
static bool is_in_range_of_RelAddr32(ptrdiff_t distance) {
return is_in_range_of_RelAddr((address)distance, 0, false);
return is_in_range_of_RelAddr((address)distance, nullptr, false);
}

static int pcrel_off(address target, address pc, bool shortForm) {
Expand All @@ -149,14 +149,14 @@ class RelAddr {
return pcrel_off(target, pc, true);
}
static int pcrel_off16(ptrdiff_t distance) {
return pcrel_off((address)distance, 0, true);
return pcrel_off((address)distance, nullptr, true);
}

static int pcrel_off32(address target, address pc) {
return pcrel_off(target, pc, false);
}
static int pcrel_off32(ptrdiff_t distance) {
return pcrel_off((address)distance, 0, false);
return pcrel_off((address)distance, nullptr, false);
}

static ptrdiff_t inv_pcrel_off16(int offset) {
Expand Down
10 changes: 5 additions & 5 deletions src/hotspot/cpu/s390/frame_s390.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ void frame::patch_pc(Thread* thread, address pc) {
p2i(&((address*) _sp)[-1]), p2i(((address*) _sp)[-1]), p2i(pc));
}
assert(!Continuation::is_return_barrier_entry(*pc_addr), "return barrier");
assert(_pc == *pc_addr || pc == *pc_addr || 0 == *pc_addr,
assert(_pc == *pc_addr || pc == *pc_addr || nullptr == *pc_addr,
"must be (pc: " INTPTR_FORMAT " _pc: " INTPTR_FORMAT " pc_addr: " INTPTR_FORMAT
" *pc_addr: " INTPTR_FORMAT " sp: " INTPTR_FORMAT ")",
p2i(pc), p2i(_pc), p2i(pc_addr), p2i(*pc_addr), p2i(sp()));
Expand Down Expand Up @@ -296,10 +296,10 @@ void frame::patch_pc(Thread* thread, address pc) {
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;
}
int min_frame_slots = (z_common_abi_size + z_ijava_state_size) / sizeof(intptr_t);
Expand Down Expand Up @@ -420,7 +420,7 @@ void frame::back_trace(outputStream* st, intptr_t* start_sp, intptr_t* top_pc, u
? (address) top_pc
: (address) *((intptr_t*)(((address) current_sp) + _z_abi(return_pc)));

if ((intptr_t*) current_fp != 0 && (intptr_t*) current_fp <= current_sp) {
if ((intptr_t*) current_fp != nullptr && (intptr_t*) current_fp <= current_sp) {
st->print_cr("ERROR: corrupt stack");
return;
}
Expand Down Expand Up @@ -503,7 +503,7 @@ void frame::back_trace(outputStream* st, intptr_t* start_sp, intptr_t* top_pc, u
case 0: // C frame:
{
st->print(" ");
if (current_pc == 0) {
if (current_pc == nullptr) {
st->print("? ");
} else {
// name
Expand Down
2 changes: 1 addition & 1 deletion src/hotspot/cpu/s390/macroAssembler_s390.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4108,7 +4108,7 @@ void MacroAssembler::encode_klass_not_null(Register dst, Register src) {
Register current = (src != noreg) ? src : dst; // Klass is in dst if no src provided. (dst == src) also possible.
address base = CompressedKlassPointers::base();
int shift = CompressedKlassPointers::shift();
bool need_zero_extend = base != 0;
bool need_zero_extend = base != nullptr;
assert(UseCompressedClassPointers, "only for compressed klass ptrs");

BLOCK_COMMENT("cKlass encoder {");
Expand Down
2 changes: 1 addition & 1 deletion src/hotspot/cpu/s390/nativeInst_s390.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ void NativeInstruction::verify() {
// - any address in first page (0x0000 .. 0x0fff)
// - odd address (will cause a "specification exception")
address addr = addr_at(0);
if ((addr == 0) || (((unsigned long)addr & ~0x0fff) == 0) || ((intptr_t)addr & 1) != 0) {
if ((addr == nullptr) || (((unsigned long)addr & ~0x0fff) == 0) || ((intptr_t)addr & 1) != 0) {
tty->print_cr(INTPTR_FORMAT ": bad instruction address", p2i(addr));
fatal("not an instruction address");
}
Expand Down
1 change: 0 additions & 1 deletion src/hotspot/cpu/s390/relocInfo_s390.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,6 @@ void Relocation::pd_set_call_destination(address x) {

address* Relocation::pd_address_in_code() {
ShouldNotReachHere();
return 0;
}

address Relocation::pd_get_address_from_code() {
Expand Down
2 changes: 1 addition & 1 deletion src/hotspot/cpu/s390/stubGenerator_s390.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -688,7 +688,7 @@ class StubGenerator: public StubCodeGenerator {
// code (code_size == 0) confuses opjitconv
// StubCodeMark mark(this, "StubRoutines", "verify_oop_stub");

address start = 0;
address start = nullptr;

#if !defined(PRODUCT)
start = CAST_FROM_FN_PTR(address, verify_oop_helper);
Expand Down