8233019: java.lang.Class.isPrimitive() (C1) returns wrong result if Klass* is aligned to 32bit

Reviewed-by: mdoerr, dlong, aph
This commit is contained in:
Thomas Stuefe 2019-10-31 07:53:16 +01:00
parent bc8822095f
commit 13cc1154f0
8 changed files with 63 additions and 2 deletions

View file

@ -1301,7 +1301,7 @@ void LIRGenerator::do_isPrimitive(Intrinsic* x) {
}
__ move(new LIR_Address(rcvr.result(), java_lang_Class::klass_offset_in_bytes(), T_ADDRESS), temp, info);
__ cmp(lir_cond_notEqual, temp, LIR_OprFact::intConst(0));
__ cmp(lir_cond_notEqual, temp, LIR_OprFact::metadataConst(0));
__ cmove(lir_cond_notEqual, LIR_OprFact::intConst(0), LIR_OprFact::intConst(1), result, T_BOOLEAN);
}