103 if (UseCompressedOops) { |
103 if (UseCompressedOops) { |
104 if (dst->is_address() && !dst->is_stack() && (dst->type() == T_OBJECT || dst->type() == T_ARRAY)) return false; |
104 if (dst->is_address() && !dst->is_stack() && (dst->type() == T_OBJECT || dst->type() == T_ARRAY)) return false; |
105 if (src->is_address() && !src->is_stack() && (src->type() == T_OBJECT || src->type() == T_ARRAY)) return false; |
105 if (src->is_address() && !src->is_stack() && (src->type() == T_OBJECT || src->type() == T_ARRAY)) return false; |
106 } |
106 } |
107 |
107 |
108 if (UseCompressedKlassPointers) { |
108 if (UseCompressedClassPointers) { |
109 if (src->is_address() && !src->is_stack() && src->type() == T_ADDRESS && |
109 if (src->is_address() && !src->is_stack() && src->type() == T_ADDRESS && |
110 src->as_address_ptr()->disp() == oopDesc::klass_offset_in_bytes()) return false; |
110 src->as_address_ptr()->disp() == oopDesc::klass_offset_in_bytes()) return false; |
111 } |
111 } |
112 |
112 |
113 if (dst->is_register()) { |
113 if (dst->is_register()) { |
961 } |
961 } |
962 break; |
962 break; |
963 case T_METADATA: __ ld_ptr(base, offset, to_reg->as_register()); break; |
963 case T_METADATA: __ ld_ptr(base, offset, to_reg->as_register()); break; |
964 case T_ADDRESS: |
964 case T_ADDRESS: |
965 #ifdef _LP64 |
965 #ifdef _LP64 |
966 if (offset == oopDesc::klass_offset_in_bytes() && UseCompressedKlassPointers) { |
966 if (offset == oopDesc::klass_offset_in_bytes() && UseCompressedClassPointers) { |
967 __ lduw(base, offset, to_reg->as_register()); |
967 __ lduw(base, offset, to_reg->as_register()); |
968 __ decode_klass_not_null(to_reg->as_register()); |
968 __ decode_klass_not_null(to_reg->as_register()); |
969 } else |
969 } else |
970 #endif |
970 #endif |
971 { |
971 { |
2206 |
2206 |
2207 if (flags & LIR_OpArrayCopy::type_check) { |
2207 if (flags & LIR_OpArrayCopy::type_check) { |
2208 // We don't know the array types are compatible |
2208 // We don't know the array types are compatible |
2209 if (basic_type != T_OBJECT) { |
2209 if (basic_type != T_OBJECT) { |
2210 // Simple test for basic type arrays |
2210 // Simple test for basic type arrays |
2211 if (UseCompressedKlassPointers) { |
2211 if (UseCompressedClassPointers) { |
2212 // We don't need decode because we just need to compare |
2212 // We don't need decode because we just need to compare |
2213 __ lduw(src, oopDesc::klass_offset_in_bytes(), tmp); |
2213 __ lduw(src, oopDesc::klass_offset_in_bytes(), tmp); |
2214 __ lduw(dst, oopDesc::klass_offset_in_bytes(), tmp2); |
2214 __ lduw(dst, oopDesc::klass_offset_in_bytes(), tmp2); |
2215 __ cmp(tmp, tmp2); |
2215 __ cmp(tmp, tmp2); |
2216 __ br(Assembler::notEqual, false, Assembler::pt, *stub->entry()); |
2216 __ br(Assembler::notEqual, false, Assembler::pt, *stub->entry()); |
2340 // dst type is exactly the expected type and the src type is a |
2340 // dst type is exactly the expected type and the src type is a |
2341 // subtype which we can't check or src is the same array as dst |
2341 // subtype which we can't check or src is the same array as dst |
2342 // but not necessarily exactly of type default_type. |
2342 // but not necessarily exactly of type default_type. |
2343 Label known_ok, halt; |
2343 Label known_ok, halt; |
2344 metadata2reg(op->expected_type()->constant_encoding(), tmp); |
2344 metadata2reg(op->expected_type()->constant_encoding(), tmp); |
2345 if (UseCompressedKlassPointers) { |
2345 if (UseCompressedClassPointers) { |
2346 // tmp holds the default type. It currently comes uncompressed after the |
2346 // tmp holds the default type. It currently comes uncompressed after the |
2347 // load of a constant, so encode it. |
2347 // load of a constant, so encode it. |
2348 __ encode_klass_not_null(tmp); |
2348 __ encode_klass_not_null(tmp); |
2349 // load the raw value of the dst klass, since we will be comparing |
2349 // load the raw value of the dst klass, since we will be comparing |
2350 // uncompressed values directly. |
2350 // uncompressed values directly. |