< prev index next >

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

Print this page

 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 }

 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       if (tmp3 != noreg) {
 92         // Called by MacroAssembler::pack_inline_helper. We cannot corrupt the dst.base() register
 93         __ mov(tmp3, dst.base());
 94         store_check(masm, tmp3, dst);
 95       } else {
 96         // It's OK to corrupt the dst.base() register.
 97         store_check(masm, dst.base(), dst);
 98       }
 99 
100     } else {
101       __ lea(tmp3, dst);
102       store_check(masm, tmp3, dst);
103     }
104   }
105 
106 }
< prev index next >