734 __ mov(c_rarg1, scratch);
735 __ call_VM_leaf(CAST_FROM_FN_PTR(address, BarrierSet::static_write_ref_array_post), 2);
736 __ pop(RegSet::range(r0, r29), sp); // integer registers except lr & sp }
737 }
738 break;
739 case BarrierSet::CardTableModRef:
740 case BarrierSet::CardTableExtension:
741 {
742 CardTableModRefBS* ct = (CardTableModRefBS*)bs;
743 assert(sizeof(*ct->byte_map_base) == sizeof(jbyte), "adjust this code");
744
745 Label L_loop;
746
747 __ lsr(start, start, CardTableModRefBS::card_shift);
748 __ lsr(end, end, CardTableModRefBS::card_shift);
749 __ sub(end, end, start); // number of bytes to copy
750
751 const Register count = end; // 'end' register contains bytes count now
752 __ mov(scratch, (address)ct->byte_map_base);
753 __ add(start, start, scratch);
754 __ BIND(L_loop);
755 __ strb(zr, Address(start, count));
756 __ subs(count, count, 1);
757 __ br(Assembler::HS, L_loop);
758 }
759 break;
760 default:
761 ShouldNotReachHere();
762
763 }
764 }
765
766 typedef enum {
767 copy_forwards = 1,
768 copy_backwards = -1
769 } copy_direction;
770
771 // Bulk copy of blocks of 8 words.
772 //
773 // count is a count of words.
|
734 __ mov(c_rarg1, scratch);
735 __ call_VM_leaf(CAST_FROM_FN_PTR(address, BarrierSet::static_write_ref_array_post), 2);
736 __ pop(RegSet::range(r0, r29), sp); // integer registers except lr & sp }
737 }
738 break;
739 case BarrierSet::CardTableModRef:
740 case BarrierSet::CardTableExtension:
741 {
742 CardTableModRefBS* ct = (CardTableModRefBS*)bs;
743 assert(sizeof(*ct->byte_map_base) == sizeof(jbyte), "adjust this code");
744
745 Label L_loop;
746
747 __ lsr(start, start, CardTableModRefBS::card_shift);
748 __ lsr(end, end, CardTableModRefBS::card_shift);
749 __ sub(end, end, start); // number of bytes to copy
750
751 const Register count = end; // 'end' register contains bytes count now
752 __ mov(scratch, (address)ct->byte_map_base);
753 __ add(start, start, scratch);
754 __ membar(__ StoreStore|__ LoadStore);
755 __ BIND(L_loop);
756 __ strb(zr, Address(start, count));
757 __ subs(count, count, 1);
758 __ br(Assembler::HS, L_loop);
759 }
760 break;
761 default:
762 ShouldNotReachHere();
763
764 }
765 }
766
767 typedef enum {
768 copy_forwards = 1,
769 copy_backwards = -1
770 } copy_direction;
771
772 // Bulk copy of blocks of 8 words.
773 //
774 // count is a count of words.
|