8301496: Replace NULL with nullptr in cpu/riscv

Reviewed-by: dholmes, fyang
This commit is contained in:
Johan Sjölen 2023-04-14 09:53:46 +00:00
parent 54bf370079
commit d2ce04bb10
45 changed files with 573 additions and 573 deletions

View file

@ -85,7 +85,7 @@ void InterpreterMacroAssembler::narrow(Register result) {
}
void InterpreterMacroAssembler::jump_to_entry(address entry) {
assert(entry != NULL, "Entry must have been generated by now");
assert(entry != nullptr, "Entry must have been generated by now");
j(entry);
}
@ -156,7 +156,7 @@ void InterpreterMacroAssembler::check_and_handle_earlyret(Register java_thread)
if (JvmtiExport::can_force_early_return()) {
Label L;
ld(t0, Address(xthread, JavaThread::jvmti_thread_state_offset()));
beqz(t0, L); // if [thread->jvmti_thread_state() == NULL] then exit
beqz(t0, L); // if thread->jvmti_thread_state() is null then exit
// Initiate earlyret handling only if it is not already being processed.
// If the flag has the earlyret_processing bit set, it means that this code
@ -819,7 +819,7 @@ void InterpreterMacroAssembler::lock_object(Register lock_reg)
assert(lock_offset == 0,
"displached header must be first word in BasicObjectLock");
cmpxchg_obj_header(swap_reg, lock_reg, obj_reg, t0, count, /*fallthrough*/NULL);
cmpxchg_obj_header(swap_reg, lock_reg, obj_reg, t0, count, /*fallthrough*/nullptr);
// Test if the oopMark is an obvious stack pointer, i.e.,
// 1) (mark & 7) == 0, and
@ -899,7 +899,7 @@ void InterpreterMacroAssembler::unlock_object(Register lock_reg)
beqz(header_reg, count);
// Atomic swap back the old header
cmpxchg_obj_header(swap_reg, header_reg, obj_reg, t0, count, /*fallthrough*/NULL);
cmpxchg_obj_header(swap_reg, header_reg, obj_reg, t0, count, /*fallthrough*/nullptr);
// Call the runtime routine for slow case.
sd(obj_reg, Address(lock_reg, BasicObjectLock::obj_offset_in_bytes())); // restore obj
@ -930,7 +930,7 @@ void InterpreterMacroAssembler::set_method_data_pointer_for_bcp() {
Label set_mdp;
push_reg(RegSet::of(x10, x11), sp); // save x10, x11
// Test MDO to avoid the call if it is NULL.
// Test MDO to avoid the call if it is null.
ld(x10, Address(xmethod, in_bytes(Method::method_data_offset())));
beqz(x10, set_mdp);
call_VM_leaf(CAST_FROM_FN_PTR(address, InterpreterRuntime::bcp_to_di), xmethod, xbcp);
@ -1301,7 +1301,7 @@ void InterpreterMacroAssembler::record_item_in_profile_helper(
}
// In the fall-through case, we found no matching item, but we
// observed the item[start_row] is NULL.
// observed the item[start_row] is null.
// Fill in the item field and increment the count.
int item_offset = in_bytes(item_offset_fn(start_row));
set_mdp_data_at(mdp, item_offset, item);
@ -1319,19 +1319,19 @@ void InterpreterMacroAssembler::record_item_in_profile_helper(
// row[0].incr()
// goto done
// ]
// if (row[0].rec != NULL) then [
// if (row[0].rec != nullptr) then [
// # inner copy of decision tree, rooted at row[1]
// if (row[1].rec == rec) then [
// row[1].incr()
// goto done
// ]
// if (row[1].rec != NULL) then [
// if (row[1].rec != nullptr) then [
// # degenerate decision tree, rooted at row[2]
// if (row[2].rec == rec) then [
// row[2].incr()
// goto done
// ]
// if (row[2].rec != NULL) then [
// if (row[2].rec != nullptr) then [
// count.incr()
// goto done
// ] # overflow
@ -1613,7 +1613,7 @@ void InterpreterMacroAssembler::call_VM_leaf_base(address entry_point,
ld(t0, Address(fp, frame::interpreter_frame_last_sp_offset * wordSize));
beqz(t0, L);
stop("InterpreterMacroAssembler::call_VM_leaf_base:"
" last_sp != NULL");
" last_sp isn't null");
bind(L);
}
#endif /* ASSERT */
@ -1640,7 +1640,7 @@ void InterpreterMacroAssembler::call_VM_base(Register oop_result,
ld(t0, Address(fp, frame::interpreter_frame_last_sp_offset * wordSize));
beqz(t0, L);
stop("InterpreterMacroAssembler::call_VM_base:"
" last_sp != NULL");
" last_sp isn't null");
bind(L);
}
#endif /* ASSERT */