Skip to content

Commit fbedc0a

Browse files
committed
Simplify x64's gen_write_ref_array_post_barrier
1 parent 068d2a3 commit fbedc0a

File tree

1 file changed

+4
-12
lines changed

1 file changed

+4
-12
lines changed

src/hotspot/cpu/x86/gc/g1/g1BarrierSetAssembler_x86.cpp

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -112,28 +112,20 @@ void G1BarrierSetAssembler::gen_write_ref_array_post_barrier(MacroAssembler* mas
112112
__ addptr(count, tmp);
113113

114114
Label loop;
115+
Label next;
115116
// Iterate from start card to end card (inclusive).
116117
__ bind(loop);
117118

118-
Label is_clean_card;
119119
if (UseCondCardMark) {
120120
__ cmpb(Address(addr, 0), G1CardTable::clean_card_val());
121-
__ jcc(Assembler::equal, is_clean_card);
122-
} else {
123-
__ movb(Address(addr, 0), G1CardTable::dirty_card_val());
121+
__ jcc(Assembler::notEqual, next);
124122
}
123+
__ movb(Address(addr, 0), G1CardTable::dirty_card_val());
125124

126-
Label next_card;
127-
__ bind(next_card);
125+
__ bind(next);
128126
__ addptr(addr, sizeof(CardTable::CardValue));
129127
__ cmpptr(addr, count);
130128
__ jcc(Assembler::belowEqual, loop);
131-
__ jmp(done);
132-
133-
__ bind(is_clean_card);
134-
// Card was clean. Dirty card and go to next..
135-
__ movb(Address(addr, 0), G1CardTable::dirty_card_val());
136-
__ jmp(next_card);
137129

138130
__ bind(done);
139131
}

0 commit comments

Comments
 (0)