changeset 2707:393f4b789fd0

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
author bdelsart
date Wed, 14 Sep 2011 16:28:39 +0200
parents 10ee2b297ccd
children 35c656d0b685
files src/share/vm/prims/methodHandles.hpp
diffstat 1 files changed, 4 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/vm/prims/methodHandles.hpp	Wed Sep 14 10:40:13 2011 +0200
+++ b/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;
     }
   }