src/hotspot/cpu/aarch64/interp_masm_aarch64.cpp
changeset 49816 a3e79f97e86b
parent 49753 46f2dc7c4c39
child 50110 3d98842c8677
equal deleted inserted replaced
49815:76e3bcb9bee1 49816:a3e79f97e86b
   263   bind(has_counters);
   263   bind(has_counters);
   264 }
   264 }
   265 
   265 
   266 // Load object from cpool->resolved_references(index)
   266 // Load object from cpool->resolved_references(index)
   267 void InterpreterMacroAssembler::load_resolved_reference_at_index(
   267 void InterpreterMacroAssembler::load_resolved_reference_at_index(
   268                                            Register result, Register index) {
   268                                            Register result, Register index, Register tmp) {
   269   assert_different_registers(result, index);
   269   assert_different_registers(result, index);
   270   // convert from field index to resolved_references() index and from
   270   // convert from field index to resolved_references() index and from
   271   // word index to byte offset. Since this is a java object, it can be compressed
   271   // word index to byte offset. Since this is a java object, it can be compressed
   272   Register tmp = index;  // reuse
   272   lslw(index, index, LogBytesPerHeapOop);
   273   lslw(tmp, tmp, LogBytesPerHeapOop);
       
   274 
   273 
   275   get_constant_pool(result);
   274   get_constant_pool(result);
   276   // load pointer for resolved_references[] objArray
   275   // load pointer for resolved_references[] objArray
   277   ldr(result, Address(result, ConstantPool::cache_offset_in_bytes()));
   276   ldr(result, Address(result, ConstantPool::cache_offset_in_bytes()));
   278   ldr(result, Address(result, ConstantPoolCache::resolved_references_offset_in_bytes()));
   277   ldr(result, Address(result, ConstantPoolCache::resolved_references_offset_in_bytes()));
   279   resolve_oop_handle(result);
   278   resolve_oop_handle(result, tmp);
   280   // Add in the index
   279   // Add in the index
   281   add(result, result, tmp);
   280   add(result, result, index);
   282   BarrierSetAssembler *bs = BarrierSet::barrier_set()->barrier_set_assembler();
   281   BarrierSetAssembler *bs = BarrierSet::barrier_set()->barrier_set_assembler();
   283   bs->load_at(this, IN_HEAP, T_OBJECT, result, Address(result, arrayOopDesc::base_offset_in_bytes(T_OBJECT)), /*tmp1*/ noreg, /*tmp_thread*/ noreg);
   282   bs->load_at(this, IN_HEAP, T_OBJECT, result, Address(result, arrayOopDesc::base_offset_in_bytes(T_OBJECT)), tmp, /*tmp_thread*/ noreg);
   284 }
   283 }
   285 
   284 
   286 void InterpreterMacroAssembler::load_resolved_klass_at_offset(
   285 void InterpreterMacroAssembler::load_resolved_klass_at_offset(
   287                              Register cpool, Register index, Register klass, Register temp) {
   286                              Register cpool, Register index, Register klass, Register temp) {
   288   add(temp, cpool, index, LSL, LogBytesPerWord);
   287   add(temp, cpool, index, LSL, LogBytesPerWord);