--- old/src/hotspot/cpu/x86/templateTable_x86.cpp 2018-05-07 15:52:00.056312779 +0200 +++ new/src/hotspot/cpu/x86/templateTable_x86.cpp 2018-05-07 15:51:59.760307766 +0200 @@ -4764,6 +4764,17 @@ 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