8161044: PPC64: Improve internal array handling
Reviewed-by: kvn
Contributed-by: Xiang Yuan <xiang.yuan@linaro.org>, Volker Simonis <volker.simonis@sap.com>, Zoltan Majo <zoltan.majo@oracle.com>
--- a/hotspot/src/cpu/ppc/vm/c1_LIRAssembler_ppc.cpp Mon Jun 27 15:26:08 2016 -0400
+++ b/hotspot/src/cpu/ppc/vm/c1_LIRAssembler_ppc.cpp Mon Jul 25 11:15:00 2016 +0200
@@ -1894,6 +1894,22 @@
__ 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);