comparison src/hotspot/cpu/arm/gc/shared/cardTableBarrierSetAssembler_arm.cpp @ 50476:65b13c206495

8202418: Remove explicit CMS checks in CardTableBarrierSetAssembler: ARM32 leftovers Reviewed-by: eosterlund
author shade
date Wed, 02 May 2018 19:26:44 +0200
parents 7b916885654d
children 9375184cec98
comparison
equal deleted inserted replaced
3:dd203ed9cdfc 4:4d5c8df3e953
125 125
126 // The 2nd part of the store check. 126 // The 2nd part of the store check.
127 void CardTableBarrierSetAssembler::store_check_part2(MacroAssembler* masm, Register obj, Register card_table_base, Register tmp) { 127 void CardTableBarrierSetAssembler::store_check_part2(MacroAssembler* masm, Register obj, Register card_table_base, Register tmp) {
128 assert_different_registers(obj, card_table_base, tmp); 128 assert_different_registers(obj, card_table_base, tmp);
129 129
130 BarrierSet* bs = BarrierSet::barrier_set();
131 assert(bs->kind() == BarrierSet::CardTableBarrierSet,
132 "Wrong barrier set kind");
133
134 CardTableBarrierSet* ctbs = barrier_set_cast<CardTableBarrierSet>(bs);
135 CardTable* ct = ctbs->card_table();
136 assert(sizeof(*ct->byte_map_base()) == sizeof(jbyte), "Adjust store check code");
137
130 assert(CardTable::dirty_card_val() == 0, "Dirty card value must be 0 due to optimizations."); 138 assert(CardTable::dirty_card_val() == 0, "Dirty card value must be 0 due to optimizations.");
131 #ifdef AARCH64 139 #ifdef AARCH64
132 add(card_table_base, card_table_base, AsmOperand(obj, lsr, CardTable::card_shift)); 140 add(card_table_base, card_table_base, AsmOperand(obj, lsr, CardTable::card_shift));
133 Address card_table_addr(card_table_base); 141 Address card_table_addr(card_table_base);
134 #else 142 #else
135 Address card_table_addr(card_table_base, obj, lsr, CardTable::card_shift); 143 Address card_table_addr(card_table_base, obj, lsr, CardTable::card_shift);
136 #endif 144 #endif
137 145
138 if (UseCondCardMark) { 146 if (UseCondCardMark) {
139 #if INCLUDE_ALL_GCS 147 if (ct->scanned_concurrently()) {
140 if (UseConcMarkSweepGC) {
141 __ membar(MacroAssembler::Membar_mask_bits(MacroAssembler::StoreLoad), noreg); 148 __ membar(MacroAssembler::Membar_mask_bits(MacroAssembler::StoreLoad), noreg);
142 } 149 }
143 #endif
144 Label already_dirty; 150 Label already_dirty;
145 151
146 __ ldrb(tmp, card_table_addr); 152 __ ldrb(tmp, card_table_addr);
147 __ cbz(tmp, already_dirty); 153 __ cbz(tmp, already_dirty);
148 154
149 set_card(masm, card_table_base, card_table_addr, tmp); 155 set_card(masm, card_table_base, card_table_addr, tmp);
150 __ bind(already_dirty); 156 __ bind(already_dirty);
151 157
152 } else { 158 } else {
153 #if INCLUDE_ALL_GCS 159 if (ct->scanned_concurrently()) {
154 if (UseConcMarkSweepGC && CMSPrecleaningEnabled) {
155 __ membar(MacroAssembler::Membar_mask_bits(MacroAssembler::StoreStore), noreg); 160 __ membar(MacroAssembler::Membar_mask_bits(MacroAssembler::StoreStore), noreg);
156 } 161 }
157 #endif
158 set_card(masm, card_table_base, card_table_addr, tmp); 162 set_card(masm, card_table_base, card_table_addr, tmp);
159 } 163 }
160 } 164 }
161 165
162 void CardTableBarrierSetAssembler::set_card(MacroAssembler* masm, Register card_table_base, Address card_table_addr, Register tmp) { 166 void CardTableBarrierSetAssembler::set_card(MacroAssembler* masm, Register card_table_base, Address card_table_addr, Register tmp) {