< prev index next >

src/hotspot/cpu/x86/templateTable_x86.cpp

Print this page

        

@@ -4762,10 +4762,21 @@
 
   Register rtop = LP64_ONLY(c_rarg3) NOT_LP64(rcx);
   Register rbot = LP64_ONLY(c_rarg2) NOT_LP64(rbx);
   Register rmon = LP64_ONLY(c_rarg1) NOT_LP64(rdx);
 
+  if (EnableValhalla) {
+    Label is_not_value;
+
+    __ test_oop_is_not_value(rax, rmon, is_not_value);
+    __ call_VM(noreg, CAST_FROM_FN_PTR(address,
+                     InterpreterRuntime::throw_illegal_monitor_state_exception));
+    __ should_not_reach_here();
+
+    __ bind(is_not_value);
+
+  }
   // initialize entry pointer
   __ xorl(rmon, rmon); // points to free slot or NULL
 
   // find a free slot in the monitor block (result in rmon)
   {
< prev index next >