--- old/src/cpu/x86/vm/interp_masm_x86.cpp 2017-06-01 17:27:40.375209718 +0200 +++ new/src/cpu/x86/vm/interp_masm_x86.cpp 2017-06-01 17:27:40.303209812 +0200 @@ -934,7 +934,8 @@ Register ret_addr, bool throw_monitor_exception, bool install_monitor_exception, - bool notify_jvmdi) { + bool notify_jvmdi, + bool load_values) { // Note: Registers rdx xmm0 may be in use for the // result check if synchronized method Label unlocked, unlock, no_unlock; @@ -1102,6 +1103,13 @@ bind(no_reserved_zone_enabling); } + if (load_values) { + // We are returning a value type, load its fields into registers + super_call_VM_leaf(StubRoutines::load_value_type_fields_in_regs()); + + // call above kills the value in rbx. Reload it. + movptr(rbx, Address(rbp, frame::interpreter_frame_sender_sp_offset * wordSize)); + } leave(); // remove frame anchor pop(ret_addr); // get return address mov(rsp, rbx); // set sp to sender sp