1771
1772 // Empty array: Nothing to do.
1773 __ cbz(count, L_done);
1774
1775 __ push(RegSet::of(r18, r19, r20, r21), sp);
1776
1777 #ifdef ASSERT
1778 BLOCK_COMMENT("assert consistent ckoff/ckval");
1779 // The ckoff and ckval must be mutually consistent,
1780 // even though caller generates both.
1781 { Label L;
1782 int sco_offset = in_bytes(Klass::super_check_offset_offset());
1783 __ ldrw(start_to, Address(ckval, sco_offset));
1784 __ cmpw(ckoff, start_to);
1785 __ br(Assembler::EQ, L);
1786 __ stop("super_check_offset inconsistent");
1787 __ bind(L);
1788 }
1789 #endif //ASSERT
1790
1791 DecoratorSet decorators = IN_HEAP | IS_ARRAY | ARRAYCOPY_CHECKCAST;
1792 bool is_oop = true;
1793 if (dest_uninitialized) {
1794 decorators |= IS_DEST_UNINITIALIZED;
1795 }
1796
1797 BarrierSetAssembler *bs = BarrierSet::barrier_set()->barrier_set_assembler();
1798 bs->arraycopy_prologue(_masm, decorators, is_oop, to, count, wb_pre_saved_regs);
1799
1800 // save the original count
1801 __ mov(count_save, count);
1802
1803 // Copy from low to high addresses
1804 __ mov(start_to, to); // Save destination array start address
1805 __ b(L_load_element);
1806
1807 // ======== begin loop ========
1808 // (Loop is rotated; its entry is L_load_element.)
1809 // Loop control:
1810 // for (; count != 0; count--) {
1811 // copied_oop = load_heap_oop(from++);
|
1771
1772 // Empty array: Nothing to do.
1773 __ cbz(count, L_done);
1774
1775 __ push(RegSet::of(r18, r19, r20, r21), sp);
1776
1777 #ifdef ASSERT
1778 BLOCK_COMMENT("assert consistent ckoff/ckval");
1779 // The ckoff and ckval must be mutually consistent,
1780 // even though caller generates both.
1781 { Label L;
1782 int sco_offset = in_bytes(Klass::super_check_offset_offset());
1783 __ ldrw(start_to, Address(ckval, sco_offset));
1784 __ cmpw(ckoff, start_to);
1785 __ br(Assembler::EQ, L);
1786 __ stop("super_check_offset inconsistent");
1787 __ bind(L);
1788 }
1789 #endif //ASSERT
1790
1791 // Note: checkcast arraycopy is always disjoint. If it were not, then we wouldn't
1792 // need to checkcast.
1793 DecoratorSet decorators = IN_HEAP | IS_ARRAY | ARRAYCOPY_CHECKCAST | ARRAYCOPY_DISJOINT;
1794 bool is_oop = true;
1795 if (dest_uninitialized) {
1796 decorators |= IS_DEST_UNINITIALIZED;
1797 }
1798
1799 BarrierSetAssembler *bs = BarrierSet::barrier_set()->barrier_set_assembler();
1800 bs->arraycopy_prologue(_masm, decorators, is_oop, to, count, wb_pre_saved_regs);
1801
1802 // save the original count
1803 __ mov(count_save, count);
1804
1805 // Copy from low to high addresses
1806 __ mov(start_to, to); // Save destination array start address
1807 __ b(L_load_element);
1808
1809 // ======== begin loop ========
1810 // (Loop is rotated; its entry is L_load_element.)
1811 // Loop control:
1812 // for (; count != 0; count--) {
1813 // copied_oop = load_heap_oop(from++);
|