hotspot/src/cpu/x86/vm/templateTable_x86.cpp
changeset 46427 54713555867e
parent 43980 792a70d867f4
child 46630 75aa3e39d02c
equal deleted inserted replaced
46426:02a1fc064144 46427:54713555867e
  3844   const int tags_offset = Array<u1>::base_offset_in_bytes();
  3844   const int tags_offset = Array<u1>::base_offset_in_bytes();
  3845   __ cmpb(Address(rax, rdx, Address::times_1, tags_offset), JVM_CONSTANT_Class);
  3845   __ cmpb(Address(rax, rdx, Address::times_1, tags_offset), JVM_CONSTANT_Class);
  3846   __ jcc(Assembler::notEqual, slow_case_no_pop);
  3846   __ jcc(Assembler::notEqual, slow_case_no_pop);
  3847 
  3847 
  3848   // get InstanceKlass
  3848   // get InstanceKlass
  3849   __ movptr(rcx, Address(rcx, rdx, Address::times_ptr, sizeof(ConstantPool)));
  3849   __ load_resolved_klass_at_index(rcx, rdx, rcx);
  3850   __ push(rcx);  // save the contexts of klass for initializing the header
  3850   __ push(rcx);  // save the contexts of klass for initializing the header
  3851 
  3851 
  3852   // make sure klass is initialized & doesn't have finalizer
  3852   // make sure klass is initialized & doesn't have finalizer
  3853   // make sure klass is fully initialized
  3853   // make sure klass is fully initialized
  3854   __ cmpb(Address(rcx, InstanceKlass::init_state_offset()), InstanceKlass::fully_initialized);
  3854   __ cmpb(Address(rcx, InstanceKlass::init_state_offset()), InstanceKlass::fully_initialized);
  4059   __ jmpb(resolved);
  4059   __ jmpb(resolved);
  4060 
  4060 
  4061   // Get superklass in rax and subklass in rbx
  4061   // Get superklass in rax and subklass in rbx
  4062   __ bind(quicked);
  4062   __ bind(quicked);
  4063   __ mov(rdx, rax); // Save object in rdx; rax needed for subtype check
  4063   __ mov(rdx, rax); // Save object in rdx; rax needed for subtype check
  4064   __ movptr(rax, Address(rcx, rbx,
  4064   __ load_resolved_klass_at_index(rcx, rbx, rax);
  4065                        Address::times_ptr, sizeof(ConstantPool)));
       
  4066 
  4065 
  4067   __ bind(resolved);
  4066   __ bind(resolved);
  4068   __ load_klass(rbx, rdx);
  4067   __ load_klass(rbx, rdx);
  4069 
  4068 
  4070   // Generate subtype check.  Blows rcx, rdi.  Object in rdx.
  4069   // Generate subtype check.  Blows rcx, rdi.  Object in rdx.
  4126   __ jmpb(resolved);
  4125   __ jmpb(resolved);
  4127 
  4126 
  4128   // Get superklass in rax and subklass in rdx
  4127   // Get superklass in rax and subklass in rdx
  4129   __ bind(quicked);
  4128   __ bind(quicked);
  4130   __ load_klass(rdx, rax);
  4129   __ load_klass(rdx, rax);
  4131   __ movptr(rax, Address(rcx, rbx,
  4130   __ load_resolved_klass_at_index(rcx, rbx, rax);
  4132                          Address::times_ptr, sizeof(ConstantPool)));
       
  4133 
  4131 
  4134   __ bind(resolved);
  4132   __ bind(resolved);
  4135 
  4133 
  4136   // Generate subtype check.  Blows rcx, rdi
  4134   // Generate subtype check.  Blows rcx, rdi
  4137   // Superklass in rax.  Subklass in rdx.
  4135   // Superklass in rax.  Subklass in rdx.