< prev index next >
src/cpu/arm/vm/interp_masm_arm.cpp
Print this page
*** 296,315 ****
assert_different_registers(result, index);
get_constant_pool(result);
Register cache = result;
// load pointer for resolved_references[] objArray
! ldr(cache, Address(result, ConstantPool::resolved_references_offset_in_bytes()));
// JNIHandles::resolve(result)
ldr(cache, Address(cache, 0));
// Add in the 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
add(cache, cache, AsmOperand(index, lsl, LogBytesPerHeapOop));
load_heap_oop(result, Address(cache, arrayOopDesc::base_offset_in_bytes(T_OBJECT)));
}
// Generate a subtype check: branch to not_subtype if sub_klass is
// not a subtype of super_klass.
// Profiling code for the subtype check failure (profile_typecheck_failed)
// should be explicitly generated by the caller in the not_subtype case.
// Blows Rtemp, tmp1, tmp2.
--- 296,325 ----
assert_different_registers(result, index);
get_constant_pool(result);
Register cache = result;
// load pointer for resolved_references[] objArray
! ldr(cache, Address(result, ConstantPool::cache_offset_in_bytes()));
! ldr(cache, Address(result, ConstantPoolCache::resolved_references_offset_in_bytes()));
// JNIHandles::resolve(result)
ldr(cache, Address(cache, 0));
// Add in the 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
add(cache, cache, AsmOperand(index, lsl, LogBytesPerHeapOop));
load_heap_oop(result, Address(cache, arrayOopDesc::base_offset_in_bytes(T_OBJECT)));
}
+ void InterpreterMacroAssembler::load_resolved_klass_at_offset(
+ Register Rcpool, Register Rindex, Register Rklass) {
+ add(Rtemp, Rcpool, AsmOperand(Rindex, lsl, LogBytesPerWord));
+ ldrh(Rtemp, Address(Rtemp, sizeof(ConstantPool))); // Rtemp = resolved_klass_index
+ ldr(Rklass, Address(Rcpool, ConstantPool::resolved_klasses_offset_in_bytes())); // Rklass = cpool->_resolved_klasses
+ add(Rklass, Rklass, AsmOperand(Rtemp, lsl, LogBytesPerWord));
+ ldr(Rklass, Address(Rklass, Array<Klass*>::base_offset_in_bytes()));
+ }
+
// Generate a subtype check: branch to not_subtype if sub_klass is
// not a subtype of super_klass.
// Profiling code for the subtype check failure (profile_typecheck_failed)
// should be explicitly generated by the caller in the not_subtype case.
// Blows Rtemp, tmp1, tmp2.
< prev index next >