8156731: aarch64: java/util/Arrays/Correct.java fails due to _generic_arraycopy stub routine
authorfyang
Fri, 27 May 2016 01:02:16 +0800
changeset 39232 118d17fef4f9
parent 38716 640c37e201b9
child 39233 98bdcf5cec8f
8156731: aarch64: java/util/Arrays/Correct.java fails due to _generic_arraycopy stub routine Summary: fix address calculation considering compressed oops _generic_arraycopy stub routine Reviewed-by: aph
hotspot/src/cpu/aarch64/vm/stubGenerator_aarch64.cpp
--- a/hotspot/src/cpu/aarch64/vm/stubGenerator_aarch64.cpp	Thu May 26 14:17:50 2016 +0200
+++ b/hotspot/src/cpu/aarch64/vm/stubGenerator_aarch64.cpp	Fri May 27 01:02:16 2016 +0800
@@ -1299,7 +1299,7 @@
       if (VerifyOops)
         verify_oop_array(size, d, count, r16);
       __ sub(count, count, 1); // make an inclusive end pointer
-      __ lea(count, Address(d, count, Address::uxtw(exact_log2(size))));
+      __ lea(count, Address(d, count, Address::lsl(exact_log2(size))));
       gen_write_ref_array_post_barrier(d, count, rscratch1);
     }
     __ leave();
@@ -2002,9 +2002,9 @@
     arraycopy_range_checks(src, src_pos, dst, dst_pos, scratch_length,
                            rscratch2, L_failed);
 
-    __ lea(from, Address(src, src_pos, Address::lsl(3)));
+    __ lea(from, Address(src, src_pos, Address::lsl(LogBytesPerHeapOop)));
     __ add(from, from, arrayOopDesc::base_offset_in_bytes(T_OBJECT));
-    __ lea(to, Address(dst, dst_pos, Address::lsl(3)));
+    __ lea(to, Address(dst, dst_pos, Address::lsl(LogBytesPerHeapOop)));
     __ add(to, to, arrayOopDesc::base_offset_in_bytes(T_OBJECT));
     __ movw(count, scratch_length); // length
   __ BIND(L_plain_copy);
@@ -2027,9 +2027,9 @@
       __ load_klass(rscratch2_dst_klass, dst); // reload
 
       // Marshal the base address arguments now, freeing registers.
-      __ lea(from, Address(src, src_pos, Address::lsl(3)));
+      __ lea(from, Address(src, src_pos, Address::lsl(LogBytesPerHeapOop)));
       __ add(from, from, arrayOopDesc::base_offset_in_bytes(T_OBJECT));
-      __ lea(to, Address(dst, dst_pos, Address::lsl(3)));
+      __ lea(to, Address(dst, dst_pos, Address::lsl(LogBytesPerHeapOop)));
       __ add(to, to, arrayOopDesc::base_offset_in_bytes(T_OBJECT));
       __ movw(count, length);           // length (reloaded)
       Register sco_temp = c_rarg3;      // this register is free now