< prev index next >

src/hotspot/cpu/x86/templateTable_x86.cpp

Print this page

@@ -2757,10 +2757,20 @@
     __ pop(state);
     __ bind(no_safepoint);
   }
 
   if (state == atos) {
+    Label not_returning_null_vt;
+    const Register method = rbx;
+
+    __ testl(rax, rax);
+    __ jcc(Assembler::notZero, not_returning_null_vt);
+    __ get_method(method);
+    __ cmpb(Address(rbx, Method::flags_offset() + in_ByteSize(1)), Method::byte_value_for_known_not_returning_vt());
+    __ jcc(Assembler::equal, not_returning_null_vt);
+    __ call_VM(noreg, CAST_FROM_FN_PTR(address, InterpreterRuntime::deoptimize_caller_frame_for_vt), method);
+    __ bind(not_returning_null_vt);
     if (ValueTypesBufferMaxMemory > 0) {
       Label notBuffered;
 
       __ test_value_is_not_buffered(rax, rbx, notBuffered);
       const Register thread1 = NOT_LP64(rcx) LP64_ONLY(r15_thread);
< prev index next >