Mercurial > hg > graal-jvmci-8
diff src/cpu/zero/vm/cppInterpreter_zero.cpp @ 24002:8f58998958ca
8154210: Zero: Better byte behaviour
Summary: Complete support for 8132051 on Zero and fix failure on 64-bit big-endian systems
Reviewed-by: andrew, chrisphi, coleenp
author | aph |
---|---|
date | Tue, 26 Apr 2016 02:49:59 +0100 |
parents | cc78c97abff8 |
children | 9b69cec6d01b |
line wrap: on
line diff
--- a/src/cpu/zero/vm/cppInterpreter_zero.cpp Mon Apr 25 21:03:53 2016 +0000 +++ b/src/cpu/zero/vm/cppInterpreter_zero.cpp Tue Apr 26 02:49:59 2016 +0100 @@ -220,9 +220,16 @@ // 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); }