mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-22 03:54:33 +02:00
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
3 changed files with 10 additions and 0 deletions
|
@ -3063,11 +3063,15 @@ void MacroAssembler::store_check(Register obj) {
|
|||
|
||||
if (UseCondCardMark) {
|
||||
Label L_already_dirty;
|
||||
membar(StoreLoad);
|
||||
ldrb(rscratch2, Address(obj, rscratch1));
|
||||
cbz(rscratch2, L_already_dirty);
|
||||
strb(zr, Address(obj, rscratch1));
|
||||
bind(L_already_dirty);
|
||||
} else {
|
||||
if (UseConcMarkSweepGC && CMSPrecleaningEnabled) {
|
||||
membar(StoreStore);
|
||||
}
|
||||
strb(zr, Address(obj, rscratch1));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -746,6 +746,9 @@ class StubGenerator: public StubCodeGenerator {
|
|||
const Register count = end; // 'end' register contains bytes count now
|
||||
__ mov(scratch, (address)ct->byte_map_base);
|
||||
__ add(start, start, scratch);
|
||||
if (UseConcMarkSweepGC) {
|
||||
__ membar(__ StoreStore);
|
||||
}
|
||||
__ BIND(L_loop);
|
||||
__ strb(zr, Address(start, count));
|
||||
__ subs(count, count, 1);
|
||||
|
|
|
@ -1630,6 +1630,9 @@ void LIRGenerator::CardTableModRef_post_barrier(LIR_OprDesc* addr, LIR_OprDesc*
|
|||
__ move(dirty, card_addr);
|
||||
__ branch_destination(L_already_dirty->label());
|
||||
} else {
|
||||
if (UseConcMarkSweepGC && CMSPrecleaningEnabled) {
|
||||
__ membar_storestore();
|
||||
}
|
||||
__ move(dirty, card_addr);
|
||||
}
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue