equal
deleted
inserted
replaced
2056 int flags = op->flags(); |
2056 int flags = op->flags(); |
2057 ciArrayKlass* default_type = op->expected_type(); |
2057 ciArrayKlass* default_type = op->expected_type(); |
2058 BasicType basic_type = default_type != NULL ? default_type->element_type()->basic_type() : T_ILLEGAL; |
2058 BasicType basic_type = default_type != NULL ? default_type->element_type()->basic_type() : T_ILLEGAL; |
2059 if (basic_type == T_ARRAY) basic_type = T_OBJECT; |
2059 if (basic_type == T_ARRAY) basic_type = T_OBJECT; |
2060 |
2060 |
|
2061 #ifdef _LP64 |
|
2062 // higher 32bits must be null |
|
2063 __ sra(dst_pos, 0, dst_pos); |
|
2064 __ sra(src_pos, 0, src_pos); |
|
2065 __ sra(length, 0, length); |
|
2066 #endif |
|
2067 |
2061 // set up the arraycopy stub information |
2068 // set up the arraycopy stub information |
2062 ArrayCopyStub* stub = op->stub(); |
2069 ArrayCopyStub* stub = op->stub(); |
2063 |
2070 |
2064 // always do stub if no type information is available. it's ok if |
2071 // always do stub if no type information is available. it's ok if |
2065 // the known type isn't loaded since the code sanity checks |
2072 // the known type isn't loaded since the code sanity checks |
2148 __ add(length, dst_pos, tmp); |
2155 __ add(length, dst_pos, tmp); |
2149 __ cmp(tmp2, tmp); |
2156 __ cmp(tmp2, tmp); |
2150 __ br(Assembler::carrySet, false, Assembler::pn, *stub->entry()); |
2157 __ br(Assembler::carrySet, false, Assembler::pn, *stub->entry()); |
2151 __ delayed()->nop(); |
2158 __ delayed()->nop(); |
2152 } |
2159 } |
2153 |
|
2154 #ifndef _LP64 |
|
2155 __ sra(dst_pos, 0, dst_pos); //higher 32bits must be null |
|
2156 __ sra(src_pos, 0, src_pos); //higher 32bits must be null |
|
2157 #endif |
|
2158 |
2160 |
2159 int shift = shift_amount(basic_type); |
2161 int shift = shift_amount(basic_type); |
2160 |
2162 |
2161 if (flags & LIR_OpArrayCopy::type_check) { |
2163 if (flags & LIR_OpArrayCopy::type_check) { |
2162 // We don't know the array types are compatible |
2164 // We don't know the array types are compatible |
2241 __ add(dst_ptr, dst_pos, dst_ptr); |
2243 __ add(dst_ptr, dst_pos, dst_ptr); |
2242 } else { |
2244 } else { |
2243 __ sll(dst_pos, shift, tmp); |
2245 __ sll(dst_pos, shift, tmp); |
2244 __ add(dst_ptr, tmp, dst_ptr); |
2246 __ add(dst_ptr, tmp, dst_ptr); |
2245 } |
2247 } |
2246 LP64_ONLY( __ sra(length, 0, length)); //higher 32bits must be null |
|
2247 __ mov(length, len); |
2248 __ mov(length, len); |
2248 __ load_klass(dst, tmp); |
2249 __ load_klass(dst, tmp); |
2249 |
2250 |
2250 int ek_offset = (klassOopDesc::header_size() * HeapWordSize + |
2251 int ek_offset = (klassOopDesc::header_size() * HeapWordSize + |
2251 objArrayKlass::element_klass_offset_in_bytes()); |
2252 objArrayKlass::element_klass_offset_in_bytes()); |