changeset 12214:5e7d980add86

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>
author zmajo
date Mon, 25 Jul 2016 11:15:00 +0200
parents e0337df087e6
children 7b48d63dfd6b
files src/cpu/ppc/vm/c1_LIRAssembler_ppc.cpp
diffstat 1 files changed, 16 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/cpu/ppc/vm/c1_LIRAssembler_ppc.cpp	Mon Jun 27 15:26:08 2016 -0400
+++ b/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);