src/hotspot/cpu/aarch64/interp_masm_aarch64.cpp
changeset 50496 6d021f0a2bf8
parent 50380 bec342339138
child 50577 bf7e2684cd0a
--- a/src/hotspot/cpu/aarch64/interp_masm_aarch64.cpp	Fri Jun 08 13:32:51 2018 -0700
+++ b/src/hotspot/cpu/aarch64/interp_masm_aarch64.cpp	Mon Jun 04 15:11:17 2018 +0200
@@ -268,9 +268,6 @@
 void InterpreterMacroAssembler::load_resolved_reference_at_index(
                                            Register result, Register index, Register tmp) {
   assert_different_registers(result, index);
-  // convert from field index to resolved_references() index and from
-  // word index to byte offset. Since this is a java object, it can be compressed
-  lslw(index, index, LogBytesPerHeapOop);
 
   get_constant_pool(result);
   // load pointer for resolved_references[] objArray
@@ -278,8 +275,8 @@
   ldr(result, Address(result, ConstantPoolCache::resolved_references_offset_in_bytes()));
   resolve_oop_handle(result, tmp);
   // Add in the index
-  add(result, result, index);
-  load_heap_oop(result, Address(result, arrayOopDesc::base_offset_in_bytes(T_OBJECT)));
+  add(index, index, arrayOopDesc::base_offset_in_bytes(T_OBJECT) >> LogBytesPerHeapOop);
+  load_heap_oop(result, Address(result, index, Address::uxtw(LogBytesPerHeapOop)));
 }
 
 void InterpreterMacroAssembler::load_resolved_klass_at_offset(