8154210: Zero: Better byte behaviour
authoraph
Fri, 22 Apr 2016 14:30:58 +0200
changeset 38063 93b9ff8b977e
parent 38060 954c9575f653
child 38064 0e7c67a6ad89
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
hotspot/src/cpu/zero/vm/cppInterpreter_zero.cpp
hotspot/src/share/vm/interpreter/bytecodeInterpreter.cpp
--- a/hotspot/src/cpu/zero/vm/cppInterpreter_zero.cpp	Fri Apr 22 01:04:00 2016 -0700
+++ b/hotspot/src/cpu/zero/vm/cppInterpreter_zero.cpp	Fri Apr 22 14:30:58 2016 +0200
@@ -221,9 +221,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);
   }
--- a/hotspot/src/share/vm/interpreter/bytecodeInterpreter.cpp	Fri Apr 22 01:04:00 2016 -0700
+++ b/hotspot/src/share/vm/interpreter/bytecodeInterpreter.cpp	Fri Apr 22 14:30:58 2016 +0200
@@ -578,8 +578,9 @@
 /* 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,