2200 if (!(flags & LIR_OpArrayCopy::src_objarray)) { |
2200 if (!(flags & LIR_OpArrayCopy::src_objarray)) { |
2201 __ load_klass(src, tmp); |
2201 __ load_klass(src, tmp); |
2202 } else if (!(flags & LIR_OpArrayCopy::dst_objarray)) { |
2202 } else if (!(flags & LIR_OpArrayCopy::dst_objarray)) { |
2203 __ load_klass(dst, tmp); |
2203 __ load_klass(dst, tmp); |
2204 } |
2204 } |
2205 int lh_offset = klassOopDesc::header_size() * HeapWordSize + |
2205 int lh_offset = in_bytes(Klass::layout_helper_offset()); |
2206 Klass::layout_helper_offset_in_bytes(); |
|
2207 |
2206 |
2208 __ lduw(tmp, lh_offset, tmp2); |
2207 __ lduw(tmp, lh_offset, tmp2); |
2209 |
2208 |
2210 jint objArray_lh = Klass::array_layout_helper(T_OBJECT); |
2209 jint objArray_lh = Klass::array_layout_helper(T_OBJECT); |
2211 __ set(objArray_lh, tmp); |
2210 __ set(objArray_lh, tmp); |
2236 __ add(dst_ptr, tmp, dst_ptr); |
2235 __ add(dst_ptr, tmp, dst_ptr); |
2237 } |
2236 } |
2238 __ mov(length, len); |
2237 __ mov(length, len); |
2239 __ load_klass(dst, tmp); |
2238 __ load_klass(dst, tmp); |
2240 |
2239 |
2241 int ek_offset = (klassOopDesc::header_size() * HeapWordSize + |
2240 int ek_offset = in_bytes(objArrayKlass::element_klass_offset()); |
2242 objArrayKlass::element_klass_offset_in_bytes()); |
|
2243 __ ld_ptr(tmp, ek_offset, super_k); |
2241 __ ld_ptr(tmp, ek_offset, super_k); |
2244 |
2242 |
2245 int sco_offset = (klassOopDesc::header_size() * HeapWordSize + |
2243 int sco_offset = in_bytes(Klass::super_check_offset_offset()); |
2246 Klass::super_check_offset_offset_in_bytes()); |
|
2247 __ lduw(super_k, sco_offset, chk_off); |
2244 __ lduw(super_k, sco_offset, chk_off); |
2248 |
2245 |
2249 __ call_VM_leaf(tmp, copyfunc_addr); |
2246 __ call_VM_leaf(tmp, copyfunc_addr); |
2250 |
2247 |
2251 #ifndef PRODUCT |
2248 #ifndef PRODUCT |
2454 op->tmp3()->as_register() == G4 && |
2451 op->tmp3()->as_register() == G4 && |
2455 op->obj()->as_register() == O0 && |
2452 op->obj()->as_register() == O0 && |
2456 op->klass()->as_register() == G5, "must be"); |
2453 op->klass()->as_register() == G5, "must be"); |
2457 if (op->init_check()) { |
2454 if (op->init_check()) { |
2458 __ ldub(op->klass()->as_register(), |
2455 __ ldub(op->klass()->as_register(), |
2459 instanceKlass::init_state_offset_in_bytes() + sizeof(oopDesc), |
2456 in_bytes(instanceKlass::init_state_offset()), |
2460 op->tmp1()->as_register()); |
2457 op->tmp1()->as_register()); |
2461 add_debug_info_for_null_check_here(op->stub()->info()); |
2458 add_debug_info_for_null_check_here(op->stub()->info()); |
2462 __ cmp(op->tmp1()->as_register(), instanceKlass::fully_initialized); |
2459 __ cmp(op->tmp1()->as_register(), instanceKlass::fully_initialized); |
2463 __ br(Assembler::notEqual, false, Assembler::pn, *op->stub()->entry()); |
2460 __ br(Assembler::notEqual, false, Assembler::pn, *op->stub()->entry()); |
2464 __ delayed()->nop(); |
2461 __ delayed()->nop(); |
2625 __ brx(Assembler::notEqual, false, Assembler::pt, *failure_target); |
2622 __ brx(Assembler::notEqual, false, Assembler::pt, *failure_target); |
2626 __ delayed()->nop(); |
2623 __ delayed()->nop(); |
2627 } else { |
2624 } else { |
2628 bool need_slow_path = true; |
2625 bool need_slow_path = true; |
2629 if (k->is_loaded()) { |
2626 if (k->is_loaded()) { |
2630 if (k->super_check_offset() != sizeof(oopDesc) + Klass::secondary_super_cache_offset_in_bytes()) |
2627 if ((int) k->super_check_offset() != in_bytes(Klass::secondary_super_cache_offset())) |
2631 need_slow_path = false; |
2628 need_slow_path = false; |
2632 // perform the fast part of the checking logic |
2629 // perform the fast part of the checking logic |
2633 __ check_klass_subtype_fast_path(klass_RInfo, k_RInfo, Rtmp1, noreg, |
2630 __ check_klass_subtype_fast_path(klass_RInfo, k_RInfo, Rtmp1, noreg, |
2634 (need_slow_path ? success_target : NULL), |
2631 (need_slow_path ? success_target : NULL), |
2635 failure_target, NULL, |
2632 failure_target, NULL, |
2729 add_debug_info_for_null_check_here(op->info_for_exception()); |
2726 add_debug_info_for_null_check_here(op->info_for_exception()); |
2730 __ load_klass(array, k_RInfo); |
2727 __ load_klass(array, k_RInfo); |
2731 __ load_klass(value, klass_RInfo); |
2728 __ load_klass(value, klass_RInfo); |
2732 |
2729 |
2733 // get instance klass |
2730 // get instance klass |
2734 __ ld_ptr(Address(k_RInfo, objArrayKlass::element_klass_offset_in_bytes() + sizeof(oopDesc)), k_RInfo); |
2731 __ ld_ptr(Address(k_RInfo, objArrayKlass::element_klass_offset()), k_RInfo); |
2735 // perform the fast part of the checking logic |
2732 // perform the fast part of the checking logic |
2736 __ check_klass_subtype_fast_path(klass_RInfo, k_RInfo, Rtmp1, O7, success_target, failure_target, NULL); |
2733 __ check_klass_subtype_fast_path(klass_RInfo, k_RInfo, Rtmp1, O7, success_target, failure_target, NULL); |
2737 |
2734 |
2738 // call out-of-line instance of __ check_klass_subtype_slow_path(...): |
2735 // call out-of-line instance of __ check_klass_subtype_slow_path(...): |
2739 assert(klass_RInfo == G3 && k_RInfo == G1, "incorrect call setup"); |
2736 assert(klass_RInfo == G3 && k_RInfo == G1, "incorrect call setup"); |