7077806: ARM: java.lang.InternalError: bound subword value does not fit into the subword type

Shared fix necessary for ARM/PPC

Reviewed-by: twisti, roland
This commit is contained in:
Bertrand Delsart 2011-09-14 16:28:39 +02:00
parent fcc31d9741
commit bc855ff2e0

View file

@ -515,11 +515,12 @@ class MethodHandles: AllStatic {
}
// 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;
}
}