< prev index next >

src/hotspot/cpu/x86/templateInterpreterGenerator_x86.cpp

Print this page

        

@@ -254,10 +254,23 @@
     // call. Some oop field may be live in some registers but we can't
     // tell. That runtime call will take care of preserving them
     // across a GC if there's one.
     __ super_call_VM_leaf(StubRoutines::store_value_type_fields_to_buf());
     __ bind(skip);
+
+    if (ReturnValuesInThreadLocalBuffer) {
+      // vt_alloc_ptr adjustment
+      Label no_adjustment;
+      __ cmpptr(rax, Address(r15_thread, in_bytes(JavaThread::vt_alloc_ptr_offset())));
+      __ jcc(Assembler::notEqual, no_adjustment);
+      __ load_klass(rbx, rax);
+      __ movl(r13, Address(rbx, Klass::layout_helper_offset()));
+      __ lea(r14, Address(rax, r13, Address::times_1));
+      __ movptr(Address(r15_thread, in_bytes(JavaThread::vt_alloc_ptr_offset())), r14);
+      __ bind(no_adjustment);
+    }
+
 #endif
   }
 
   __ restore_bcp();
   __ restore_locals();
< prev index next >