< prev index next >

src/hotspot/cpu/aarch64/gc/shared/cardTableBarrierSetAssembler_aarch64.cpp

Print this page

 67   __ lsr(end, end, CardTable::card_shift());
 68   __ sub(count, end, start); // number of bytes to copy
 69 
 70   __ load_byte_map_base(scratch);
 71   __ add(start, start, scratch);
 72   __ bind(L_loop);
 73   __ strb(zr, Address(start, count));
 74   __ subs(count, count, 1);
 75   __ br(Assembler::GE, L_loop);
 76   __ bind(L_done);
 77 }
 78 
 79 void CardTableBarrierSetAssembler::oop_store_at(MacroAssembler* masm, DecoratorSet decorators, BasicType type,
 80                                                 Address dst, Register val, Register tmp1, Register tmp2, Register tmp3) {
 81   bool in_heap = (decorators & IN_HEAP) != 0;
 82   bool is_array = (decorators & IS_ARRAY) != 0;
 83   bool on_anonymous = (decorators & ON_UNKNOWN_OOP_REF) != 0;
 84   bool precise = is_array || on_anonymous;
 85 
 86   bool needs_post_barrier = val != noreg && in_heap;

 87   BarrierSetAssembler::store_at(masm, decorators, type, dst, val, noreg, noreg, noreg);
 88   if (needs_post_barrier) {
 89     // flatten object address if needed
 90     if (!precise || (dst.index() == noreg && dst.offset() == 0)) {
 91       store_check(masm, dst.base(), dst);








 92     } else {
 93       __ lea(tmp3, dst);
 94       store_check(masm, tmp3, dst);
 95     }
 96   }
 97 }

 67   __ lsr(end, end, CardTable::card_shift());
 68   __ sub(count, end, start); // number of bytes to copy
 69 
 70   __ load_byte_map_base(scratch);
 71   __ add(start, start, scratch);
 72   __ bind(L_loop);
 73   __ strb(zr, Address(start, count));
 74   __ subs(count, count, 1);
 75   __ br(Assembler::GE, L_loop);
 76   __ bind(L_done);
 77 }
 78 
 79 void CardTableBarrierSetAssembler::oop_store_at(MacroAssembler* masm, DecoratorSet decorators, BasicType type,
 80                                                 Address dst, Register val, Register tmp1, Register tmp2, Register tmp3) {
 81   bool in_heap = (decorators & IN_HEAP) != 0;
 82   bool is_array = (decorators & IS_ARRAY) != 0;
 83   bool on_anonymous = (decorators & ON_UNKNOWN_OOP_REF) != 0;
 84   bool precise = is_array || on_anonymous;
 85 
 86   bool needs_post_barrier = val != noreg && in_heap;
 87 
 88   BarrierSetAssembler::store_at(masm, decorators, type, dst, val, noreg, noreg, noreg);
 89   if (needs_post_barrier) {
 90     // flatten object address if needed
 91     if (!precise || (dst.index() == noreg && dst.offset() == 0)) {
 92       if (tmp3 != noreg) {
 93         // TODO 8366717 This change is from before the 'tmp3' arg was added to mainline, check if it's still needed. Same on x64. Also, this should be a __ lea
 94         // Called by MacroAssembler::pack_inline_helper. We cannot corrupt the dst.base() register
 95         __ mov(tmp3, dst.base());
 96         store_check(masm, tmp3, dst);
 97       } else {
 98         // It's OK to corrupt the dst.base() register.
 99         store_check(masm, dst.base(), dst);
100       }
101     } else {
102       __ lea(tmp3, dst);
103       store_check(masm, tmp3, dst);
104     }
105   }
106 }
< prev index next >