7077806: ARM: java.lang.InternalError: bound subword value does not fit into the subword type
authorbdelsart
Wed, 14 Sep 2011 16:28:39 +0200
changeset 10551 095307d09cb3
parent 10550 0a3c7a00fdc1
child 10552 4c615382f246
7077806: ARM: java.lang.InternalError: bound subword value does not fit into the subword type Summary: shared fix necessary for ARM/PPC Reviewed-by: twisti, roland
hotspot/src/share/vm/prims/methodHandles.hpp
--- a/hotspot/src/share/vm/prims/methodHandles.hpp	Wed Sep 14 10:40:13 2011 +0200
+++ b/hotspot/src/share/vm/prims/methodHandles.hpp	Wed Sep 14 16:28:39 2011 +0200
@@ -515,11 +515,12 @@
   }
   // Here is the transformation the i2i adapter must perform:
   static int truncate_subword_from_vminfo(jint value, int vminfo) {
-    jint tem = value << vminfo;
+    int shift = vminfo & ~CONV_VMINFO_SIGN_FLAG;
+    jint tem = value << shift;
     if ((vminfo & CONV_VMINFO_SIGN_FLAG) != 0) {
-      return (jint)tem >> vminfo;
+      return (jint)tem >> shift;
     } else {
-      return (juint)tem >> vminfo;
+      return (juint)tem >> shift;
     }
   }