< prev index next >

src/cpu/arm/vm/interp_masm_arm.cpp

Print this page




 283   ldr(cache, Address(FP, frame::interpreter_frame_cache_offset * wordSize));
 284 
 285   // skip past the header
 286   add(cache, cache, in_bytes(ConstantPoolCache::base_offset()));
 287   // convert from field index to ConstantPoolCacheEntry index
 288   // and from word offset to byte offset
 289   assert(sizeof(ConstantPoolCacheEntry) == 4*wordSize, "adjust code below");
 290   add(cache, cache, AsmOperand(reg_tmp, lsl, 2 + LogBytesPerWord));
 291 }
 292 
 293 // Load object from cpool->resolved_references(index)
 294 void InterpreterMacroAssembler::load_resolved_reference_at_index(
 295                                            Register result, Register index) {
 296   assert_different_registers(result, index);
 297   get_constant_pool(result);
 298 
 299   Register cache = result;
 300   // load pointer for resolved_references[] objArray
 301   ldr(cache, Address(result, ConstantPool::cache_offset_in_bytes()));
 302   ldr(cache, Address(result, ConstantPoolCache::resolved_references_offset_in_bytes()));
 303   // JNIHandles::resolve(result)
 304   ldr(cache, Address(cache, 0));
 305   // Add in the index
 306   // convert from field index to resolved_references() index and from
 307   // word index to byte offset. Since this is a java object, it can be compressed
 308   add(cache, cache, AsmOperand(index, lsl, LogBytesPerHeapOop));
 309   load_heap_oop(result, Address(cache, arrayOopDesc::base_offset_in_bytes(T_OBJECT)));
 310 }
 311 
 312 void InterpreterMacroAssembler::load_resolved_klass_at_offset(
 313                                            Register Rcpool, Register Rindex, Register Rklass) {
 314   add(Rtemp, Rcpool, AsmOperand(Rindex, lsl, LogBytesPerWord));
 315   ldrh(Rtemp, Address(Rtemp, sizeof(ConstantPool))); // Rtemp = resolved_klass_index
 316   ldr(Rklass, Address(Rcpool,  ConstantPool::resolved_klasses_offset_in_bytes())); // Rklass = cpool->_resolved_klasses
 317   add(Rklass, Rklass, AsmOperand(Rtemp, lsl, LogBytesPerWord));
 318   ldr(Rklass, Address(Rklass, Array<Klass*>::base_offset_in_bytes()));
 319 }
 320 
 321 // Generate a subtype check: branch to not_subtype if sub_klass is
 322 // not a subtype of super_klass.
 323 // Profiling code for the subtype check failure (profile_typecheck_failed)
 324 // should be explicitly generated by the caller in the not_subtype case.




 283   ldr(cache, Address(FP, frame::interpreter_frame_cache_offset * wordSize));
 284 
 285   // skip past the header
 286   add(cache, cache, in_bytes(ConstantPoolCache::base_offset()));
 287   // convert from field index to ConstantPoolCacheEntry index
 288   // and from word offset to byte offset
 289   assert(sizeof(ConstantPoolCacheEntry) == 4*wordSize, "adjust code below");
 290   add(cache, cache, AsmOperand(reg_tmp, lsl, 2 + LogBytesPerWord));
 291 }
 292 
 293 // Load object from cpool->resolved_references(index)
 294 void InterpreterMacroAssembler::load_resolved_reference_at_index(
 295                                            Register result, Register index) {
 296   assert_different_registers(result, index);
 297   get_constant_pool(result);
 298 
 299   Register cache = result;
 300   // load pointer for resolved_references[] objArray
 301   ldr(cache, Address(result, ConstantPool::cache_offset_in_bytes()));
 302   ldr(cache, Address(result, ConstantPoolCache::resolved_references_offset_in_bytes()));
 303   resolve_oop_handle(cache);

 304   // Add in the index
 305   // convert from field index to resolved_references() index and from
 306   // word index to byte offset. Since this is a java object, it can be compressed
 307   add(cache, cache, AsmOperand(index, lsl, LogBytesPerHeapOop));
 308   load_heap_oop(result, Address(cache, arrayOopDesc::base_offset_in_bytes(T_OBJECT)));
 309 }
 310 
 311 void InterpreterMacroAssembler::load_resolved_klass_at_offset(
 312                                            Register Rcpool, Register Rindex, Register Rklass) {
 313   add(Rtemp, Rcpool, AsmOperand(Rindex, lsl, LogBytesPerWord));
 314   ldrh(Rtemp, Address(Rtemp, sizeof(ConstantPool))); // Rtemp = resolved_klass_index
 315   ldr(Rklass, Address(Rcpool,  ConstantPool::resolved_klasses_offset_in_bytes())); // Rklass = cpool->_resolved_klasses
 316   add(Rklass, Rklass, AsmOperand(Rtemp, lsl, LogBytesPerWord));
 317   ldr(Rklass, Address(Rklass, Array<Klass*>::base_offset_in_bytes()));
 318 }
 319 
 320 // Generate a subtype check: branch to not_subtype if sub_klass is
 321 // not a subtype of super_klass.
 322 // Profiling code for the subtype check failure (profile_typecheck_failed)
 323 // should be explicitly generated by the caller in the not_subtype case.


< prev index next >