|
|
f8968f |
diff -r 388e9d0905e6 src/cpu/zero/vm/cppInterpreter_zero.cpp
|
|
|
f8968f |
--- openjdk/hotspot/src/cpu/zero/vm/cppInterpreter_zero.cpp Mon Apr 11 11:33:18 2016 +0000
|
|
|
f8968f |
+++ openjdk/hotspot/src/cpu/zero/vm/cppInterpreter_zero.cpp Mon Apr 11 21:42:21 2016 +0100
|
|
|
f8968f |
@@ -93,6 +93,7 @@
|
|
|
f8968f |
case T_SHORT:
|
|
|
f8968f |
return (intptr_t)(jshort)result;
|
|
|
f8968f |
case T_OBJECT: // nothing to do fall through
|
|
|
f8968f |
+ case T_ARRAY:
|
|
|
f8968f |
case T_LONG:
|
|
|
f8968f |
case T_INT:
|
|
|
f8968f |
case T_FLOAT:
|
|
|
f8968f |
@@ -219,9 +219,16 @@
|
|
|
f8968f |
// Push our result
|
|
|
f8968f |
for (int i = 0; i < result_slots; i++) {
|
|
|
f8968f |
// Adjust result to smaller
|
|
|
f8968f |
- intptr_t res = result[-i];
|
|
|
f8968f |
+ union {
|
|
|
f8968f |
+ intptr_t res;
|
|
|
f8968f |
+ jint res_jint;
|
|
|
f8968f |
+ };
|
|
|
f8968f |
+ res = result[-i];
|
|
|
f8968f |
if (result_slots == 1) {
|
|
|
f8968f |
- res = narrow(result_type_of(method), res);
|
|
|
f8968f |
+ BasicType t = result_type_of(method);
|
|
|
f8968f |
+ if (is_subword_type(t)) {
|
|
|
f8968f |
+ res_jint = (jint)narrow(t, res_jint);
|
|
|
f8968f |
+ }
|
|
|
f8968f |
}
|
|
|
f8968f |
stack->push(res);
|
|
|
f8968f |
}
|
|
|
f8968f |
@@ -796,22 +797,10 @@
|
|
|
f8968f |
}
|
|
|
f8968f |
|
|
|
f8968f |
BasicType CppInterpreter::result_type_of(Method* method) {
|
|
|
f8968f |
- BasicType t;
|
|
|
f8968f |
- switch (method->result_index()) {
|
|
|
f8968f |
- case 0 : t = T_BOOLEAN; break;
|
|
|
f8968f |
- case 1 : t = T_CHAR; break;
|
|
|
f8968f |
- case 2 : t = T_BYTE; break;
|
|
|
f8968f |
- case 3 : t = T_SHORT; break;
|
|
|
f8968f |
- case 4 : t = T_INT; break;
|
|
|
f8968f |
- case 5 : t = T_LONG; break;
|
|
|
f8968f |
- case 6 : t = T_VOID; break;
|
|
|
f8968f |
- case 7 : t = T_FLOAT; break;
|
|
|
f8968f |
- case 8 : t = T_DOUBLE; break;
|
|
|
f8968f |
- case 9 : t = T_OBJECT; break;
|
|
|
f8968f |
- default: ShouldNotReachHere();
|
|
|
f8968f |
- }
|
|
|
f8968f |
- assert(AbstractInterpreter::BasicType_as_index(t) == method->result_index(),
|
|
|
f8968f |
- "out of step with AbstractInterpreter::BasicType_as_index");
|
|
|
f8968f |
+ // Get method->_constMethod->_result_type
|
|
|
f8968f |
+ u1 *p = ((unsigned char *)method->constMethod()
|
|
|
f8968f |
+ + in_bytes(ConstMethod::result_type_offset()));
|
|
|
f8968f |
+ BasicType t = (BasicType)*p;
|
|
|
f8968f |
return t;
|
|
|
f8968f |
}
|
|
|
f8968f |
|
|
|
f8968f |
diff -r 388e9d0905e6 src/share/vm/interpreter/bytecodeInterpreter.cpp
|
|
|
f8968f |
--- openjdk/hotspot/src/share/vm/interpreter/bytecodeInterpreter.cpp Mon Apr 11 11:33:18 2016 +0000
|
|
|
f8968f |
+++ openjdk/hotspot/src/share/vm/interpreter/bytecodeInterpreter.cpp Mon Apr 11 21:42:21 2016 +0100
|
|
|
f8968f |
@@ -593,9 +593,10 @@
|
|
|
f8968f |
/* 0xDC */ &&opc_default, &&opc_default, &&opc_default, &&opc_default,
|
|
|
f8968f |
|
|
|
f8968f |
/* 0xE0 */ &&opc_default, &&opc_default, &&opc_default, &&opc_default,
|
|
|
f8968f |
-/* 0xE4 */ &&opc_default, &&opc_fast_aldc, &&opc_fast_aldc_w, &&opc_return_register_finalizer,
|
|
|
f8968f |
-/* 0xE8 */ &&opc_invokehandle,&&opc_default, &&opc_default, &&opc_default,
|
|
|
f8968f |
-/* 0xEC */ &&opc_default, &&opc_default, &&opc_default, &&opc_default,
|
|
|
f8968f |
+/* 0xE4 */ &&opc_default, &&opc_default, &&opc_fast_aldc, &&opc_fast_aldc_w,
|
|
|
f8968f |
+/* 0xE8 */ &&opc_return_register_finalizer,
|
|
|
f8968f |
+ &&opc_invokehandle, &&opc_default, &&opc_default,
|
|
|
f8968f |
+/* 0xEC */ &&opc_default, &&opc_default, &&opc_default, &&opc_default,
|
|
|
f8968f |
|
|
|
f8968f |
/* 0xF0 */ &&opc_default, &&opc_default, &&opc_default, &&opc_default,
|
|
|
f8968f |
/* 0xF4 */ &&opc_default, &&opc_default, &&opc_default, &&opc_default,
|