--- old/src/hotspot/cpu/x86/macroAssembler_x86.cpp 2019-07-16 20:29:25.106646845 -0700 +++ new/src/hotspot/cpu/x86/macroAssembler_x86.cpp 2019-07-16 20:29:24.782635084 -0700 @@ -5883,17 +5883,18 @@ BIND(L_end); } -void MacroAssembler::store_value_type_fields_to_buf(ciValueKlass* vk) { -#ifndef _LP64 - super_call_VM_leaf(StubRoutines::store_value_type_fields_to_buf()); -#else +int MacroAssembler::store_value_type_fields_to_buf(ciValueKlass* vk, bool from_interpreter) { // A value type might be returned. If fields are in registers we // need to allocate a value type instance and initialize it with // the value of the fields. - Label skip, slow_case; + Label skip; // We only need a new buffered value if a new one is not returned testptr(rax, 1); jcc(Assembler::zero, skip); + int call_offset = -1; + +#ifdef _LP64 + Label slow_case; // Try to allocate a new buffered value (from the heap) if (UseTLAB) { @@ -5947,9 +5948,17 @@ // 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); #endif + + if (from_interpreter) { + super_call_VM_leaf(StubRoutines::store_value_type_fields_to_buf()); + } else { + call(RuntimeAddress(StubRoutines::store_value_type_fields_to_buf())); + call_offset = offset(); + } + + bind(skip); + return call_offset; }