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