< prev index next >

src/hotspot/cpu/ppc/c1_Runtime1_ppc.cpp

Print this page
rev 49887 : 8201593: Print array length in ArrayIndexOutOfBoundsException.
Reviewed-by: dholmes, mdoerr
   1 /*
   2  * Copyright (c) 1999, 2018, Oracle and/or its affiliates. All rights reserved.
   3  * Copyright (c) 2012, 2015 SAP SE. All rights reserved.
   4  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   5  *
   6  * This code is free software; you can redistribute it and/or modify it
   7  * under the terms of the GNU General Public License version 2 only, as
   8  * published by the Free Software Foundation.
   9  *
  10  * This code is distributed in the hope that it will be useful, but WITHOUT
  11  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  12  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  13  * version 2 for more details (a copy is included in the LICENSE file that
  14  * accompanied this code).
  15  *
  16  * You should have received a copy of the GNU General Public License version
  17  * 2 along with this work; if not, write to the Free Software Foundation,
  18  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  19  *
  20  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  21  * or visit www.oracle.com if you need additional information or have any
  22  * questions.
  23  *


 490         __ mflr(R0);
 491         __ std(R0, _abi(lr), R1_SP);
 492         __ push_frame(frame::abi_reg_args_size, R0); // Empty dummy frame (no callee-save regs).
 493         sasm->set_frame_size(frame::abi_reg_args_size / BytesPerWord);
 494         OopMap* oop_map = new OopMap(frame::abi_reg_args_size / sizeof(jint), 0);
 495         int call_offset = __ call_RT(noreg, noreg,
 496                                      CAST_FROM_FN_PTR(address, SharedRuntime::register_finalizer), R3_ARG1);
 497         oop_maps = new OopMapSet();
 498         oop_maps->add_gc_map(call_offset, oop_map);
 499 
 500         __ pop_frame();
 501         __ ld(R0, _abi(lr), R1_SP);
 502         __ mtlr(R0);
 503         __ blr();
 504       }
 505       break;
 506 
 507     case throw_range_check_failed_id:
 508       {
 509         __ set_info("range_check_failed", dont_gc_arguments); // Arguments will be discarded.
 510         __ std(R0, -8, R1_SP); // Pass index on stack.
 511         oop_maps = generate_exception_throw_with_stack_parms(sasm, CAST_FROM_FN_PTR(address, throw_range_check_exception), 1);
 512       }
 513       break;
 514 
 515     case throw_index_exception_id:
 516       {
 517         __ set_info("index_range_check_failed", dont_gc_arguments); // Arguments will be discarded.
 518         oop_maps = generate_exception_throw(sasm, CAST_FROM_FN_PTR(address, throw_index_exception), true);
 519       }
 520       break;
 521 
 522     case throw_div0_exception_id:
 523       {
 524         __ set_info("throw_div0_exception", dont_gc_arguments);
 525         oop_maps = generate_exception_throw(sasm, CAST_FROM_FN_PTR(address, throw_div0_exception), false);
 526       }
 527       break;
 528 
 529     case throw_null_pointer_exception_id:
 530       {
 531         __ set_info("throw_null_pointer_exception", dont_gc_arguments);


   1 /*
   2  * Copyright (c) 1999, 2018, Oracle and/or its affiliates. All rights reserved.
   3  * Copyright (c) 2012, 2018 SAP SE. All rights reserved.
   4  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   5  *
   6  * This code is free software; you can redistribute it and/or modify it
   7  * under the terms of the GNU General Public License version 2 only, as
   8  * published by the Free Software Foundation.
   9  *
  10  * This code is distributed in the hope that it will be useful, but WITHOUT
  11  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  12  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  13  * version 2 for more details (a copy is included in the LICENSE file that
  14  * accompanied this code).
  15  *
  16  * You should have received a copy of the GNU General Public License version
  17  * 2 along with this work; if not, write to the Free Software Foundation,
  18  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  19  *
  20  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  21  * or visit www.oracle.com if you need additional information or have any
  22  * questions.
  23  *


 490         __ mflr(R0);
 491         __ std(R0, _abi(lr), R1_SP);
 492         __ push_frame(frame::abi_reg_args_size, R0); // Empty dummy frame (no callee-save regs).
 493         sasm->set_frame_size(frame::abi_reg_args_size / BytesPerWord);
 494         OopMap* oop_map = new OopMap(frame::abi_reg_args_size / sizeof(jint), 0);
 495         int call_offset = __ call_RT(noreg, noreg,
 496                                      CAST_FROM_FN_PTR(address, SharedRuntime::register_finalizer), R3_ARG1);
 497         oop_maps = new OopMapSet();
 498         oop_maps->add_gc_map(call_offset, oop_map);
 499 
 500         __ pop_frame();
 501         __ ld(R0, _abi(lr), R1_SP);
 502         __ mtlr(R0);
 503         __ blr();
 504       }
 505       break;
 506 
 507     case throw_range_check_failed_id:
 508       {
 509         __ set_info("range_check_failed", dont_gc_arguments); // Arguments will be discarded.
 510         oop_maps = generate_exception_throw_with_stack_parms(sasm, CAST_FROM_FN_PTR(address, throw_range_check_exception), 2);

 511       }
 512       break;
 513 
 514     case throw_index_exception_id:
 515       {
 516         __ set_info("index_range_check_failed", dont_gc_arguments); // Arguments will be discarded.
 517         oop_maps = generate_exception_throw(sasm, CAST_FROM_FN_PTR(address, throw_index_exception), true);
 518       }
 519       break;
 520 
 521     case throw_div0_exception_id:
 522       {
 523         __ set_info("throw_div0_exception", dont_gc_arguments);
 524         oop_maps = generate_exception_throw(sasm, CAST_FROM_FN_PTR(address, throw_div0_exception), false);
 525       }
 526       break;
 527 
 528     case throw_null_pointer_exception_id:
 529       {
 530         __ set_info("throw_null_pointer_exception", dont_gc_arguments);


< prev index next >