2602 #endif |
2602 #endif |
2603 |
2603 |
2604 arraycopy_range_checks(src, src_pos, dst, dst_pos, r11_length, |
2604 arraycopy_range_checks(src, src_pos, dst, dst_pos, r11_length, |
2605 r10, L_failed); |
2605 r10, L_failed); |
2606 |
2606 |
2607 // typeArrayKlass |
2607 // TypeArrayKlass |
2608 // |
2608 // |
2609 // src_addr = (src + array_header_in_bytes()) + (src_pos << log2elemsize); |
2609 // src_addr = (src + array_header_in_bytes()) + (src_pos << log2elemsize); |
2610 // dst_addr = (dst + array_header_in_bytes()) + (dst_pos << log2elemsize); |
2610 // dst_addr = (dst + array_header_in_bytes()) + (dst_pos << log2elemsize); |
2611 // |
2611 // |
2612 |
2612 |
2668 __ lea(from, Address(src, src_pos, Address::times_8, 0));// src_addr |
2668 __ lea(from, Address(src, src_pos, Address::times_8, 0));// src_addr |
2669 __ lea(to, Address(dst, dst_pos, Address::times_8, 0));// dst_addr |
2669 __ lea(to, Address(dst, dst_pos, Address::times_8, 0));// dst_addr |
2670 __ movl2ptr(count, r11_length); // length |
2670 __ movl2ptr(count, r11_length); // length |
2671 __ jump(RuntimeAddress(long_copy_entry)); |
2671 __ jump(RuntimeAddress(long_copy_entry)); |
2672 |
2672 |
2673 // objArrayKlass |
2673 // ObjArrayKlass |
2674 __ BIND(L_objArray); |
2674 __ BIND(L_objArray); |
2675 // live at this point: r10_src_klass, r11_length, src[_pos], dst[_pos] |
2675 // live at this point: r10_src_klass, r11_length, src[_pos], dst[_pos] |
2676 |
2676 |
2677 Label L_plain_copy, L_checkcast_copy; |
2677 Label L_plain_copy, L_checkcast_copy; |
2678 // test array classes for subtyping |
2678 // test array classes for subtyping |
2721 const int sco_offset = in_bytes(Klass::super_check_offset_offset()); |
2721 const int sco_offset = in_bytes(Klass::super_check_offset_offset()); |
2722 __ movl(sco_temp, Address(r11_dst_klass, sco_offset)); |
2722 __ movl(sco_temp, Address(r11_dst_klass, sco_offset)); |
2723 assert_clean_int(sco_temp, rax); |
2723 assert_clean_int(sco_temp, rax); |
2724 generate_type_check(r10_src_klass, sco_temp, r11_dst_klass, L_plain_copy); |
2724 generate_type_check(r10_src_klass, sco_temp, r11_dst_klass, L_plain_copy); |
2725 |
2725 |
2726 // Fetch destination element klass from the objArrayKlass header. |
2726 // Fetch destination element klass from the ObjArrayKlass header. |
2727 int ek_offset = in_bytes(objArrayKlass::element_klass_offset()); |
2727 int ek_offset = in_bytes(ObjArrayKlass::element_klass_offset()); |
2728 __ movptr(r11_dst_klass, Address(r11_dst_klass, ek_offset)); |
2728 __ movptr(r11_dst_klass, Address(r11_dst_klass, ek_offset)); |
2729 __ movl( sco_temp, Address(r11_dst_klass, sco_offset)); |
2729 __ movl( sco_temp, Address(r11_dst_klass, sco_offset)); |
2730 assert_clean_int(sco_temp, rax); |
2730 assert_clean_int(sco_temp, rax); |
2731 |
2731 |
2732 // the checkcast_copy loop needs two extra arguments: |
2732 // the checkcast_copy loop needs two extra arguments: |