src/cpu/zero/vm/cppInterpreter_zero.cpp

changeset 8429
8f58998958ca
parent 8402
cc78c97abff8
child 8604
04d83ba48607
child 9669
32bc598624bd
     1.1 --- a/src/cpu/zero/vm/cppInterpreter_zero.cpp	Mon Apr 25 21:03:53 2016 +0000
     1.2 +++ b/src/cpu/zero/vm/cppInterpreter_zero.cpp	Tue Apr 26 02:49:59 2016 +0100
     1.3 @@ -220,9 +220,16 @@
     1.4    // Push our result
     1.5    for (int i = 0; i < result_slots; i++) {
     1.6      // Adjust result to smaller
     1.7 -    intptr_t res = result[-i];
     1.8 +    union {
     1.9 +      intptr_t res;
    1.10 +      jint res_jint;
    1.11 +    };
    1.12 +    res = result[-i];
    1.13      if (result_slots == 1) {
    1.14 -      res = narrow(method->result_type(), res);
    1.15 +      BasicType t = method->result_type();
    1.16 +      if (is_subword_type(t)) {
    1.17 +        res_jint = (jint)narrow(t, res_jint);
    1.18 +      }
    1.19      }
    1.20      stack->push(res);
    1.21    }

mercurial