@@ -214,7 +214,7 @@ void Assembler::init_attributes(void) {
214214 _legacy_mode_vl = (VM_Version::supports_avx512vl() == false);
215215 _legacy_mode_vlbw = (VM_Version::supports_avx512vlbw() == false);
216216 NOT_LP64(_is_managed = false;)
217- _attributes = NULL ;
217+ _attributes = nullptr ;
218218}
219219
220220
@@ -264,7 +264,7 @@ void Assembler::emit_data(jint data, relocInfo::relocType rtype, int format) {
264264
265265void Assembler::emit_data(jint data, RelocationHolder const& rspec, int format) {
266266 assert(imm_operand == 0, "default format must be immediate in this file");
267- assert(inst_mark() != NULL , "must be inside InstructionMark");
267+ assert(inst_mark() != nullptr , "must be inside InstructionMark");
268268 if (rspec.type() != relocInfo::none) {
269269 #ifdef ASSERT
270270 check_relocation(rspec, format);
@@ -684,7 +684,7 @@ void Assembler::emit_operand_helper(int reg_enc, int base_enc, int index_enc,
684684 // disp was created by converting the target address minus the pc
685685 // at the start of the instruction. That needs more correction here.
686686 // intptr_t disp = target - next_ip;
687- assert(inst_mark() != NULL , "must be inside InstructionMark");
687+ assert(inst_mark() != nullptr , "must be inside InstructionMark");
688688 address next_ip = pc() + sizeof(int32_t) + post_addr_length;
689689 int64_t adjusted = disp;
690690 // Do rip-rel adjustment for 64bit
@@ -1234,7 +1234,7 @@ address Assembler::locate_next_instruction(address inst) {
12341234#ifdef ASSERT
12351235void Assembler::check_relocation(RelocationHolder const& rspec, int format) {
12361236 address inst = inst_mark();
1237- assert(inst != NULL && inst < pc(), "must point to beginning of instruction");
1237+ assert(inst != nullptr && inst < pc(), "must point to beginning of instruction");
12381238 address opnd;
12391239
12401240 Relocation* r = rspec.reloc();
@@ -1690,8 +1690,8 @@ void Assembler::call_literal(address entry, RelocationHolder const& rspec) {
16901690 InstructionMark im(this);
16911691 emit_int8((unsigned char)0xE8);
16921692 intptr_t disp = entry - (pc() + sizeof(int32_t));
1693- // Entry is NULL in case of a scratch emit.
1694- assert(entry == NULL || is_simm32(disp), "disp=" INTPTR_FORMAT " must be 32bit offset (call2)", disp);
1693+ // Entry is null in case of a scratch emit.
1694+ assert(entry == nullptr || is_simm32(disp), "disp=" INTPTR_FORMAT " must be 32bit offset (call2)", disp);
16951695 // Technically, should use call32_operand, but this format is
16961696 // implied by the fact that we're emitting a call instruction.
16971697
@@ -2404,7 +2404,7 @@ void Assembler::jcc(Condition cc, Label& L, bool maybe_short) {
24042404 assert((0 <= cc) && (cc < 16), "illegal cc");
24052405 if (L.is_bound()) {
24062406 address dst = target(L);
2407- assert(dst != NULL , "jcc most probably wrong");
2407+ assert(dst != nullptr , "jcc most probably wrong");
24082408
24092409 const int short_size = 2;
24102410 const int long_size = 6;
@@ -2462,7 +2462,7 @@ void Assembler::jmp(Address adr) {
24622462void Assembler::jmp(Label& L, bool maybe_short) {
24632463 if (L.is_bound()) {
24642464 address entry = target(L);
2465- assert(entry != NULL , "jmp most probably wrong");
2465+ assert(entry != nullptr , "jmp most probably wrong");
24662466 InstructionMark im(this);
24672467 const int short_size = 2;
24682468 const int long_size = 5;
@@ -2493,7 +2493,7 @@ void Assembler::jmp(Register entry) {
24932493void Assembler::jmp_literal(address dest, RelocationHolder const& rspec) {
24942494 InstructionMark im(this);
24952495 emit_int8((unsigned char)0xE9);
2496- assert(dest != NULL , "must have a target");
2496+ assert(dest != nullptr , "must have a target");
24972497 intptr_t disp = dest - (pc() + sizeof(int32_t));
24982498 assert(is_simm32(disp), "must be 32bit offset (jmp)");
24992499 emit_data(disp, rspec, call32_operand);
@@ -2503,7 +2503,7 @@ void Assembler::jmpb_0(Label& L, const char* file, int line) {
25032503 if (L.is_bound()) {
25042504 const int short_size = 2;
25052505 address entry = target(L);
2506- assert(entry != NULL , "jmp most probably wrong");
2506+ assert(entry != nullptr , "jmp most probably wrong");
25072507#ifdef ASSERT
25082508 intptr_t dist = (intptr_t)entry - ((intptr_t)pc() + short_size);
25092509 intptr_t delta = short_branch_delta();
@@ -6341,7 +6341,7 @@ void Assembler::xbegin(Label& abort, relocInfo::relocType rtype) {
63416341 relocate(rtype);
63426342 if (abort.is_bound()) {
63436343 address entry = target(abort);
6344- assert(entry != NULL , "abort entry NULL ");
6344+ assert(entry != nullptr , "abort entry null ");
63456345 intptr_t offset = entry - pc();
63466346 emit_int16((unsigned char)0xC7, (unsigned char)0xF8);
63476347 emit_int32(offset - 6); // 2 opcode + 4 address
@@ -12495,7 +12495,7 @@ void Assembler::emit_data64(jlong data,
1249512495 int format) {
1249612496 assert(imm_operand == 0, "default format must be immediate in this file");
1249712497 assert(imm_operand == format, "must be immediate");
12498- assert(inst_mark() != NULL , "must be inside InstructionMark");
12498+ assert(inst_mark() != nullptr , "must be inside InstructionMark");
1249912499 // Do not use AbstractAssembler::relocate, which is not intended for
1250012500 // embedded words. Instead, relocate to the enclosing instruction.
1250112501 code_section()->relocate(inst_mark(), rspec, format);
@@ -13521,13 +13521,13 @@ void Assembler::popq(Register dst) {
1352113521// and copying it out on subsequent invocations can thus be beneficial
1352213522static bool precomputed = false;
1352313523
13524- static u_char* popa_code = NULL ;
13524+ static u_char* popa_code = nullptr ;
1352513525static int popa_len = 0;
1352613526
13527- static u_char* pusha_code = NULL ;
13527+ static u_char* pusha_code = nullptr ;
1352813528static int pusha_len = 0;
1352913529
13530- static u_char* vzup_code = NULL ;
13530+ static u_char* vzup_code = nullptr ;
1353113531static int vzup_len = 0;
1353213532
1353313533void Assembler::precompute_instructions() {
@@ -13574,7 +13574,7 @@ void Assembler::precompute_instructions() {
1357413574}
1357513575
1357613576static void emit_copy(CodeSection* code_section, u_char* src, int src_len) {
13577- assert(src != NULL , "code to copy must have been pre-computed");
13577+ assert(src != nullptr , "code to copy must have been pre-computed");
1357813578 assert(code_section->limit() - code_section->end() > src_len, "code buffer not large enough");
1357913579 address end = code_section->end();
1358013580 memcpy(end, src, src_len);
0 commit comments