Skip to content

Commit b3ecd55

Browse files
committedFeb 1, 2024
8324679: Replace NULL with nullptr in HotSpot .ad files
Reviewed-by: kvn
1 parent 192349e commit b3ecd55

File tree

10 files changed

+332
-332
lines changed

10 files changed

+332
-332
lines changed
 

‎src/hotspot/cpu/aarch64/aarch64.ad

+34-34
Original file line numberDiff line numberDiff line change
@@ -1237,7 +1237,7 @@ source %{
12371237

12381238
// r27 is not allocatable when compressed oops is on and heapbase is not
12391239
// zero, compressed klass pointers doesn't use r27 after JDK-8234794
1240-
if (UseCompressedOops && (CompressedOops::ptrs_base() != NULL)) {
1240+
if (UseCompressedOops && (CompressedOops::ptrs_base() != nullptr)) {
12411241
_NO_SPECIAL_REG32_mask.Remove(OptoReg::as_OptoReg(r27->as_VMReg()));
12421242
_NO_SPECIAL_REG_mask.Remove(OptoReg::as_OptoReg(r27->as_VMReg()));
12431243
_NO_SPECIAL_PTR_REG_mask.Remove(OptoReg::as_OptoReg(r27->as_VMReg()));
@@ -1581,7 +1581,7 @@ bool needs_releasing_store(const Node *n)
15811581
{
15821582
// assert n->is_Store();
15831583
StoreNode *st = n->as_Store();
1584-
return st->trailing_membar() != NULL;
1584+
return st->trailing_membar() != nullptr;
15851585
}
15861586

15871587
// predicate controlling translation of CAS
@@ -1593,9 +1593,9 @@ bool needs_acquiring_load_exclusive(const Node *n)
15931593
assert(is_CAS(n->Opcode(), true), "expecting a compare and swap");
15941594
LoadStoreNode* ldst = n->as_LoadStore();
15951595
if (is_CAS(n->Opcode(), false)) {
1596-
assert(ldst->trailing_membar() != NULL, "expected trailing membar");
1596+
assert(ldst->trailing_membar() != nullptr, "expected trailing membar");
15971597
} else {
1598-
return ldst->trailing_membar() != NULL;
1598+
return ldst->trailing_membar() != nullptr;
15991599
}
16001600

16011601
// so we can just return true here
@@ -1734,7 +1734,7 @@ void MachPrologNode::format(PhaseRegAlloc *ra_, outputStream *st) const {
17341734
st->print("mov rscratch1, #%d\n\t", framesize - 2 * wordSize);
17351735
st->print("sub sp, sp, rscratch1");
17361736
}
1737-
if (C->stub_function() == NULL && BarrierSet::barrier_set()->barrier_set_nmethod() != NULL) {
1737+
if (C->stub_function() == nullptr && BarrierSet::barrier_set()->barrier_set_nmethod() != nullptr) {
17381738
st->print("\n\t");
17391739
st->print("ldr rscratch1, [guard]\n\t");
17401740
st->print("dmb ishld\n\t");
@@ -1783,9 +1783,9 @@ void MachPrologNode::emit(CodeBuffer &cbuf, PhaseRegAlloc *ra_) const {
17831783

17841784
__ build_frame(framesize);
17851785

1786-
if (C->stub_function() == NULL) {
1786+
if (C->stub_function() == nullptr) {
17871787
BarrierSetAssembler* bs = BarrierSet::barrier_set()->barrier_set_assembler();
1788-
if (BarrierSet::barrier_set()->barrier_set_nmethod() != NULL) {
1788+
if (BarrierSet::barrier_set()->barrier_set_nmethod() != nullptr) {
17891789
// Dummy labels for just measuring the code size
17901790
Label dummy_slow_path;
17911791
Label dummy_continuation;
@@ -2153,12 +2153,12 @@ void MachSpillCopyNode::format(PhaseRegAlloc *ra_, outputStream *st) const {
21532153
if (!ra_)
21542154
st->print("N%d = SpillCopy(N%d)", _idx, in(1)->_idx);
21552155
else
2156-
implementation(NULL, ra_, false, st);
2156+
implementation(nullptr, ra_, false, st);
21572157
}
21582158
#endif
21592159

21602160
void MachSpillCopyNode::emit(CodeBuffer &cbuf, PhaseRegAlloc *ra_) const {
2161-
implementation(&cbuf, ra_, false, NULL);
2161+
implementation(&cbuf, ra_, false, nullptr);
21622162
}
21632163

21642164
uint MachSpillCopyNode::size(PhaseRegAlloc *ra_) const {
@@ -2249,7 +2249,7 @@ int HandlerImpl::emit_exception_handler(CodeBuffer& cbuf)
22492249
// That's why we must use the macroassembler to generate a handler.
22502250
C2_MacroAssembler _masm(&cbuf);
22512251
address base = __ start_a_stub(size_exception_handler());
2252-
if (base == NULL) {
2252+
if (base == nullptr) {
22532253
ciEnv::current()->record_failure("CodeCache is full");
22542254
return 0; // CodeBuffer::expand failed
22552255
}
@@ -2267,7 +2267,7 @@ int HandlerImpl::emit_deopt_handler(CodeBuffer& cbuf)
22672267
// That's why we must use the macroassembler to generate a handler.
22682268
C2_MacroAssembler _masm(&cbuf);
22692269
address base = __ start_a_stub(size_deopt_handler());
2270-
if (base == NULL) {
2270+
if (base == nullptr) {
22712271
ciEnv::current()->record_failure("CodeCache is full");
22722272
return 0; // CodeBuffer::expand failed
22732273
}
@@ -2410,7 +2410,7 @@ MachOper* Matcher::pd_specialize_generic_vector_operand(MachOper* generic_opnd,
24102410
case Op_VecX: return new vecXOper();
24112411
}
24122412
ShouldNotReachHere();
2413-
return NULL;
2413+
return nullptr;
24142414
}
24152415

24162416
bool Matcher::is_reg2reg_move(MachNode* m) {
@@ -2583,7 +2583,7 @@ Assembler::Condition to_assembler_cond(BoolTest::mask cond) {
25832583

25842584
// Binary src (Replicate con)
25852585
bool is_valid_sve_arith_imm_pattern(Node* n, Node* m) {
2586-
if (n == NULL || m == NULL) {
2586+
if (n == nullptr || m == nullptr) {
25872587
return false;
25882588
}
25892589

@@ -2624,7 +2624,7 @@ bool is_valid_sve_arith_imm_pattern(Node* n, Node* m) {
26242624
// (XorV src (Replicate m1))
26252625
// (XorVMask src (MaskAll m1))
26262626
bool is_vector_bitwise_not_pattern(Node* n, Node* m) {
2627-
if (n != NULL && m != NULL) {
2627+
if (n != nullptr && m != nullptr) {
26282628
return (n->Opcode() == Op_XorV || n->Opcode() == Op_XorVMask) &&
26292629
VectorNode::is_all_ones_vector(m);
26302630
}
@@ -3430,7 +3430,7 @@ encode %{
34303430
C2_MacroAssembler _masm(&cbuf);
34313431
Register dst_reg = as_Register($dst$$reg);
34323432
address con = (address)$src$$constant;
3433-
if (con == NULL || con == (address)1) {
3433+
if (con == nullptr || con == (address)1) {
34343434
ShouldNotReachHere();
34353435
} else {
34363436
relocInfo::relocType rtype = $src->constant_reloc();
@@ -3473,7 +3473,7 @@ encode %{
34733473
C2_MacroAssembler _masm(&cbuf);
34743474
Register dst_reg = as_Register($dst$$reg);
34753475
address con = (address)$src$$constant;
3476-
if (con == NULL) {
3476+
if (con == nullptr) {
34773477
ShouldNotReachHere();
34783478
} else {
34793479
relocInfo::relocType rtype = $src->constant_reloc();
@@ -3492,7 +3492,7 @@ encode %{
34923492
C2_MacroAssembler _masm(&cbuf);
34933493
Register dst_reg = as_Register($dst$$reg);
34943494
address con = (address)$src$$constant;
3495-
if (con == NULL) {
3495+
if (con == nullptr) {
34963496
ShouldNotReachHere();
34973497
} else {
34983498
relocInfo::relocType rtype = $src->constant_reloc();
@@ -3675,7 +3675,7 @@ encode %{
36753675
Label miss;
36763676
C2_MacroAssembler _masm(&cbuf);
36773677
__ check_klass_subtype_slow_path(sub_reg, super_reg, temp_reg, result_reg,
3678-
NULL, &miss,
3678+
nullptr, &miss,
36793679
/*set_cond_codes:*/ true);
36803680
if ($primary) {
36813681
__ mov(result_reg, zr);
@@ -3691,7 +3691,7 @@ encode %{
36913691
if (!_method) {
36923692
// A call to a runtime wrapper, e.g. new, new_typeArray_Java, uncommon_trap.
36933693
call = __ trampoline_call(Address(addr, relocInfo::runtime_call_type));
3694-
if (call == NULL) {
3694+
if (call == nullptr) {
36953695
ciEnv::current()->record_failure("CodeCache is full");
36963696
return;
36973697
}
@@ -3705,7 +3705,7 @@ encode %{
37053705
RelocationHolder rspec = _optimized_virtual ? opt_virtual_call_Relocation::spec(method_index)
37063706
: static_call_Relocation::spec(method_index);
37073707
call = __ trampoline_call(Address(addr, rspec));
3708-
if (call == NULL) {
3708+
if (call == nullptr) {
37093709
ciEnv::current()->record_failure("CodeCache is full");
37103710
return;
37113711
}
@@ -3716,7 +3716,7 @@ encode %{
37163716
} else {
37173717
// Emit stub for static call
37183718
address stub = CompiledStaticCall::emit_to_interp_stub(cbuf, call);
3719-
if (stub == NULL) {
3719+
if (stub == nullptr) {
37203720
ciEnv::current()->record_failure("CodeCache is full");
37213721
return;
37223722
}
@@ -3735,7 +3735,7 @@ encode %{
37353735
C2_MacroAssembler _masm(&cbuf);
37363736
int method_index = resolved_method_index(cbuf);
37373737
address call = __ ic_call((address)$meth$$method, method_index);
3738-
if (call == NULL) {
3738+
if (call == nullptr) {
37393739
ciEnv::current()->record_failure("CodeCache is full");
37403740
return;
37413741
}
@@ -3764,7 +3764,7 @@ encode %{
37643764
CodeBlob *cb = CodeCache::find_blob(entry);
37653765
if (cb) {
37663766
address call = __ trampoline_call(Address(entry, relocInfo::runtime_call_type));
3767-
if (call == NULL) {
3767+
if (call == nullptr) {
37683768
ciEnv::current()->record_failure("CodeCache is full");
37693769
return;
37703770
}
@@ -4663,7 +4663,7 @@ operand immP()
46634663
interface(CONST_INTER);
46644664
%}
46654665

4666-
// NULL Pointer Immediate
4666+
// Null Pointer Immediate
46674667
operand immP0()
46684668
%{
46694669
predicate(n->get_ptr() == 0);
@@ -4795,7 +4795,7 @@ operand immN()
47954795
interface(CONST_INTER);
47964796
%}
47974797

4798-
// Narrow NULL Pointer Immediate
4798+
// Narrow Null Pointer Immediate
47994799
operand immN0()
48004800
%{
48014801
predicate(n->get_narrowcon() == 0);
@@ -7219,7 +7219,7 @@ instruct loadConP0(iRegPNoSp dst, immP0 con)
72197219
match(Set dst con);
72207220

72217221
ins_cost(INSN_COST);
7222-
format %{ "mov $dst, $con\t# NULL ptr" %}
7222+
format %{ "mov $dst, $con\t# null pointer" %}
72237223

72247224
ins_encode(aarch64_enc_mov_p0(dst, con));
72257225

@@ -7233,7 +7233,7 @@ instruct loadConP1(iRegPNoSp dst, immP_1 con)
72337233
match(Set dst con);
72347234

72357235
ins_cost(INSN_COST);
7236-
format %{ "mov $dst, $con\t# NULL ptr" %}
7236+
format %{ "mov $dst, $con\t# null pointer" %}
72377237

72387238
ins_encode(aarch64_enc_mov_p1(dst, con));
72397239

@@ -7275,7 +7275,7 @@ instruct loadConN0(iRegNNoSp dst, immN0 con)
72757275
match(Set dst con);
72767276

72777277
ins_cost(INSN_COST);
7278-
format %{ "mov $dst, $con\t# compressed NULL ptr" %}
7278+
format %{ "mov $dst, $con\t# compressed null pointer" %}
72797279

72807280
ins_encode(aarch64_enc_mov_n0(dst, con));
72817281

@@ -15257,7 +15257,7 @@ instruct clearArray_reg_reg(iRegL_R11 cnt, iRegP_R10 base, Universe dummy, rFlag
1525715257

1525815258
ins_encode %{
1525915259
address tpc = __ zero_words($base$$Register, $cnt$$Register);
15260-
if (tpc == NULL) {
15260+
if (tpc == nullptr) {
1526115261
ciEnv::current()->record_failure("CodeCache is full");
1526215262
return;
1526315263
}
@@ -15278,7 +15278,7 @@ instruct clearArray_imm_reg(immL cnt, iRegP_R10 base, iRegL_R11 temp, Universe d
1527815278

1527915279
ins_encode %{
1528015280
address tpc = __ zero_words($base$$Register, (uint64_t)$cnt$$constant);
15281-
if (tpc == NULL) {
15281+
if (tpc == nullptr) {
1528215282
ciEnv::current()->record_failure("CodeCache is full");
1528315283
return;
1528415284
}
@@ -17143,7 +17143,7 @@ instruct array_equalsB(iRegP_R1 ary1, iRegP_R2 ary2, iRegI_R0 result,
1714317143
address tpc = __ arrays_equals($ary1$$Register, $ary2$$Register,
1714417144
$tmp1$$Register, $tmp2$$Register, $tmp3$$Register,
1714517145
$result$$Register, $tmp$$Register, 1);
17146-
if (tpc == NULL) {
17146+
if (tpc == nullptr) {
1714717147
ciEnv::current()->record_failure("CodeCache is full");
1714817148
return;
1714917149
}
@@ -17168,7 +17168,7 @@ instruct array_equalsC(iRegP_R1 ary1, iRegP_R2 ary2, iRegI_R0 result,
1716817168
address tpc = __ arrays_equals($ary1$$Register, $ary2$$Register,
1716917169
$tmp1$$Register, $tmp2$$Register, $tmp3$$Register,
1717017170
$result$$Register, $tmp$$Register, 2);
17171-
if (tpc == NULL) {
17171+
if (tpc == nullptr) {
1717217172
ciEnv::current()->record_failure("CodeCache is full");
1717317173
return;
1717417174
}
@@ -17183,7 +17183,7 @@ instruct count_positives(iRegP_R1 ary1, iRegI_R2 len, iRegI_R0 result, rFlagsReg
1718317183
format %{ "count positives byte[] $ary1,$len -> $result" %}
1718417184
ins_encode %{
1718517185
address tpc = __ count_positives($ary1$$Register, $len$$Register, $result$$Register);
17186-
if (tpc == NULL) {
17186+
if (tpc == nullptr) {
1718717187
ciEnv::current()->record_failure("CodeCache is full");
1718817188
return;
1718917189
}
@@ -17226,7 +17226,7 @@ instruct string_inflate(Universe dummy, iRegP_R0 src, iRegP_R1 dst, iRegI_R2 len
1722617226
address tpc = __ byte_array_inflate($src$$Register, $dst$$Register, $len$$Register,
1722717227
$vtmp0$$FloatRegister, $vtmp1$$FloatRegister,
1722817228
$vtmp2$$FloatRegister, $tmp$$Register);
17229-
if (tpc == NULL) {
17229+
if (tpc == nullptr) {
1723017230
ciEnv::current()->record_failure("CodeCache is full");
1723117231
return;
1723217232
}

‎src/hotspot/cpu/arm/arm.ad

+14-14
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ void emit_call_reloc(CodeBuffer &cbuf, const MachCallNode *n, MachOper *m, Reloc
195195
assert(maybe_far_call(n) == !__ reachable_from_cache(target), "sanity");
196196
assert(cache_reachable() == __ cache_fully_reachable(), "sanity");
197197

198-
assert(target != NULL, "need real address");
198+
assert(target != nullptr, "need real address");
199199

200200
int ret_addr_offset = -1;
201201
if (rspec.type() == relocInfo::runtime_call_type) {
@@ -290,7 +290,7 @@ void MachPrologNode::format( PhaseRegAlloc *ra_, outputStream *st ) const {
290290
st->print ("SUB R_SP, R_SP, " SIZE_FORMAT,framesize);
291291
}
292292

293-
if (C->stub_function() == NULL && BarrierSet::barrier_set()->barrier_set_nmethod() != NULL) {
293+
if (C->stub_function() == nullptr && BarrierSet::barrier_set()->barrier_set_nmethod() != nullptr) {
294294
st->print("ldr t0, [guard]\n\t");
295295
st->print("ldr t1, [Rthread, #thread_disarmed_guard_value_offset]\n\t");
296296
st->print("cmp t0, t1\n\t");
@@ -332,7 +332,7 @@ void MachPrologNode::emit(CodeBuffer &cbuf, PhaseRegAlloc *ra_) const {
332332
__ sub_slow(SP, SP, framesize);
333333
}
334334

335-
if (C->stub_function() == NULL) {
335+
if (C->stub_function() == nullptr) {
336336
BarrierSetAssembler* bs = BarrierSet::barrier_set()->barrier_set_assembler();
337337
bs->nmethod_entry_barrier(&_masm);
338338
}
@@ -454,7 +454,7 @@ uint MachSpillCopyNode::implementation( CodeBuffer *cbuf,
454454
return size; // Self copy, no move
455455

456456
#ifdef TODO
457-
if (bottom_type()->isa_vect() != NULL) {
457+
if (bottom_type()->isa_vect() != nullptr) {
458458
}
459459
#endif
460460

@@ -804,16 +804,16 @@ uint MachSpillCopyNode::implementation( CodeBuffer *cbuf,
804804

805805
#ifndef PRODUCT
806806
void MachSpillCopyNode::format( PhaseRegAlloc *ra_, outputStream *st ) const {
807-
implementation( NULL, ra_, false, st );
807+
implementation(nullptr, ra_, false, st );
808808
}
809809
#endif
810810

811811
void MachSpillCopyNode::emit(CodeBuffer &cbuf, PhaseRegAlloc *ra_) const {
812-
implementation( &cbuf, ra_, false, NULL );
812+
implementation( &cbuf, ra_, false, nullptr );
813813
}
814814

815815
uint MachSpillCopyNode::size(PhaseRegAlloc *ra_) const {
816-
return implementation( NULL, ra_, true, NULL );
816+
return implementation( nullptr, ra_, true, nullptr );
817817
}
818818

819819
//=============================================================================
@@ -903,7 +903,7 @@ int HandlerImpl::emit_exception_handler(CodeBuffer& cbuf) {
903903
C2_MacroAssembler _masm(&cbuf);
904904

905905
address base = __ start_a_stub(size_exception_handler());
906-
if (base == NULL) {
906+
if (base == nullptr) {
907907
ciEnv::current()->record_failure("CodeCache is full");
908908
return 0; // CodeBuffer::expand failed
909909
}
@@ -926,7 +926,7 @@ int HandlerImpl::emit_deopt_handler(CodeBuffer& cbuf) {
926926
C2_MacroAssembler _masm(&cbuf);
927927

928928
address base = __ start_a_stub(size_deopt_handler());
929-
if (base == NULL) {
929+
if (base == nullptr) {
930930
ciEnv::current()->record_failure("CodeCache is full");
931931
return 0; // CodeBuffer::expand failed
932932
}
@@ -1026,11 +1026,11 @@ bool Matcher::vector_needs_partial_operations(Node* node, const TypeVect* vt) {
10261026
}
10271027

10281028
const RegMask* Matcher::predicate_reg_mask(void) {
1029-
return NULL;
1029+
return nullptr;
10301030
}
10311031

10321032
const TypeVectMask* Matcher::predicate_reg_type(const Type* elemTy, int length) {
1033-
return NULL;
1033+
return nullptr;
10341034
}
10351035

10361036
// Vector calling convention not yet implemented.
@@ -1094,7 +1094,7 @@ bool Matcher::is_short_branch_offset(int rule, int br_size, int offset) {
10941094

10951095
MachOper* Matcher::pd_specialize_generic_vector_operand(MachOper* original_opnd, uint ideal_reg, bool is_temp) {
10961096
ShouldNotReachHere(); // generic vector operands not supported
1097-
return NULL;
1097+
return nullptr;
10981098
}
10991099

11001100
bool Matcher::is_reg2reg_move(MachNode* m) {
@@ -1242,7 +1242,7 @@ encode %{
12421242

12431243
// Emit stubs for static call.
12441244
address stub = CompiledStaticCall::emit_to_interp_stub(cbuf);
1245-
if (stub == NULL) {
1245+
if (stub == nullptr) {
12461246
ciEnv::current()->record_failure("CodeCache is full");
12471247
return;
12481248
}
@@ -1987,7 +1987,7 @@ operand immNKlass()
19871987
interface(CONST_INTER);
19881988
%}
19891989

1990-
// NULL Pointer Immediate
1990+
// Null Pointer Immediate
19911991
operand immN0()
19921992
%{
19931993
predicate(n->get_narrowcon() == 0);

‎src/hotspot/cpu/arm/arm_32.ad

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
//
2-
// Copyright (c) 2008, 2022, Oracle and/or its affiliates. All rights reserved.
2+
// Copyright (c) 2008, 2024, Oracle and/or its affiliates. All rights reserved.
33
// DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
//
55
// This code is free software; you can redistribute it and/or modify it
@@ -431,7 +431,7 @@ OptoRegPair c2::return_value(int ideal_reg) {
431431
// will point.
432432

433433
int MachCallStaticJavaNode::ret_addr_offset() {
434-
bool far = (_method == NULL) ? maybe_far_call(this) : !cache_reachable();
434+
bool far = (_method == nullptr) ? maybe_far_call(this) : !cache_reachable();
435435
return ((far ? 3 : 1) + (_method_handle_invoke ? 1 : 0)) *
436436
NativeInstruction::instruction_size;
437437
}

‎src/hotspot/cpu/ppc/ppc.ad

+106-106
Large diffs are not rendered by default.

‎src/hotspot/cpu/riscv/riscv.ad

+53-53
Large diffs are not rendered by default.

‎src/hotspot/cpu/s390/macroAssembler_s390.cpp

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2016, 2023, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved.
33
* Copyright (c) 2016, 2023 SAP SE. All rights reserved.
44
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
55
*
@@ -3744,7 +3744,7 @@ void MacroAssembler::compare_klass_ptr(Register Rop1, int64_t disp, Register Rba
37443744
Register current = Rop1;
37453745
Label done;
37463746

3747-
if (maybenull) { // null ptr must be preserved!
3747+
if (maybenull) { // null pointer must be preserved!
37483748
z_ltgr(Z_R0, current);
37493749
z_bre(done);
37503750
current = Z_R0;
@@ -3883,7 +3883,7 @@ void MacroAssembler::compare_heap_oop(Register Rop1, Address mem, bool maybenull
38833883
Label done;
38843884
int pow2_offset = get_oop_base_complement(Z_R1, ((uint64_t)(intptr_t)base));
38853885

3886-
if (maybenull) { // null ptr must be preserved!
3886+
if (maybenull) { // null pointer must be preserved!
38873887
z_ltgr(Z_R0, Rop1);
38883888
z_bre(done);
38893889
}
@@ -4123,7 +4123,7 @@ void MacroAssembler::oop_decoder(Register Rdst, Register Rsrc, bool maybenull, R
41234123
Label done;
41244124

41254125
// Rsrc contains a narrow oop. Thus we are sure the leftmost <oop_shift> bits will never be set.
4126-
if (maybenull) { // null ptr must be preserved!
4126+
if (maybenull) { // null pointer must be preserved!
41274127
z_slag(Rdst, Rsrc, oop_shift); // Arithmetic shift sets the condition code.
41284128
z_bre(done);
41294129
} else {
@@ -4185,7 +4185,7 @@ void MacroAssembler::oop_decoder(Register Rdst, Register Rsrc, bool maybenull, R
41854185

41864186
// Scale oop and check for null.
41874187
// Rsrc contains a narrow oop. Thus we are sure the leftmost <oop_shift> bits will never be set.
4188-
if (maybenull) { // null ptr must be preserved!
4188+
if (maybenull) { // null pointer must be preserved!
41894189
z_slag(Rdst_tmp, Rsrc, oop_shift); // Arithmetic shift sets the condition code.
41904190
z_bre(done);
41914191
} else {

‎src/hotspot/cpu/s390/s390.ad

+51-51
Large diffs are not rendered by default.

‎src/hotspot/cpu/x86/x86.ad

+29-29
Original file line numberDiff line numberDiff line change
@@ -1312,7 +1312,7 @@ int HandlerImpl::emit_exception_handler(CodeBuffer& cbuf) {
13121312
// That's why we must use the macroassembler to generate a handler.
13131313
C2_MacroAssembler _masm(&cbuf);
13141314
address base = __ start_a_stub(size_exception_handler());
1315-
if (base == NULL) {
1315+
if (base == nullptr) {
13161316
ciEnv::current()->record_failure("CodeCache is full");
13171317
return 0; // CodeBuffer::expand failed
13181318
}
@@ -1330,7 +1330,7 @@ int HandlerImpl::emit_deopt_handler(CodeBuffer& cbuf) {
13301330
// That's why we must use the macroassembler to generate a handler.
13311331
C2_MacroAssembler _masm(&cbuf);
13321332
address base = __ start_a_stub(size_deopt_handler());
1333-
if (base == NULL) {
1333+
if (base == nullptr) {
13341334
ciEnv::current()->record_failure("CodeCache is full");
13351335
return 0; // CodeBuffer::expand failed
13361336
}
@@ -2181,7 +2181,7 @@ MachOper* Matcher::pd_specialize_generic_vector_operand(MachOper* generic_opnd,
21812181
}
21822182
}
21832183
ShouldNotReachHere();
2184-
return NULL;
2184+
return nullptr;
21852185
}
21862186

21872187
bool Matcher::is_reg2reg_move(MachNode* m) {
@@ -2350,7 +2350,7 @@ class FusedPatternMatcher {
23502350
int _con_op;
23512351

23522352
static int match_next(Node* n, int next_op, int next_op_idx) {
2353-
if (n->in(1) == NULL || n->in(2) == NULL) {
2353+
if (n->in(1) == nullptr || n->in(2) == nullptr) {
23542354
return -1;
23552355
}
23562356

@@ -2417,7 +2417,7 @@ class FusedPatternMatcher {
24172417

24182418
static bool is_bmi_pattern(Node* n, Node* m) {
24192419
assert(UseBMI1Instructions, "sanity");
2420-
if (n != NULL && m != NULL) {
2420+
if (n != nullptr && m != nullptr) {
24212421
if (m->Opcode() == Op_LoadI) {
24222422
FusedPatternMatcher<TypeInt> bmii(n, m, Op_ConI);
24232423
return bmii.match(Op_AndI, -1, Op_SubI, 1, 0) ||
@@ -7441,7 +7441,7 @@ instruct vround_reg_evex(vec dst, vec src, rRegP tmp, vec xtmp1, vec xtmp2, kReg
74417441
// --------------------------------- VectorMaskCmp --------------------------------------
74427442

74437443
instruct vcmpFD(legVec dst, legVec src1, legVec src2, immI8 cond) %{
7444-
predicate(n->bottom_type()->isa_vectmask() == NULL &&
7444+
predicate(n->bottom_type()->isa_vectmask() == nullptr &&
74457445
Matcher::vector_length_in_bytes(n->in(1)->in(1)) >= 8 && // src1
74467446
Matcher::vector_length_in_bytes(n->in(1)->in(1)) <= 32 && // src1
74477447
is_floating_point_type(Matcher::vector_element_basic_type(n->in(1)->in(1)))); // src1 T_FLOAT, T_DOUBLE
@@ -7461,7 +7461,7 @@ instruct vcmpFD(legVec dst, legVec src1, legVec src2, immI8 cond) %{
74617461

74627462
instruct evcmpFD64(vec dst, vec src1, vec src2, immI8 cond, kReg ktmp) %{
74637463
predicate(Matcher::vector_length_in_bytes(n->in(1)->in(1)) == 64 && // src1
7464-
n->bottom_type()->isa_vectmask() == NULL &&
7464+
n->bottom_type()->isa_vectmask() == nullptr &&
74657465
is_floating_point_type(Matcher::vector_element_basic_type(n->in(1)->in(1)))); // src1 T_FLOAT, T_DOUBLE
74667466
match(Set dst (VectorMaskCmp (Binary src1 src2) cond));
74677467
effect(TEMP ktmp);
@@ -7501,7 +7501,7 @@ instruct evcmpFD(kReg dst, vec src1, vec src2, immI8 cond) %{
75017501
%}
75027502

75037503
instruct vcmp_direct(legVec dst, legVec src1, legVec src2, immI8 cond) %{
7504-
predicate(n->bottom_type()->isa_vectmask() == NULL &&
7504+
predicate(n->bottom_type()->isa_vectmask() == nullptr &&
75057505
!Matcher::is_unsigned_booltest_pred(n->in(2)->get_int()) &&
75067506
Matcher::vector_length_in_bytes(n->in(1)->in(1)) >= 4 && // src1
75077507
Matcher::vector_length_in_bytes(n->in(1)->in(1)) <= 32 && // src1
@@ -7521,7 +7521,7 @@ instruct vcmp_direct(legVec dst, legVec src1, legVec src2, immI8 cond) %{
75217521
%}
75227522

75237523
instruct vcmp_negate(legVec dst, legVec src1, legVec src2, immI8 cond, legVec xtmp) %{
7524-
predicate(n->bottom_type()->isa_vectmask() == NULL &&
7524+
predicate(n->bottom_type()->isa_vectmask() == nullptr &&
75257525
!Matcher::is_unsigned_booltest_pred(n->in(2)->get_int()) &&
75267526
Matcher::vector_length_in_bytes(n->in(1)->in(1)) >= 4 && // src1
75277527
Matcher::vector_length_in_bytes(n->in(1)->in(1)) <= 32 && // src1
@@ -7542,7 +7542,7 @@ instruct vcmp_negate(legVec dst, legVec src1, legVec src2, immI8 cond, legVec xt
75427542
%}
75437543

75447544
instruct vcmpu(legVec dst, legVec src1, legVec src2, immI8 cond, legVec xtmp) %{
7545-
predicate(n->bottom_type()->isa_vectmask() == NULL &&
7545+
predicate(n->bottom_type()->isa_vectmask() == nullptr &&
75467546
Matcher::is_unsigned_booltest_pred(n->in(2)->get_int()) &&
75477547
Matcher::vector_length_in_bytes(n->in(1)->in(1)) >= 4 && // src1
75487548
Matcher::vector_length_in_bytes(n->in(1)->in(1)) <= 32 && // src1
@@ -7569,7 +7569,7 @@ instruct vcmpu(legVec dst, legVec src1, legVec src2, immI8 cond, legVec xtmp) %{
75697569
%}
75707570

75717571
instruct vcmp64(vec dst, vec src1, vec src2, immI8 cond, kReg ktmp) %{
7572-
predicate((n->bottom_type()->isa_vectmask() == NULL &&
7572+
predicate((n->bottom_type()->isa_vectmask() == nullptr &&
75737573
Matcher::vector_length_in_bytes(n->in(1)->in(1)) == 64) && // src1
75747574
is_integral_type(Matcher::vector_element_basic_type(n->in(1)->in(1)))); // src1
75757575
match(Set dst (VectorMaskCmp (Binary src1 src2) cond));
@@ -7785,7 +7785,7 @@ instruct blendvp(vec dst, vec src, vec mask, rxmm0 tmp) %{
77857785

77867786
instruct vblendvpI(legVec dst, legVec src1, legVec src2, legVec mask) %{
77877787
predicate(UseAVX > 0 && !EnableX86ECoreOpts &&
7788-
n->in(2)->bottom_type()->isa_vectmask() == NULL &&
7788+
n->in(2)->bottom_type()->isa_vectmask() == nullptr &&
77897789
Matcher::vector_length_in_bytes(n) <= 32 &&
77907790
is_integral_type(Matcher::vector_element_basic_type(n)));
77917791
match(Set dst (VectorBlend (Binary src1 src2) mask));
@@ -7799,7 +7799,7 @@ instruct vblendvpI(legVec dst, legVec src1, legVec src2, legVec mask) %{
77997799

78007800
instruct vblendvpFD(legVec dst, legVec src1, legVec src2, legVec mask) %{
78017801
predicate(UseAVX > 0 && !EnableX86ECoreOpts &&
7802-
n->in(2)->bottom_type()->isa_vectmask() == NULL &&
7802+
n->in(2)->bottom_type()->isa_vectmask() == nullptr &&
78037803
Matcher::vector_length_in_bytes(n) <= 32 &&
78047804
!is_integral_type(Matcher::vector_element_basic_type(n)));
78057805
match(Set dst (VectorBlend (Binary src1 src2) mask));
@@ -7813,7 +7813,7 @@ instruct vblendvpFD(legVec dst, legVec src1, legVec src2, legVec mask) %{
78137813

78147814
instruct vblendvp(legVec dst, legVec src1, legVec src2, legVec mask, legVec vtmp) %{
78157815
predicate(UseAVX > 0 && EnableX86ECoreOpts &&
7816-
n->in(2)->bottom_type()->isa_vectmask() == NULL &&
7816+
n->in(2)->bottom_type()->isa_vectmask() == nullptr &&
78177817
Matcher::vector_length_in_bytes(n) <= 32);
78187818
match(Set dst (VectorBlend (Binary src1 src2) mask));
78197819
format %{ "vector_blend $dst,$src1,$src2,$mask\t! using $vtmp as TEMP" %}
@@ -7829,7 +7829,7 @@ instruct vblendvp(legVec dst, legVec src1, legVec src2, legVec mask, legVec vtmp
78297829

78307830
instruct evblendvp64(vec dst, vec src1, vec src2, vec mask, kReg ktmp) %{
78317831
predicate(Matcher::vector_length_in_bytes(n) == 64 &&
7832-
n->in(2)->bottom_type()->isa_vectmask() == NULL);
7832+
n->in(2)->bottom_type()->isa_vectmask() == nullptr);
78337833
match(Set dst (VectorBlend (Binary src1 src2) mask));
78347834
format %{ "vector_blend $dst,$src1,$src2,$mask\t! using k2 as TEMP" %}
78357835
effect(TEMP ktmp);
@@ -8046,7 +8046,7 @@ instruct ktest_ge8(rFlagsRegU cr, kReg src1, kReg src2) %{
80468046
//------------------------------------- LoadMask --------------------------------------------
80478047

80488048
instruct loadMask(legVec dst, legVec src) %{
8049-
predicate(n->bottom_type()->isa_vectmask() == NULL && !VM_Version::supports_avx512vlbw());
8049+
predicate(n->bottom_type()->isa_vectmask() == nullptr && !VM_Version::supports_avx512vlbw());
80508050
match(Set dst (VectorLoadMask src));
80518051
effect(TEMP dst);
80528052
format %{ "vector_loadmask_byte $dst, $src\n\t" %}
@@ -8086,7 +8086,7 @@ instruct loadMask_evex(kReg dst, vec src, vec xtmp) %{
80868086
//------------------------------------- StoreMask --------------------------------------------
80878087

80888088
instruct vstoreMask1B(vec dst, vec src, immI_1 size) %{
8089-
predicate(Matcher::vector_length(n) < 64 && n->in(1)->bottom_type()->isa_vectmask() == NULL);
8089+
predicate(Matcher::vector_length(n) < 64 && n->in(1)->bottom_type()->isa_vectmask() == nullptr);
80908090
match(Set dst (VectorStoreMask src size));
80918091
format %{ "vector_store_mask $dst, $src \t! elem size is $size byte[s]" %}
80928092
ins_encode %{
@@ -8104,7 +8104,7 @@ instruct vstoreMask1B(vec dst, vec src, immI_1 size) %{
81048104
%}
81058105

81068106
instruct vstoreMask2B(vec dst, vec src, vec xtmp, immI_2 size) %{
8107-
predicate(Matcher::vector_length(n) <= 16 && n->in(1)->bottom_type()->isa_vectmask() == NULL);
8107+
predicate(Matcher::vector_length(n) <= 16 && n->in(1)->bottom_type()->isa_vectmask() == nullptr);
81088108
match(Set dst (VectorStoreMask src size));
81098109
effect(TEMP_DEF dst, TEMP xtmp);
81108110
format %{ "vector_store_mask $dst, $src \t! elem size is $size byte[s]" %}
@@ -8127,7 +8127,7 @@ instruct vstoreMask2B(vec dst, vec src, vec xtmp, immI_2 size) %{
81278127
%}
81288128

81298129
instruct vstoreMask4B(vec dst, vec src, vec xtmp, immI_4 size) %{
8130-
predicate(UseAVX <= 2 && Matcher::vector_length(n) <= 8 && n->in(1)->bottom_type()->isa_vectmask() == NULL);
8130+
predicate(UseAVX <= 2 && Matcher::vector_length(n) <= 8 && n->in(1)->bottom_type()->isa_vectmask() == nullptr);
81318131
match(Set dst (VectorStoreMask src size));
81328132
format %{ "vector_store_mask $dst, $src \t! elem size is $size byte[s]" %}
81338133
effect(TEMP_DEF dst, TEMP xtmp);
@@ -8187,7 +8187,7 @@ instruct storeMask8B_avx(vec dst, vec src, immI_8 size, vec vtmp) %{
81878187
%}
81888188

81898189
instruct vstoreMask4B_evex_novectmask(vec dst, vec src, immI_4 size) %{
8190-
predicate(UseAVX > 2 && n->in(1)->bottom_type()->isa_vectmask() == NULL);
8190+
predicate(UseAVX > 2 && n->in(1)->bottom_type()->isa_vectmask() == nullptr);
81918191
match(Set dst (VectorStoreMask src size));
81928192
format %{ "vector_store_mask $dst, $src \t! elem size is $size byte[s]" %}
81938193
ins_encode %{
@@ -8203,7 +8203,7 @@ instruct vstoreMask4B_evex_novectmask(vec dst, vec src, immI_4 size) %{
82038203
%}
82048204

82058205
instruct vstoreMask8B_evex_novectmask(vec dst, vec src, immI_8 size) %{
8206-
predicate(UseAVX > 2 && n->in(1)->bottom_type()->isa_vectmask() == NULL);
8206+
predicate(UseAVX > 2 && n->in(1)->bottom_type()->isa_vectmask() == nullptr);
82078207
match(Set dst (VectorStoreMask src size));
82088208
format %{ "vector_store_mask $dst, $src \t! elem size is $size byte[s]" %}
82098209
ins_encode %{
@@ -9040,7 +9040,7 @@ instruct vmask_tolong_evex(rRegL dst, kReg mask, rFlagsReg cr) %{
90409040
%}
90419041

90429042
instruct vmask_tolong_bool(rRegL dst, vec mask, vec xtmp, rFlagsReg cr) %{
9043-
predicate(n->in(1)->bottom_type()->isa_vectmask() == NULL);
9043+
predicate(n->in(1)->bottom_type()->isa_vectmask() == nullptr);
90449044
match(Set dst (VectorMaskToLong mask));
90459045
format %{ "vector_tolong_bool $dst, $mask \t! using $xtmp as TEMP" %}
90469046
effect(TEMP_DEF dst, TEMP xtmp, KILL cr);
@@ -9056,7 +9056,7 @@ instruct vmask_tolong_bool(rRegL dst, vec mask, vec xtmp, rFlagsReg cr) %{
90569056
%}
90579057

90589058
instruct vmask_tolong_avx(rRegL dst, vec mask, immI size, vec xtmp, rFlagsReg cr) %{
9059-
predicate(n->in(1)->in(1)->bottom_type()->isa_vectmask() == NULL);
9059+
predicate(n->in(1)->in(1)->bottom_type()->isa_vectmask() == nullptr);
90609060
match(Set dst (VectorMaskToLong (VectorStoreMask mask size)));
90619061
format %{ "vector_tolong_avx $dst, $mask \t! using $xtmp as TEMP" %}
90629062
effect(TEMP_DEF dst, TEMP xtmp, KILL cr);
@@ -9089,7 +9089,7 @@ instruct vmask_truecount_evex(rRegI dst, kReg mask, rRegL tmp, rFlagsReg cr) %{
90899089
%}
90909090

90919091
instruct vmask_truecount_bool(rRegI dst, vec mask, rRegL tmp, vec xtmp, rFlagsReg cr) %{
9092-
predicate(n->in(1)->bottom_type()->isa_vectmask() == NULL);
9092+
predicate(n->in(1)->bottom_type()->isa_vectmask() == nullptr);
90939093
match(Set dst (VectorMaskTrueCount mask));
90949094
effect(TEMP_DEF dst, TEMP tmp, TEMP xtmp, KILL cr);
90959095
format %{ "vector_truecount_bool $dst, $mask \t! using $tmp, $xtmp as TEMP" %}
@@ -9105,7 +9105,7 @@ instruct vmask_truecount_bool(rRegI dst, vec mask, rRegL tmp, vec xtmp, rFlagsRe
91059105
%}
91069106

91079107
instruct vmask_truecount_avx(rRegI dst, vec mask, immI size, rRegL tmp, vec xtmp, rFlagsReg cr) %{
9108-
predicate(n->in(1)->in(1)->bottom_type()->isa_vectmask() == NULL);
9108+
predicate(n->in(1)->in(1)->bottom_type()->isa_vectmask() == nullptr);
91099109
match(Set dst (VectorMaskTrueCount (VectorStoreMask mask size)));
91109110
effect(TEMP_DEF dst, TEMP tmp, TEMP xtmp, KILL cr);
91119111
format %{ "vector_truecount_avx $dst, $mask \t! using $tmp, $xtmp as TEMP" %}
@@ -9139,7 +9139,7 @@ instruct vmask_first_or_last_true_evex(rRegI dst, kReg mask, rRegL tmp, rFlagsRe
91399139
%}
91409140

91419141
instruct vmask_first_or_last_true_bool(rRegI dst, vec mask, rRegL tmp, vec xtmp, rFlagsReg cr) %{
9142-
predicate(n->in(1)->bottom_type()->isa_vectmask() == NULL);
9142+
predicate(n->in(1)->bottom_type()->isa_vectmask() == nullptr);
91439143
match(Set dst (VectorMaskFirstTrue mask));
91449144
match(Set dst (VectorMaskLastTrue mask));
91459145
effect(TEMP_DEF dst, TEMP tmp, TEMP xtmp, KILL cr);
@@ -9156,7 +9156,7 @@ instruct vmask_first_or_last_true_bool(rRegI dst, vec mask, rRegL tmp, vec xtmp,
91569156
%}
91579157

91589158
instruct vmask_first_or_last_true_avx(rRegI dst, vec mask, immI size, rRegL tmp, vec xtmp, rFlagsReg cr) %{
9159-
predicate(n->in(1)->in(1)->bottom_type()->isa_vectmask() == NULL);
9159+
predicate(n->in(1)->in(1)->bottom_type()->isa_vectmask() == nullptr);
91609160
match(Set dst (VectorMaskFirstTrue (VectorStoreMask mask size)));
91619161
match(Set dst (VectorMaskLastTrue (VectorStoreMask mask size)));
91629162
effect(TEMP_DEF dst, TEMP tmp, TEMP xtmp, KILL cr);
@@ -10011,7 +10011,7 @@ instruct mask_not_imm(kReg dst, kReg src, immI_M1 cnt) %{
1001110011
%}
1001210012

1001310013
instruct long_to_maskLE8_avx(vec dst, rRegL src, rRegL rtmp1, rRegL rtmp2, vec xtmp) %{
10014-
predicate(n->bottom_type()->isa_vectmask() == NULL && Matcher::vector_length(n) <= 8);
10014+
predicate(n->bottom_type()->isa_vectmask() == nullptr && Matcher::vector_length(n) <= 8);
1001510015
match(Set dst (VectorLongToMask src));
1001610016
effect(TEMP dst, TEMP rtmp1, TEMP rtmp2, TEMP xtmp);
1001710017
format %{ "long_to_mask_avx $dst, $src\t! using $rtmp1, $rtmp2, $xtmp as TEMP" %}
@@ -10026,7 +10026,7 @@ instruct long_to_maskLE8_avx(vec dst, rRegL src, rRegL rtmp1, rRegL rtmp2, vec x
1002610026

1002710027

1002810028
instruct long_to_maskGT8_avx(vec dst, rRegL src, rRegL rtmp1, rRegL rtmp2, vec xtmp1, rFlagsReg cr) %{
10029-
predicate(n->bottom_type()->isa_vectmask() == NULL && Matcher::vector_length(n) > 8);
10029+
predicate(n->bottom_type()->isa_vectmask() == nullptr && Matcher::vector_length(n) > 8);
1003010030
match(Set dst (VectorLongToMask src));
1003110031
effect(TEMP dst, TEMP rtmp1, TEMP rtmp2, TEMP xtmp1, KILL cr);
1003210032
format %{ "long_to_mask_avx $dst, $src\t! using $rtmp1, $rtmp2, $xtmp1, as TEMP" %}

‎src/hotspot/cpu/x86/x86_32.ad

+7-7
Original file line numberDiff line numberDiff line change
@@ -614,7 +614,7 @@ void MachPrologNode::emit(CodeBuffer &cbuf, PhaseRegAlloc *ra_) const {
614614
int framesize = C->output()->frame_size_in_bytes();
615615
int bangsize = C->output()->bang_size_in_bytes();
616616

617-
__ verified_entry(framesize, C->output()->need_stack_bang(bangsize)?bangsize:0, C->in_24_bit_fp_mode(), C->stub_function() != NULL);
617+
__ verified_entry(framesize, C->output()->need_stack_bang(bangsize)?bangsize:0, C->in_24_bit_fp_mode(), C->stub_function() != nullptr);
618618

619619
C->output()->set_frame_complete(cbuf.insts_size());
620620

@@ -1052,7 +1052,7 @@ uint MachSpillCopyNode::implementation( CodeBuffer *cbuf, PhaseRegAlloc *ra_, bo
10521052
if( src_first == dst_first && src_second == dst_second )
10531053
return size; // Self copy, no move
10541054

1055-
if (bottom_type()->isa_vect() != NULL && bottom_type()->isa_vectmask() == NULL) {
1055+
if (bottom_type()->isa_vect() != nullptr && bottom_type()->isa_vectmask() == nullptr) {
10561056
uint ireg = ideal_reg();
10571057
assert((src_first_rc != rc_int && dst_first_rc != rc_int), "sanity");
10581058
assert((src_first_rc != rc_float && dst_first_rc != rc_float), "sanity");
@@ -1320,12 +1320,12 @@ uint MachSpillCopyNode::implementation( CodeBuffer *cbuf, PhaseRegAlloc *ra_, bo
13201320

13211321
#ifndef PRODUCT
13221322
void MachSpillCopyNode::format(PhaseRegAlloc *ra_, outputStream* st) const {
1323-
implementation( NULL, ra_, false, st );
1323+
implementation( nullptr, ra_, false, st );
13241324
}
13251325
#endif
13261326

13271327
void MachSpillCopyNode::emit(CodeBuffer &cbuf, PhaseRegAlloc *ra_) const {
1328-
implementation( &cbuf, ra_, false, NULL );
1328+
implementation( &cbuf, ra_, false, nullptr );
13291329
}
13301330

13311331
uint MachSpillCopyNode::size(PhaseRegAlloc *ra_) const {
@@ -1725,7 +1725,7 @@ encode %{
17251725

17261726
MacroAssembler _masm(&cbuf);
17271727
__ check_klass_subtype_slow_path(Resi, Reax, Recx, Redi,
1728-
NULL, &miss,
1728+
nullptr, &miss,
17291729
/*set_cond_codes:*/ true);
17301730
if ($primary) {
17311731
__ xorptr(Redi, Redi);
@@ -1843,7 +1843,7 @@ encode %{
18431843
} else {
18441844
// Emit stubs for static call.
18451845
address stub = CompiledStaticCall::emit_to_interp_stub(cbuf, mark);
1846-
if (stub == NULL) {
1846+
if (stub == nullptr) {
18471847
ciEnv::current()->record_failure("CodeCache is full");
18481848
return;
18491849
}
@@ -3396,7 +3396,7 @@ operand immP() %{
33963396
interface(CONST_INTER);
33973397
%}
33983398

3399-
// NULL Pointer Immediate
3399+
// Null Pointer Immediate
34003400
operand immP0() %{
34013401
predicate( n->get_ptr() == 0 );
34023402
match(ConP);

‎src/hotspot/cpu/x86/x86_64.ad

+31-31
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
//
2-
// Copyright (c) 2003, 2023, Oracle and/or its affiliates. All rights reserved.
2+
// Copyright (c) 2003, 2024, Oracle and/or its affiliates. All rights reserved.
33
// DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
//
55
// This code is free software; you can redistribute it and/or modify it
@@ -706,7 +706,7 @@ void MachPrologNode::format(PhaseRegAlloc* ra_, outputStream* st) const {
706706
st->print("# stack alignment check");
707707
#endif
708708
}
709-
if (C->stub_function() != NULL && BarrierSet::barrier_set()->barrier_set_nmethod() != NULL) {
709+
if (C->stub_function() != nullptr && BarrierSet::barrier_set()->barrier_set_nmethod() != nullptr) {
710710
st->print("\n\t");
711711
st->print("cmpl [r15_thread + #disarmed_guard_value_offset], #disarmed_guard_value\t");
712712
st->print("\n\t");
@@ -741,7 +741,7 @@ void MachPrologNode::emit(CodeBuffer &cbuf, PhaseRegAlloc *ra_) const {
741741
__ bind(L_skip_barrier);
742742
}
743743

744-
__ verified_entry(framesize, C->output()->need_stack_bang(bangsize)?bangsize:0, false, C->stub_function() != NULL);
744+
__ verified_entry(framesize, C->output()->need_stack_bang(bangsize)?bangsize:0, false, C->stub_function() != nullptr);
745745

746746
C->output()->set_frame_complete(cbuf.insts_size());
747747

@@ -970,7 +970,7 @@ uint MachSpillCopyNode::implementation(CodeBuffer* cbuf,
970970
PhaseRegAlloc* ra_,
971971
bool do_size,
972972
outputStream* st) const {
973-
assert(cbuf != NULL || st != NULL, "sanity");
973+
assert(cbuf != nullptr || st != nullptr, "sanity");
974974
// Get registers to move
975975
OptoReg::Name src_second = ra_->get_reg_second(in(1));
976976
OptoReg::Name src_first = ra_->get_reg_first(in(1));
@@ -989,7 +989,7 @@ uint MachSpillCopyNode::implementation(CodeBuffer* cbuf,
989989
// Self copy, no move
990990
return 0;
991991
}
992-
if (bottom_type()->isa_vect() != NULL && bottom_type()->isa_vectmask() == NULL) {
992+
if (bottom_type()->isa_vect() != nullptr && bottom_type()->isa_vectmask() == nullptr) {
993993
uint ireg = ideal_reg();
994994
assert((src_first_rc != rc_int && dst_first_rc != rc_int), "sanity");
995995
assert((ireg == Op_VecS || ireg == Op_VecD || ireg == Op_VecX || ireg == Op_VecY || ireg == Op_VecZ ), "sanity");
@@ -1428,12 +1428,12 @@ uint MachSpillCopyNode::implementation(CodeBuffer* cbuf,
14281428

14291429
#ifndef PRODUCT
14301430
void MachSpillCopyNode::format(PhaseRegAlloc *ra_, outputStream* st) const {
1431-
implementation(NULL, ra_, false, st);
1431+
implementation(nullptr, ra_, false, st);
14321432
}
14331433
#endif
14341434

14351435
void MachSpillCopyNode::emit(CodeBuffer &cbuf, PhaseRegAlloc *ra_) const {
1436-
implementation(&cbuf, ra_, false, NULL);
1436+
implementation(&cbuf, ra_, false, nullptr);
14371437
}
14381438

14391439
uint MachSpillCopyNode::size(PhaseRegAlloc *ra_) const {
@@ -1784,7 +1784,7 @@ encode %{
17841784

17851785
MacroAssembler _masm(&cbuf);
17861786
__ check_klass_subtype_slow_path(Rrsi, Rrax, Rrcx, Rrdi,
1787-
NULL, &miss,
1787+
nullptr, &miss,
17881788
/*set_cond_codes:*/ true);
17891789
if ($primary) {
17901790
__ xorptr(Rrdi, Rrdi);
@@ -1841,7 +1841,7 @@ encode %{
18411841
} else {
18421842
// Emit stubs for static call.
18431843
address stub = CompiledStaticCall::emit_to_interp_stub(cbuf, mark);
1844-
if (stub == NULL) {
1844+
if (stub == nullptr) {
18451845
ciEnv::current()->record_failure("CodeCache is full");
18461846
return;
18471847
}
@@ -2179,7 +2179,7 @@ operand immP()
21792179
interface(CONST_INTER);
21802180
%}
21812181

2182-
// NULL Pointer Immediate
2182+
// Null Pointer Immediate
21832183
operand immP0()
21842184
%{
21852185
predicate(n->get_ptr() == 0);
@@ -2207,7 +2207,7 @@ operand immNKlass() %{
22072207
interface(CONST_INTER);
22082208
%}
22092209

2210-
// NULL Pointer Immediate
2210+
// Null Pointer Immediate
22112211
operand immN0() %{
22122212
predicate(n->get_narrowcon() == 0);
22132213
match(ConN);
@@ -3121,7 +3121,7 @@ operand indPosIndexScaleOffset(any_RegP reg, immL32 off, rRegI idx, immI2 scale)
31213121

31223122
// Indirect Narrow Oop Plus Offset Operand
31233123
// Note: x86 architecture doesn't support "scale * index + offset" without a base
3124-
// we can't free r12 even with CompressedOops::base() == NULL.
3124+
// we can't free r12 even with CompressedOops::base() == nullptr.
31253125
operand indCompressedOopOffset(rRegN reg, immL32 off) %{
31263126
predicate(UseCompressedOops && (CompressedOops::shift() == Address::times_8));
31273127
constraint(ALLOC_IN_RC(ptr_reg));
@@ -4902,7 +4902,7 @@ instruct loadConF(regF dst, immF con) %{
49024902
instruct loadConN0(rRegN dst, immN0 src, rFlagsReg cr) %{
49034903
match(Set dst src);
49044904
effect(KILL cr);
4905-
format %{ "xorq $dst, $src\t# compressed NULL ptr" %}
4905+
format %{ "xorq $dst, $src\t# compressed null pointer" %}
49064906
ins_encode %{
49074907
__ xorq($dst$$Register, $dst$$Register);
49084908
%}
@@ -4916,7 +4916,7 @@ instruct loadConN(rRegN dst, immN src) %{
49164916
format %{ "movl $dst, $src\t# compressed ptr" %}
49174917
ins_encode %{
49184918
address con = (address)$src$$constant;
4919-
if (con == NULL) {
4919+
if (con == nullptr) {
49204920
ShouldNotReachHere();
49214921
} else {
49224922
__ set_narrow_oop($dst$$Register, (jobject)$src$$constant);
@@ -4932,7 +4932,7 @@ instruct loadConNKlass(rRegN dst, immNKlass src) %{
49324932
format %{ "movl $dst, $src\t# compressed klass ptr" %}
49334933
ins_encode %{
49344934
address con = (address)$src$$constant;
4935-
if (con == NULL) {
4935+
if (con == nullptr) {
49364936
ShouldNotReachHere();
49374937
} else {
49384938
__ set_narrow_klass($dst$$Register, (Klass*)$src$$constant);
@@ -5158,7 +5158,7 @@ instruct storeP(memory mem, any_RegP src)
51585158

51595159
instruct storeImmP0(memory mem, immP0 zero)
51605160
%{
5161-
predicate(UseCompressedOops && (CompressedOops::base() == NULL) && n->as_Store()->barrier_data() == 0);
5161+
predicate(UseCompressedOops && (CompressedOops::base() == nullptr) && n->as_Store()->barrier_data() == 0);
51625162
match(Set mem (StoreP mem zero));
51635163

51645164
ins_cost(125); // XXX
@@ -5169,7 +5169,7 @@ instruct storeImmP0(memory mem, immP0 zero)
51695169
ins_pipe(ialu_mem_reg);
51705170
%}
51715171

5172-
// Store NULL Pointer, mark word, or other simple pointer constant.
5172+
// Store Null Pointer, mark word, or other simple pointer constant.
51735173
instruct storeImmP(memory mem, immP31 src)
51745174
%{
51755175
predicate(n->as_Store()->barrier_data() == 0);
@@ -5210,7 +5210,7 @@ instruct storeNKlass(memory mem, rRegN src)
52105210

52115211
instruct storeImmN0(memory mem, immN0 zero)
52125212
%{
5213-
predicate(CompressedOops::base() == NULL);
5213+
predicate(CompressedOops::base() == nullptr);
52145214
match(Set mem (StoreN mem zero));
52155215

52165216
ins_cost(125); // XXX
@@ -5229,7 +5229,7 @@ instruct storeImmN(memory mem, immN src)
52295229
format %{ "movl $mem, $src\t# compressed ptr" %}
52305230
ins_encode %{
52315231
address con = (address)$src$$constant;
5232-
if (con == NULL) {
5232+
if (con == nullptr) {
52335233
__ movl($mem$$Address, 0);
52345234
} else {
52355235
__ set_narrow_oop($mem$$Address, (jobject)$src$$constant);
@@ -5253,7 +5253,7 @@ instruct storeImmNKlass(memory mem, immNKlass src)
52535253
// Store Integer Immediate
52545254
instruct storeImmI0(memory mem, immI_0 zero)
52555255
%{
5256-
predicate(UseCompressedOops && (CompressedOops::base() == NULL));
5256+
predicate(UseCompressedOops && (CompressedOops::base() == nullptr));
52575257
match(Set mem (StoreI mem zero));
52585258

52595259
ins_cost(125); // XXX
@@ -5279,7 +5279,7 @@ instruct storeImmI(memory mem, immI src)
52795279
// Store Long Immediate
52805280
instruct storeImmL0(memory mem, immL0 zero)
52815281
%{
5282-
predicate(UseCompressedOops && (CompressedOops::base() == NULL));
5282+
predicate(UseCompressedOops && (CompressedOops::base() == nullptr));
52835283
match(Set mem (StoreL mem zero));
52845284

52855285
ins_cost(125); // XXX
@@ -5305,7 +5305,7 @@ instruct storeImmL(memory mem, immL32 src)
53055305
// Store Short/Char Immediate
53065306
instruct storeImmC0(memory mem, immI_0 zero)
53075307
%{
5308-
predicate(UseCompressedOops && (CompressedOops::base() == NULL));
5308+
predicate(UseCompressedOops && (CompressedOops::base() == nullptr));
53095309
match(Set mem (StoreC mem zero));
53105310

53115311
ins_cost(125); // XXX
@@ -5332,7 +5332,7 @@ instruct storeImmI16(memory mem, immI16 src)
53325332
// Store Byte Immediate
53335333
instruct storeImmB0(memory mem, immI_0 zero)
53345334
%{
5335-
predicate(UseCompressedOops && (CompressedOops::base() == NULL));
5335+
predicate(UseCompressedOops && (CompressedOops::base() == nullptr));
53365336
match(Set mem (StoreB mem zero));
53375337

53385338
ins_cost(125); // XXX
@@ -5358,7 +5358,7 @@ instruct storeImmB(memory mem, immI8 src)
53585358
// Store CMS card-mark Immediate
53595359
instruct storeImmCM0_reg(memory mem, immI_0 zero)
53605360
%{
5361-
predicate(UseCompressedOops && (CompressedOops::base() == NULL));
5361+
predicate(UseCompressedOops && (CompressedOops::base() == nullptr));
53625362
match(Set mem (StoreCM mem zero));
53635363

53645364
ins_cost(125); // XXX
@@ -5397,7 +5397,7 @@ instruct storeF(memory mem, regF src)
53975397
// Store immediate Float value (it is faster than store from XMM register)
53985398
instruct storeF0(memory mem, immF0 zero)
53995399
%{
5400-
predicate(UseCompressedOops && (CompressedOops::base() == NULL));
5400+
predicate(UseCompressedOops && (CompressedOops::base() == nullptr));
54015401
match(Set mem (StoreF mem zero));
54025402

54035403
ins_cost(25); // XXX
@@ -5436,7 +5436,7 @@ instruct storeD(memory mem, regD src)
54365436
// Store immediate double 0.0 (it is faster than store from XMM register)
54375437
instruct storeD0_imm(memory mem, immD0 src)
54385438
%{
5439-
predicate(!UseCompressedOops || (CompressedOops::base() != NULL));
5439+
predicate(!UseCompressedOops || (CompressedOops::base() != nullptr));
54405440
match(Set mem (StoreD mem src));
54415441

54425442
ins_cost(50);
@@ -5449,7 +5449,7 @@ instruct storeD0_imm(memory mem, immD0 src)
54495449

54505450
instruct storeD0(memory mem, immD0 zero)
54515451
%{
5452-
predicate(UseCompressedOops && (CompressedOops::base() == NULL));
5452+
predicate(UseCompressedOops && (CompressedOops::base() == nullptr));
54535453
match(Set mem (StoreD mem zero));
54545454

54555455
ins_cost(25); // XXX
@@ -11680,7 +11680,7 @@ instruct testP_reg(rFlagsReg cr, rRegP src, immP0 zero)
1168011680
// any compare to a zero should be eq/neq.
1168111681
instruct testP_mem(rFlagsReg cr, memory op, immP0 zero)
1168211682
%{
11683-
predicate((!UseCompressedOops || (CompressedOops::base() != NULL)) &&
11683+
predicate((!UseCompressedOops || (CompressedOops::base() != nullptr)) &&
1168411684
n->in(1)->as_Load()->barrier_data() == 0);
1168511685
match(Set cr (CmpP (LoadP op) zero));
1168611686

@@ -11694,7 +11694,7 @@ instruct testP_mem(rFlagsReg cr, memory op, immP0 zero)
1169411694

1169511695
instruct testP_mem_reg0(rFlagsReg cr, memory mem, immP0 zero)
1169611696
%{
11697-
predicate(UseCompressedOops && (CompressedOops::base() == NULL) &&
11697+
predicate(UseCompressedOops && (CompressedOops::base() == nullptr) &&
1169811698
n->in(1)->as_Load()->barrier_data() == 0);
1169911699
match(Set cr (CmpP (LoadP mem) zero));
1170011700

@@ -11777,7 +11777,7 @@ instruct testN_reg(rFlagsReg cr, rRegN src, immN0 zero) %{
1177711777

1177811778
instruct testN_mem(rFlagsReg cr, memory mem, immN0 zero)
1177911779
%{
11780-
predicate(CompressedOops::base() != NULL);
11780+
predicate(CompressedOops::base() != nullptr);
1178111781
match(Set cr (CmpN (LoadN mem) zero));
1178211782

1178311783
ins_cost(500); // XXX
@@ -11790,7 +11790,7 @@ instruct testN_mem(rFlagsReg cr, memory mem, immN0 zero)
1179011790

1179111791
instruct testN_mem_reg0(rFlagsReg cr, memory mem, immN0 zero)
1179211792
%{
11793-
predicate(CompressedOops::base() == NULL);
11793+
predicate(CompressedOops::base() == nullptr);
1179411794
match(Set cr (CmpN (LoadN mem) zero));
1179511795

1179611796
format %{ "cmpl R12, $mem\t# compressed ptr (R12_heapbase==0)" %}

0 commit comments

Comments
 (0)
Please sign in to comment.