--- a/hotspot/src/cpu/x86/vm/macroAssembler_x86.cpp Fri Oct 04 13:33:02 2013 +0200
+++ b/hotspot/src/cpu/x86/vm/macroAssembler_x86.cpp Tue Oct 08 17:35:51 2013 +0200
@@ -3389,13 +3389,18 @@
const Register card_addr = tmp;
lea(card_addr, as_Address(ArrayAddress(cardtable, index)));
#endif
- cmpb(Address(card_addr, 0), 0);
+ cmpb(Address(card_addr, 0), (int)G1SATBCardTableModRefBS::g1_young_card_val());
jcc(Assembler::equal, done);
+ membar(Assembler::Membar_mask_bits(Assembler::StoreLoad));
+ cmpb(Address(card_addr, 0), (int)CardTableModRefBS::dirty_card_val());
+ jcc(Assembler::equal, done);
+
+
// storing a region crossing, non-NULL oop, card is clean.
// dirty card and log.
- movb(Address(card_addr, 0), 0);
+ movb(Address(card_addr, 0), (int)CardTableModRefBS::dirty_card_val());
cmpl(queue_index, 0);
jcc(Assembler::equal, runtime);