8161044: PPC64: Improve internal array handling

Co-authored-by: Xiang Yuan <xiang.yuan@linaro.org>
Co-authored-by: Volker Simonis <volker.simonis@sap.com>
Reviewed-by: kvn
This commit is contained in:
Zoltan Majo 2016-07-25 11:15:00 +02:00
parent 9d898bb3e0
commit 090f7aec49

View File

@ -1894,6 +1894,22 @@ void LIR_Assembler::emit_arraycopy(LIR_OpArrayCopy* op) {
__ beq(combined_check, slow);
}
if (flags & LIR_OpArrayCopy::type_check) {
if (!(flags & LIR_OpArrayCopy::LIR_OpArrayCopy::dst_objarray)) {
__ load_klass(tmp, dst);
__ lwz(tmp2, in_bytes(Klass::layout_helper_offset()), tmp);
__ cmpwi(CCR0, tmp2, Klass::_lh_neutral_value);
__ bge(CCR0, slow);
}
if (!(flags & LIR_OpArrayCopy::LIR_OpArrayCopy::src_objarray)) {
__ load_klass(tmp, src);
__ lwz(tmp2, in_bytes(Klass::layout_helper_offset()), tmp);
__ cmpwi(CCR0, tmp2, Klass::_lh_neutral_value);
__ bge(CCR0, slow);
}
}
// Higher 32bits must be null.
__ extsw(length, length);