< prev index next >

src/hotspot/cpu/ppc/c1_CodeStubs_ppc.cpp

Print this page
rev 49800 : 8201593: Print array length in ArrayIndexOutOfBoundsException.

@@ -38,14 +38,12 @@
 #endif // INCLUDE_ALL_GCS
 
 #define __ ce->masm()->
 
 
-RangeCheckStub::RangeCheckStub(CodeEmitInfo* info, LIR_Opr index,
-                               bool throw_index_out_of_bounds_exception)
-  : _throw_index_out_of_bounds_exception(throw_index_out_of_bounds_exception)
-  , _index(index) {
+RangeCheckStub::RangeCheckStub(CodeEmitInfo* info, LIR_Opr index, LIR_Opr array)
+  : _throw_index_out_of_bounds_exception(array == NULL), _index(index), _array(array) {
   assert(info != NULL, "must have info");
   _info = new CodeEmitInfo(info);
 }
 
 void RangeCheckStub::emit_code(LIR_Assembler* ce) {

@@ -75,10 +73,14 @@
   if (_index->is_register()) {
     __ extsw(index, _index->as_register());
   } else {
     __ load_const_optimized(index, _index->as_jint());
   }
+  if (_array) {
+    __ std(_array->as_pointer_register(), -8, R1_SP);
+  }
+  __ std(R0, -16, R1_SP);
 
   __ bctrl();
   ce->add_call_info_here(_info);
   ce->verify_oop_map(_info);
   debug_only(__ illtrap());
< prev index next >