< prev index next >

src/hotspot/cpu/x86/templateTable_x86.cpp

Print this page
@@ -3656,12 +3656,11 @@
    __ jump_from_interpreted(method, rax);
  
    __ bind(notFinal);
  
    // get receiver klass
-   __ null_check(recv, oopDesc::klass_offset_in_bytes());
-   __ load_klass(rax, recv, rscratch1);
+   __ load_klass(rax, recv, rscratch1, true);
  
    // profile this call
    __ profile_virtual_call(rax, rlocals, rdx);
    // get target Method* & entry point
    __ lookup_virtual_method(rax, index, method);

@@ -3748,12 +3747,11 @@
    __ movl(rlocals, rdx);
    __ andl(rlocals, (1 << ConstantPoolCacheEntry::is_vfinal_shift));
    __ jcc(Assembler::zero, notVFinal);
  
    // Get receiver klass into rlocals - also a null check
-   __ null_check(rcx, oopDesc::klass_offset_in_bytes());
-   __ load_klass(rlocals, rcx, rscratch1);
+   __ load_klass(rlocals, rcx, rscratch1, true);
  
    Label subtype;
    __ check_klass_subtype(rlocals, rax, rbcp, subtype);
    // If we get here the typecheck failed
    recvKlass = rdx;

@@ -3771,12 +3769,11 @@
    // no return from above
    __ bind(notVFinal);
  
    // Get receiver klass into rdx - also a null check
    __ restore_locals();  // restore r14
-   __ null_check(rcx, oopDesc::klass_offset_in_bytes());
-   __ load_klass(rdx, rcx, rscratch1);
+   __ load_klass(rdx, rcx, rscratch1, true);
  
    Label no_such_method;
  
    // Preserve method for throw_AbstractMethodErrorVerbose.
    __ mov(rcx, rbx);

@@ -3994,18 +3991,16 @@
      __ jcc(Assembler::notZero, loop);
      }
  
      // initialize object header only.
      __ bind(initialize_header);
-     __ movptr(Address(rax, oopDesc::mark_offset_in_bytes()),
-               (intptr_t)markWord::prototype().value()); // header
      __ pop(rcx);   // get saved klass back in the register.
- #ifdef _LP64
-     __ xorl(rsi, rsi); // use zero reg to clear memory (shorter code)
-     __ store_klass_gap(rax, rsi);  // zero klass gap for compressed oops
+     __ movptr(rbx, Address(rcx, Klass::prototype_header_offset()));
+     __ movptr(Address(rax, oopDesc::mark_offset_in_bytes ()), rbx);
+ #ifndef _LP64
+     __ store_klass(rax, rcx);  // klass
  #endif
-     __ store_klass(rax, rcx, rscratch1);  // klass
  
      {
        SkipIfEqual skip_if(_masm, &DTraceAllocProbes, 0, rscratch1);
        // Trigger dtrace event for fastpath
        __ push(atos);

@@ -4153,11 +4148,11 @@
  #endif
  
    __ pop_ptr(rdx); // restore receiver
    __ verify_oop(rdx);
    __ load_klass(rdx, rdx, rscratch1);
-   __ jmpb(resolved);
+   __ jmp(resolved);
  
    // Get superklass in rax and subklass in rdx
    __ bind(quicked);
    __ load_klass(rdx, rax, rscratch1);
    __ load_resolved_klass_at_index(rax, rcx, rbx);
< prev index next >