Mercurial > hg > truffle
diff src/share/vm/prims/methodHandles.hpp @ 3943: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 | c26de9aef2ed |
children | 15d394228cfa |
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; } }