--- old/src/cpu/x86/vm/templateInterpreterGenerator_x86.cpp 2017-06-01 17:27:41.335208467 +0200 +++ new/src/cpu/x86/vm/templateInterpreterGenerator_x86.cpp 2017-06-01 17:27:41.261208564 +0200 @@ -203,9 +203,16 @@ // and NULL it as marker that esp is now tos until next java call __ movptr(Address(rbp, frame::interpreter_frame_last_sp_offset * wordSize), (int32_t)NULL_WORD); + if (state == qtos && ValueTypeReturnedAsFields) { + // A value type is being returned. If fields are in registers we + // need to allocate a value type instance and initialize it with + // the value of the fields. + __ super_call_VM_leaf(StubRoutines::store_value_type_fields_to_buf()); + } + __ restore_bcp(); __ restore_locals(); - + if (state == atos) { Register mdp = rbx; Register tmp = rcx;