diff --git a/src/cpu/zero/vm/cppInterpreter_zero.cpp b/src/cpu/zero/vm/cppInterpreter_zero.cpp index 15cfc86aaa42ba2bc1ed5933a0471f44465b5db5..242ce1cfdfb44d4a98a3d4d56d22dbbf03e2d75a 100644 --- a/src/cpu/zero/vm/cppInterpreter_zero.cpp +++ b/src/cpu/zero/vm/cppInterpreter_zero.cpp @@ -220,9 +220,16 @@ void CppInterpreter::main_loop(int recurse, TRAPS) { // Push our result for (int i = 0; i < result_slots; i++) { // Adjust result to smaller - intptr_t res = result[-i]; + union { + intptr_t res; + jint res_jint; + }; + res = result[-i]; if (result_slots == 1) { - res = narrow(method->result_type(), res); + BasicType t = method->result_type(); + if (is_subword_type(t)) { + res_jint = (jint)narrow(t, res_jint); + } } stack->push(res); } diff --git a/src/share/vm/interpreter/bytecodeInterpreter.cpp b/src/share/vm/interpreter/bytecodeInterpreter.cpp index eed4a35f0fc1f584fe3381907c2a5c39950882f2..59e1fb95b3477ba29f2463012da1146a7b5722e6 100644 --- a/src/share/vm/interpreter/bytecodeInterpreter.cpp +++ b/src/share/vm/interpreter/bytecodeInterpreter.cpp @@ -593,8 +593,9 @@ BytecodeInterpreter::run(interpreterState istate) { /* 0xDC */ &&opc_default, &&opc_default, &&opc_default, &&opc_default, /* 0xE0 */ &&opc_default, &&opc_default, &&opc_default, &&opc_default, -/* 0xE4 */ &&opc_default, &&opc_fast_aldc, &&opc_fast_aldc_w, &&opc_return_register_finalizer, -/* 0xE8 */ &&opc_invokehandle,&&opc_default, &&opc_default, &&opc_default, +/* 0xE4 */ &&opc_default, &&opc_default, &&opc_fast_aldc, &&opc_fast_aldc_w, +/* 0xE8 */ &&opc_return_register_finalizer, + &&opc_invokehandle, &&opc_default, &&opc_default, /* 0xEC */ &&opc_default, &&opc_default, &&opc_default, &&opc_default, /* 0xF0 */ &&opc_default, &&opc_default, &&opc_default, &&opc_default,