1 /*
2 * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
3 * Copyright 2012, 2014 SAP AG. 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 *
442 //
443 // 0 [TOP_IJAVA_FRAME_ABI] <-- R1_SP
444 // alignment (optional)
445 // [outgoing Java arguments]
446 // ...
447 // PARENT [PARENT_IJAVA_FRAME_ABI]
448 // ...
449 //
450
451 // Can't use call_VM here because we have not set up a new
452 // interpreter state. Make the call to the vm and make it look like
453 // our caller set up the JavaFrameAnchor.
454 __ set_top_ijava_frame_at_SP_as_last_Java_frame(R1_SP, R12_scratch2/*tmp*/);
455
456 // Push a new C frame and save LR.
457 __ save_LR_CR(R0);
458 __ push_frame_reg_args(0, R11_scratch1);
459
460 // This is not a leaf but we have a JavaFrameAnchor now and we will
461 // check (create) exceptions afterward so this is ok.
462 __ call_VM_leaf(CAST_FROM_FN_PTR(address, InterpreterRuntime::throw_AbstractMethodError));
463
464 // Pop the C frame and restore LR.
465 __ pop_frame();
466 __ restore_LR_CR(R0);
467
468 // Reset JavaFrameAnchor from call_VM_leaf above.
469 __ reset_last_Java_frame();
470
471 #ifdef CC_INTERP
472 // Return to frame manager, it will handle the pending exception.
473 __ blr();
474 #else
475 // We don't know our caller, so jump to the general forward exception stub,
476 // which will also pop our full frame off. Satisfy the interface of
477 // SharedRuntime::generate_forward_exception()
478 __ load_const_optimized(R11_scratch1, StubRoutines::forward_exception_entry(), R0);
479 __ mtctr(R11_scratch1);
480 __ bctr();
481 #endif
482
|
1 /*
2 * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
3 * Copyright 2012, 2015 SAP AG. 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 *
442 //
443 // 0 [TOP_IJAVA_FRAME_ABI] <-- R1_SP
444 // alignment (optional)
445 // [outgoing Java arguments]
446 // ...
447 // PARENT [PARENT_IJAVA_FRAME_ABI]
448 // ...
449 //
450
451 // Can't use call_VM here because we have not set up a new
452 // interpreter state. Make the call to the vm and make it look like
453 // our caller set up the JavaFrameAnchor.
454 __ set_top_ijava_frame_at_SP_as_last_Java_frame(R1_SP, R12_scratch2/*tmp*/);
455
456 // Push a new C frame and save LR.
457 __ save_LR_CR(R0);
458 __ push_frame_reg_args(0, R11_scratch1);
459
460 // This is not a leaf but we have a JavaFrameAnchor now and we will
461 // check (create) exceptions afterward so this is ok.
462 __ call_VM_leaf(CAST_FROM_FN_PTR(address, InterpreterRuntime::throw_AbstractMethodError),
463 R16_thread);
464
465 // Pop the C frame and restore LR.
466 __ pop_frame();
467 __ restore_LR_CR(R0);
468
469 // Reset JavaFrameAnchor from call_VM_leaf above.
470 __ reset_last_Java_frame();
471
472 #ifdef CC_INTERP
473 // Return to frame manager, it will handle the pending exception.
474 __ blr();
475 #else
476 // We don't know our caller, so jump to the general forward exception stub,
477 // which will also pop our full frame off. Satisfy the interface of
478 // SharedRuntime::generate_forward_exception()
479 __ load_const_optimized(R11_scratch1, StubRoutines::forward_exception_entry(), R0);
480 __ mtctr(R11_scratch1);
481 __ bctr();
482 #endif
483
|