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
--- 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;
}
}