< prev index next >

src/cpu/x86/vm/interp_masm_x86_64.cpp

Print this page




 283   movptr(mcs, Address(method,Method::method_counters_offset()));
 284   testptr(mcs, mcs);
 285   jcc(Assembler::zero, skip); // No MethodCounters allocated, OutOfMemory
 286   bind(has_counters);
 287 }
 288 
 289 // Load object from cpool->resolved_references(index)
 290 void InterpreterMacroAssembler::load_resolved_reference_at_index(
 291                                            Register result, Register index) {
 292   assert_different_registers(result, index);
 293   // convert from field index to resolved_references() index and from
 294   // word index to byte offset. Since this is a java object, it can be compressed
 295   Register tmp = index;  // reuse
 296   shll(tmp, LogBytesPerHeapOop);
 297 
 298   get_constant_pool(result);
 299   // load pointer for resolved_references[] objArray
 300   movptr(result, Address(result, ConstantPool::resolved_references_offset_in_bytes()));
 301   // JNIHandles::resolve(obj);
 302   movptr(result, Address(result, 0));

 303   // Add in the index
 304   addptr(result, tmp);
 305   load_heap_oop(result, Address(result, arrayOopDesc::base_offset_in_bytes(T_OBJECT)));
 306 }
 307 
 308 // Generate a subtype check: branch to ok_is_subtype if sub_klass is a
 309 // subtype of super_klass.
 310 //
 311 // Args:
 312 //      rax: superklass
 313 //      Rsub_klass: subklass
 314 //
 315 // Kills:
 316 //      rcx, rdi
 317 void InterpreterMacroAssembler::gen_subtype_check(Register Rsub_klass,
 318                                                   Label& ok_is_subtype) {
 319   assert(Rsub_klass != rax, "rax holds superklass");
 320   assert(Rsub_klass != r14, "r14 holds locals");
 321   assert(Rsub_klass != r13, "r13 holds bcp");
 322   assert(Rsub_klass != rcx, "rcx holds 2ndary super array length");




 283   movptr(mcs, Address(method,Method::method_counters_offset()));
 284   testptr(mcs, mcs);
 285   jcc(Assembler::zero, skip); // No MethodCounters allocated, OutOfMemory
 286   bind(has_counters);
 287 }
 288 
 289 // Load object from cpool->resolved_references(index)
 290 void InterpreterMacroAssembler::load_resolved_reference_at_index(
 291                                            Register result, Register index) {
 292   assert_different_registers(result, index);
 293   // convert from field index to resolved_references() index and from
 294   // word index to byte offset. Since this is a java object, it can be compressed
 295   Register tmp = index;  // reuse
 296   shll(tmp, LogBytesPerHeapOop);
 297 
 298   get_constant_pool(result);
 299   // load pointer for resolved_references[] objArray
 300   movptr(result, Address(result, ConstantPool::resolved_references_offset_in_bytes()));
 301   // JNIHandles::resolve(obj);
 302   movptr(result, Address(result, 0));
 303   oopDesc::bs()->interpreter_read_barrier_not_null(this, result);
 304   // Add in the index
 305   addptr(result, tmp);
 306   load_heap_oop(result, Address(result, arrayOopDesc::base_offset_in_bytes(T_OBJECT)));
 307 }
 308 
 309 // Generate a subtype check: branch to ok_is_subtype if sub_klass is a
 310 // subtype of super_klass.
 311 //
 312 // Args:
 313 //      rax: superklass
 314 //      Rsub_klass: subklass
 315 //
 316 // Kills:
 317 //      rcx, rdi
 318 void InterpreterMacroAssembler::gen_subtype_check(Register Rsub_klass,
 319                                                   Label& ok_is_subtype) {
 320   assert(Rsub_klass != rax, "rax holds superklass");
 321   assert(Rsub_klass != r14, "r14 holds locals");
 322   assert(Rsub_klass != r13, "r13 holds bcp");
 323   assert(Rsub_klass != rcx, "rcx holds 2ndary super array length");


< prev index next >