8135018: AARCH64: Missing memory barriers for CMS collector
Add StoreStore barrier when CMS needs them Reviewed-by: tschatzl
This commit is contained in:
parent
0835a6e311
commit
67af37e0b8
@ -3063,11 +3063,15 @@ void MacroAssembler::store_check(Register obj) {
|
|||||||
|
|
||||||
if (UseCondCardMark) {
|
if (UseCondCardMark) {
|
||||||
Label L_already_dirty;
|
Label L_already_dirty;
|
||||||
|
membar(StoreLoad);
|
||||||
ldrb(rscratch2, Address(obj, rscratch1));
|
ldrb(rscratch2, Address(obj, rscratch1));
|
||||||
cbz(rscratch2, L_already_dirty);
|
cbz(rscratch2, L_already_dirty);
|
||||||
strb(zr, Address(obj, rscratch1));
|
strb(zr, Address(obj, rscratch1));
|
||||||
bind(L_already_dirty);
|
bind(L_already_dirty);
|
||||||
} else {
|
} else {
|
||||||
|
if (UseConcMarkSweepGC && CMSPrecleaningEnabled) {
|
||||||
|
membar(StoreStore);
|
||||||
|
}
|
||||||
strb(zr, Address(obj, rscratch1));
|
strb(zr, Address(obj, rscratch1));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -746,6 +746,9 @@ class StubGenerator: public StubCodeGenerator {
|
|||||||
const Register count = end; // 'end' register contains bytes count now
|
const Register count = end; // 'end' register contains bytes count now
|
||||||
__ mov(scratch, (address)ct->byte_map_base);
|
__ mov(scratch, (address)ct->byte_map_base);
|
||||||
__ add(start, start, scratch);
|
__ add(start, start, scratch);
|
||||||
|
if (UseConcMarkSweepGC) {
|
||||||
|
__ membar(__ StoreStore);
|
||||||
|
}
|
||||||
__ BIND(L_loop);
|
__ BIND(L_loop);
|
||||||
__ strb(zr, Address(start, count));
|
__ strb(zr, Address(start, count));
|
||||||
__ subs(count, count, 1);
|
__ subs(count, count, 1);
|
||||||
|
@ -1630,6 +1630,9 @@ void LIRGenerator::CardTableModRef_post_barrier(LIR_OprDesc* addr, LIR_OprDesc*
|
|||||||
__ move(dirty, card_addr);
|
__ move(dirty, card_addr);
|
||||||
__ branch_destination(L_already_dirty->label());
|
__ branch_destination(L_already_dirty->label());
|
||||||
} else {
|
} else {
|
||||||
|
if (UseConcMarkSweepGC && CMSPrecleaningEnabled) {
|
||||||
|
__ membar_storestore();
|
||||||
|
}
|
||||||
__ move(dirty, card_addr);
|
__ move(dirty, card_addr);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user