< prev index next >

src/cpu/arm/vm/interp_masm_arm.cpp

Print this page


 281 
 282   // load constant pool cache pointer
 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::resolved_references_offset_in_bytes()));

 302   // JNIHandles::resolve(result)
 303   ldr(cache, Address(cache, 0));
 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 // Generate a subtype check: branch to not_subtype if sub_klass is
 312 // not a subtype of super_klass.
 313 // Profiling code for the subtype check failure (profile_typecheck_failed)
 314 // should be explicitly generated by the caller in the not_subtype case.
 315 // Blows Rtemp, tmp1, tmp2.
 316 void InterpreterMacroAssembler::gen_subtype_check(Register Rsub_klass,
 317                                                   Register Rsuper_klass,
 318                                                   Label &not_subtype,
 319                                                   Register tmp1,
 320                                                   Register tmp2) {
 321 
 322   assert_different_registers(Rsub_klass, Rsuper_klass, tmp1, tmp2, Rtemp);
 323   Label ok_is_subtype, loop, update_cache;
 324 
 325   const Register super_check_offset = tmp1;
 326   const Register cached_super = tmp2;
 327 
 328   // Profile the not-null value's klass.




 281 
 282   // load constant pool cache pointer
 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.
 325 // Blows Rtemp, tmp1, tmp2.
 326 void InterpreterMacroAssembler::gen_subtype_check(Register Rsub_klass,
 327                                                   Register Rsuper_klass,
 328                                                   Label &not_subtype,
 329                                                   Register tmp1,
 330                                                   Register tmp2) {
 331 
 332   assert_different_registers(Rsub_klass, Rsuper_klass, tmp1, tmp2, Rtemp);
 333   Label ok_is_subtype, loop, update_cache;
 334 
 335   const Register super_check_offset = tmp1;
 336   const Register cached_super = tmp2;
 337 
 338   // Profile the not-null value's klass.


< prev index next >